Repository navigation
refactor(frontend): use @project-graphite/ui for the theme and shared components - #15
Merged
Merged
Conversation
… components The design tokens, base styles and generic components now come from the shared graphite-ui package, installed from its v0.1.0 GitHub release. Only the poster, catalogue and cast styles and the tracker-specific components stay here. Shell is built on the package's AppShell, the account menu on Menu, the notification bell on Popover and the year picker on GridListbox. The compiled CSS is rule-for-rule the same, apart from renamed generic classes and values that now come from variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The frontend now takes its design tokens, base styles and generic components from the shared
@project-graphite/uipackage, installed from its v0.1.0 GitHub release. There should be no visible change.global.cssimports@project-graphite/ui/theme.cssand adds an@sourceline for the package's classes. It keeps only the poster, catalogue-row and cast-row styles.Icon,Dialog,ConfirmDialog,EmptyState,Field,Toggle,Pagination,SmoothImage,Outage;snackbar.tsxanduseDismiss.ts;errorMessage,isAbortErrorandtimeAgo.Shell→AppShell;AccountMenu→Menu, which also adds arrow-key and Home/End navigation, and focus returns to the trigger on Escape;NotificationBell→Popover;YearPicker→GridListbox.App.tsxwraps the routes inUiProvider, so the package renders react-router links.Paginationkeeps the 500-page cap (maxPages={500}). Snackbar actions usehrefinstead ofto.package-lock.json: adds the package. It also syncs the frontend's root specs (@types/node,react-router), which were already exact inpackage.json.Verification
npm run lint, andnpm test --workspace frontend: 11 files, 30 tests pass.npm run build --workspace frontendpasses.CSS before and after: both builds have 553 rules, and they match one for one. The only differences are the renamed generic classes (
notification-*→popover-*,account-menu→menu-panel,year-*→grid-*,poster-image→smooth-image), fixed radii, shadow, easing and heights that now come from variables with the same values, andcol-span-5→col-span-fullin the five-column year grid.Image:
docker build --target server appsucceeds. The first attempt failed because rolldown's musl binding was missing, and two clean rebuilds passed.mainbuilt cleanly too. This PR's image job runs the build again.Manual check on the
graphite-tracker-scratchstack:I couldn't sign in, so the account menu and the notification bell were only covered by the specs.
Checklist
sha-image tag in Coolify.