Skip to content

refactor(frontend): use @project-graphite/ui for the theme and shared components - #15

Merged
AmrMsCLL merged 1 commit into
mainfrom
refactor/use-graphite-ui
Oct 1, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
refactor/use-graphite-ui

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 1, 2026

Copy link
Copy Markdown
Member

What changed

The frontend now takes its design tokens, base styles and generic components from the shared @project-graphite/ui package, installed from its v0.1.0 GitHub release. There should be no visible change.

  • global.css imports @project-graphite/ui/theme.css and adds an @source line for the package's classes. It keeps only the poster, catalogue-row and cast-row styles.
  • Removed, now imported from the package:
    • Icon, Dialog, ConfirmDialog, EmptyState, Field, Toggle, Pagination, SmoothImage, Outage;
    • snackbar.tsx and useDismiss.ts;
    • the generic skeletons;
    • errorMessage, isAbortError and timeAgo.
  • Rebuilt on package components:
    • 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.tsx wraps the routes in UiProvider, so the package renders react-router links.
  • Unchanged behaviour: every Pagination keeps the 500-page cap (maxPages={500}). Snackbar actions use href instead of to.
  • package-lock.json: adds the package. It also syncs the frontend's root specs (@types/node, react-router), which were already exact in package.json.

Verification

  • npm run lint, and npm test --workspace frontend: 11 files, 30 tests pass.

  • npm run build --workspace frontend passes.

  • 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, and col-span-5 → col-span-full in the five-column year grid.

  • Image: docker build --target server app succeeds. The first attempt failed because rolldown's musl binding was missing, and two clean rebuilds passed. main built cleanly too. This PR's image job runs the build again.

  • Manual check on the graphite-tracker-scratch stack:

    • the home page on desktop;
    • Discover at 375 px with the tab bar;
    • the year picker's bottom sheet on a phone.

    I couldn't sign in, so the account menu and the notification bell were only covered by the specs.

Checklist

  • The change is focused and contains no credentials or generated secrets.
  • Documentation and tests were updated when behavior changed.
  • Deployment or rollback considerations are described when relevant. Merging deploys production through the Coolify webhook. To roll back, redeploy the previous sha- image tag in Coolify.

… 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.
@github-actions github-actions Bot added the size/xl Over 600 changed lines, excluding lockfiles label Oct 1, 2026
@AmrMsCLL
AmrMsCLL merged commit 0add23c into main Oct 1, 2026
6 checks passed
@AmrMsCLL
AmrMsCLL deleted the refactor/use-graphite-ui branch October 1, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl Over 600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant