Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
bf1ba71
Migrate to proxy architecture with lazy loading
talissoncosta Dec 17, 2025
8ecc16c
Add husky, lint-staged, and CI workflow
talissoncosta Dec 17, 2025
b430daa
Add dist-types to gitignore
talissoncosta Dec 17, 2025
af2cc62
Fix CI build with safer TypeScript compilation
talissoncosta Dec 17, 2025
1d87124
Simplify TypeScript build script
talissoncosta Dec 17, 2025
a4bdcb5
Split CI into 3 parallel jobs: lint, typecheck, build
talissoncosta Dec 17, 2025
4e25dbf
Add dev preview with mock data and Codespaces support
talissoncosta Dec 17, 2025
5319f85
Fix TypeError when accessing feature_state_value properties
talissoncosta Dec 19, 2025
55f1245
Remove unused getEnvironmentFeatures method
talissoncosta Dec 19, 2025
17d538c
Remove unused dependencies: @backstage/theme, @material-ui/lab, react…
talissoncosta Dec 19, 2025
83e9c32
chore: add missing EOF newline and ignore dist-demo
talissoncosta Dec 23, 2025
9511e90
Add alpha export with Backstage new frontend system
talissoncosta Dec 19, 2025
c50659d
refactor: remove legacy frontend system files
talissoncosta Dec 23, 2025
fc41454
feat: make new frontend system the default export
talissoncosta Dec 23, 2025
796e205
chore: remove alpha export path from package.json
talissoncosta Dec 23, 2025
bf06364
fix(dev): update dev server for new frontend system
talissoncosta Dec 23, 2025
74f6679
refactor: remove component exports from index
talissoncosta Dec 23, 2025
747085b
feat(theme): add Flagsmith theme constants and dashboard URL helpers
talissoncosta Dec 19, 2025
92ee2bd
feat(components): add shared UI components for flag status display
talissoncosta Dec 19, 2025
c847928
feat(api): add feature state interfaces for lazy loading
talissoncosta Dec 19, 2025
ebcdedc
feat(FlagsTab): add Jira-style per-environment table with lazy loading
talissoncosta Dec 19, 2025
3d1e341
feat(OverviewCard): add summary stats and dashboard link
talissoncosta Dec 19, 2025
355b327
feat(UsageCard): apply Flagsmith brand colors to chart
talissoncosta Dec 19, 2025
e75d793
test(mocks): update mock data for lazy loading feature states
talissoncosta Dec 19, 2025
14787ef
refactor(FlagsTab): remove misleading enabled/disabled counts
talissoncosta Dec 19, 2025
0a90fe1
refactor(FlagsTab): split into smaller focused components
talissoncosta Dec 23, 2025
25c64e4
feat: add custom hooks and utility functions for testability
talissoncosta Dec 23, 2025
4fd7019
refactor(FlagsmithOverviewCard): split into smaller components
talissoncosta Dec 23, 2025
5f65b4c
refactor(FlagsmithUsageCard): split into smaller components
talissoncosta Dec 23, 2025
78a2a98
refactor(FlagsTab): use useFlagsmithProject hook for consistency
talissoncosta Dec 23, 2025
8c1638a
feat(shared): add reusable LoadingState and MiniPagination components
talissoncosta Dec 23, 2025
e48f6bc
Merge remote-tracking branch 'origin/main' into feat/6422-ui-improvem…
talissoncosta Jan 5, 2026
bff1cba
feat(demo): add GitHub Pages demo with mock data
talissoncosta Dec 19, 2025
f62e4f5
feat(demo): add configuration screen and PR preview deployments
talissoncosta Dec 23, 2025
63d496c
fix(ci): handle missing gh-pages branch in PR preview workflow
talissoncosta Dec 23, 2025
6a9eef7
fix(demo): correct discovery API URL for MSW interception
talissoncosta Dec 24, 2025
5c168aa
fix(demo): strip /flagsmith from URLs in live mode
talissoncosta Dec 24, 2025
cce16cd
refactor(components): replace inline styles with makeStyles
talissoncosta Dec 24, 2025
956eedc
refactor(demo): use makeStyles for LoadingScreen component
talissoncosta Dec 24, 2025
b384e53
feat(demo): make project and org IDs optional in live mode
talissoncosta Dec 24, 2025
b06ee08
chore(demo): add MSW debug logging
talissoncosta Dec 24, 2025
822880e
chore(demo): add MSW service worker for mock mode
talissoncosta Dec 24, 2025
e9bcfd8
feat(demo): add dark/light theme toggle
talissoncosta Dec 24, 2025
0593824
fix(demo): make AppBar and Tabs theme-aware
talissoncosta Dec 24, 2025
4102d03
fix(demo): improve theme toggle reliability and styling
talissoncosta Dec 24, 2025
86d26aa
fix(ci): preserve build artifact before switching to gh-pages branch
talissoncosta Dec 24, 2025
0d70a91
Merge branch 'feat/ui-improvements-2' into feat/github-pages-demo
talissoncosta Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Exclude demo build files from linting
demo/
dist-demo/
vite.config.demo.ts
204 changes: 204 additions & 0 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
name: Deploy Demo

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, closed]
workflow_dispatch:

permissions:
contents: write
pull-requests: write
pages: write
id-token: write

concurrency:
group: 'pages-${{ github.event.pull_request.number || github.ref }}'
cancel-in-progress: true

jobs:
build:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.set-url.outputs.url }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Determine base path
id: base-path
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "path=/flagsmith-backstage-plugin/pr-${{ github.event.pull_request.number }}/" >> $GITHUB_OUTPUT
else
echo "path=/flagsmith-backstage-plugin/" >> $GITHUB_OUTPUT
fi

- name: Build demo
run: yarn build:demo
env:
VITE_BASE_PATH: ${{ steps.base-path.outputs.path }}

- name: Set preview URL
id: set-url
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "url=https://${{ github.repository_owner }}.github.io/flagsmith-backstage-plugin/pr-${{ github.event.pull_request.number }}/" >> $GITHUB_OUTPUT
fi

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: demo-build
path: ./dist-demo

deploy-main:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: demo-build
path: ./dist-demo

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload to Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./dist-demo

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

deploy-pr-preview:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: demo-build
path: ./dist-demo

- name: Deploy PR preview
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Move artifact to temp location before switching branches
mv dist-demo /tmp/dist-demo

# Check if gh-pages branch exists
if git ls-remote --heads origin gh-pages | grep -q gh-pages; then
git fetch origin gh-pages
git checkout gh-pages
else
# Create orphan gh-pages branch if it doesn't exist
git checkout --orphan gh-pages
git rm -rf .
echo "# GitHub Pages" > README.md
git add README.md
git commit -m "Initialize gh-pages branch"
fi

# Deploy PR preview
PR_DIR="pr-${{ github.event.pull_request.number }}"
rm -rf "$PR_DIR"
mkdir -p "$PR_DIR"
cp -r /tmp/dist-demo/* "$PR_DIR/"

git add .
git diff --staged --quiet || git commit -m "Deploy PR #${{ github.event.pull_request.number }} preview"
git push origin gh-pages

- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
const url = '${{ needs.build.outputs.preview_url }}';
const body = `## Demo Preview

Preview URL: ${url}

This preview will be automatically cleaned up when the PR is closed.`;

const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});

const botComment = comments.find(c =>
c.user.type === 'Bot' && c.body.includes('Demo Preview')
);

if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
});
}

cleanup-pr-preview:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Remove PR preview
run: |
# Check if gh-pages branch exists
if ! git ls-remote --heads origin gh-pages | grep -q gh-pages; then
echo "gh-pages branch does not exist, nothing to clean up"
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin gh-pages
git checkout gh-pages

PR_DIR="pr-${{ github.event.pull_request.number }}"
if [ -d "$PR_DIR" ]; then
rm -rf "$PR_DIR"
git add .
git diff --staged --quiet || git commit -m "Remove PR #${{ github.event.pull_request.number }} preview"
git push origin gh-pages
fi
Loading