Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2b34afb
docs: fix base path in frontend/Claude.md
allison-truhlar Apr 24, 2026
3ff93a4
feat: add design-system scaffolding and preview routes
allison-truhlar Apr 24, 2026
a9a47eb
test: compare tailwind.config colors and preview page colors to preve…
allison-truhlar Apr 28, 2026
ff60622
feat: add FgIcon component and test
allison-truhlar Apr 28, 2026
d3e024b
chore: migrate icons to FgIcon
allison-truhlar Apr 28, 2026
084dbcc
feat: make FgButton and component test
allison-truhlar Apr 28, 2026
3c55661
chore: migrate buttons to FgButton
allison-truhlar Apr 28, 2026
0af093d
style: change error-light for contrast with white text on buttons
allison-truhlar Apr 28, 2026
b1a9e74
feat: make FgLink and component test
allison-truhlar Apr 28, 2026
09d923c
chore: migrate internal links to FgLink
allison-truhlar Apr 28, 2026
31b2272
feat: make FgExternalLink and component test
allison-truhlar Apr 28, 2026
1ce0e0c
chore: migrate external links to FgExternalLink
allison-truhlar Apr 28, 2026
358aa8d
feat: make FgBadge, JobStatusBadge wrapper, and component test
allison-truhlar Apr 28, 2026
3bc8e0d
chores: update preview page and test; remove ExternalLink; update Col…
allison-truhlar Apr 28, 2026
8dc76a5
fix: make loading spinner color match text color in FgButton
allison-truhlar Apr 28, 2026
2fe2be0
fix: change test to look for role button with name instead of text
allison-truhlar Apr 28, 2026
bc753c0
fix(test): update to work with changes to icon rendering
allison-truhlar Apr 29, 2026
c439bfb
chore: remove unused clean scripts and rimraf dependency
allison-truhlar May 6, 2026
68dc94e
chore: add Storybook and Chromatic dependencies, configure vitest wor…
allison-truhlar May 6, 2026
a8aebb2
feat: add Storybook stories for design system components
allison-truhlar May 6, 2026
3c29e40
ci: add Chromatic visual regression workflow
allison-truhlar May 6, 2026
555040d
refactor: remove in-app design system preview routes and tests
allison-truhlar May 6, 2026
438b67f
refactor: update ColorsPageSync test to use story exports
allison-truhlar May 6, 2026
f8bf66c
docs: update documentation for Storybook migration
allison-truhlar May 6, 2026
4ead106
chore: linting
allison-truhlar May 6, 2026
bec44b7
Merge branch 'main' into refactor-design-system
allison-truhlar May 6, 2026
6ff9246
chore: linting
allison-truhlar May 6, 2026
53b8cea
ci: update chromatic workflow to use pixi
allison-truhlar May 6, 2026
57c39f0
chore: update package-lock
allison-truhlar May 6, 2026
0721d5e
ci: change chromatic working dir to frontend
allison-truhlar May 6, 2026
345dadd
ci: correct relative path to frontend dir
allison-truhlar May 6, 2026
2e97a8f
ci: change workingDir for Chromatic action specifically
allison-truhlar May 6, 2026
278656a
fix(ci): remove click causing navigation away from storybook
allison-truhlar May 6, 2026
954b0df
fix: scope frontend tests to unit tests
allison-truhlar May 7, 2026
258712f
fix: update pixi lock
allison-truhlar May 7, 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
38 changes: 38 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Chromatic"

on:
workflow_dispatch:
push:
branches: main
pull_request:
branches: "*"

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
env:
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.ref }}
CHROMATIC_SLUG: ${{ github.repository }}
- uses: actions/setup-node@v6
with:
node-version: 24.14.0
- name: Install dependencies
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment.
run: npm ci
- name: Run Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: frontend
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ notifications.yaml

# Local VSCode settings
.vscode/

*storybook.log
storybook-static
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ View the app at http://localhost:7878
| `pixi run migrate` | Run database migrations |
| `pixi run migrate-create` | Create new migration |

### Storybook

| Command | Description |
|---------|-------------|
| `pixi run storybook` | Start Storybook dev server on port 6006 |
| `pixi run storybook-build` | Build static Storybook site |

### Container Development

| Command | Description |
Expand Down
17 changes: 17 additions & 0 deletions frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/components/designSystem/**/*.stories.tsx'],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-docs',
'@storybook/addon-themes',
'@storybook/addon-vitest',
'@chromatic-com/storybook'
],
framework: '@storybook/react-vite',
core: {
disableTelemetry: true
}
};
export default config;
40 changes: 40 additions & 0 deletions frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { createElement } from 'react';
import { MemoryRouter } from 'react-router';
import { withThemeByClassName } from '@storybook/addon-themes';
import type { Preview } from '@storybook/react-vite';
import '../src/index.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
},

a11y: {
// 'todo' - show a11y violations in the test UI only
// 'error' - fail CI on a11y violations
// 'off' - skip a11y checks entirely
test: 'todo'
}
},

decorators: [
// Wrap all stories in MemoryRouter so FgLink (react-router <Link>) works
Story => createElement(MemoryRouter, null, createElement(Story)),

// Dark mode toggle in the Storybook toolbar
withThemeByClassName({
themes: {
light: '',
dark: 'dark'
},
defaultTheme: 'light',
parentSelector: 'html'
})
]
};

export default preview;
31 changes: 21 additions & 10 deletions frontend/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@ export function useUpdateMyData() {

### Routing

- **Base path**: `/fg/` (configured in `vite.config.ts`)
- **Base path**: `/` (configured in `vite.config.ts`)
- **Routes**:
- `/fg/` - Dashboard/Browse (default)
- `/fg/browse` - File browser
- `/fg/jobs` - Background jobs
- `/fg/links` - Data links management
- `/fg/help` - Help/support
- `/fg/preferences` - User preferences
- `/fg/notifications` - Notifications
- `/` - Dashboard/Browse (default)
- `/browse` - File browser
- `/jobs` - Background jobs
- `/links` - Data links management
- `/help` - Help/support
- `/preferences` - User preferences
- `/notifications` - Notifications
- **Route definitions**: See `src/App.tsx`
- **Navigation**: Use React Router's `useNavigate()`, `Link`, or `NavLink`

Expand Down Expand Up @@ -453,15 +453,26 @@ export function useUpdateMyData() {
## Build Output

- **Development build**: Outputs to `../fileglancer/ui/`
- **Served by**: FastAPI backend at `/fg/` path
- **Static assets**: `/fg/assets/` (Vite asset hashing applied)
- **Served by**: FastAPI backend at `/` path
- **Static assets**: `/assets/` (Vite asset hashing applied)

## Environment Variables

- `.env` - Local environment configuration
- Variables must be prefixed with `VITE_` to be exposed to frontend
- Access via `import.meta.env.VITE_VAR_NAME`

## Storybook

Component documentation lives in Storybook, not in-app routes.

```bash
pixi run storybook # Start dev server on port 6006
pixi run storybook-build # Build static site
```

Stories are co-located with components: `FgButton.stories.tsx` next to `FgButton.tsx`.

## Troubleshooting

**Build issues:**
Expand Down
6 changes: 6 additions & 0 deletions frontend/chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"onlyChanged": true,
"projectId": "Project:69fb7ec1c131fc88e729a9a6",
"storybookBaseDir": "frontend",
"zip": true
}
10 changes: 6 additions & 4 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import storybook from 'eslint-plugin-storybook';

import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

import react from 'eslint-plugin-react';
import json from '@eslint/json';
import react from 'eslint-plugin-react';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import reactHooks from 'eslint-plugin-react-hooks';
import css from '@eslint/css';
import { defineConfig, globalIgnores } from 'eslint/config';
Expand Down Expand Up @@ -117,5 +118,6 @@ export default defineConfig([
'react/prop-types': 'off',
'react/prefer-read-only-props': 'warn'
}
}
},
...storybook.configs['flat/recommended']
]);
Loading
Loading