feat: major ui refactor #97
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR Review: feat: major ui refactor
This is a significant UI refactor that introduces a new sidebar-based layout, navigation indicators, and restructures several routes. Here are my findings:
✅ Positive Changes
Well-structured sidebar system — The new
SidebarRoot,SidebarContent, andSidebarButtoncomponents are clean and follow Svelte 5 patterns well. The mobile/desktop responsive behavior (usingMediaQuery) is handled correctly, and the sidebar auto-closes on mobile navigation viaafterNavigate.Navigation indicators — The
Dimmer.svelteandProgressBar.sveltecomponents are thoughtful UX additions. They use$stateand lifecycle hooks (beforeNavigate,afterNavigate) correctly. The randomized progress animation is a nice touch.Cart/Order improvements — Adding
getItems()andgetTotal()methods to theCartclass, plus refactoring cart item batch to include prices, is a solid improvement. MovingcalculateProductOptionPricefrom the client to the module-level function inoption/index.tsis a good architectural change.FormOrConfigureDialog — The new dialog component for product ordering is well-designed, handling both simple products (no options) and configurable ones elegantly.
Header component — Clean extraction of the header with user popover, sidebar toggle, and logout functionality.
⚠️ Issues to Address
1. Hardcoded placeholder in
admin/+page.svelteThe page contains literal
hellotext and a large TODO comment block. This needs to be replaced with actual admin dashboard content before merging.2. Border color inconsistency
Several admin pages use
border-slate-300instead of the customborder-mist-default:src/routes/admin/printers/+page.svelte—.list-columnusesborder-slate-300src/routes/admin/printers/[printerId]/+page.svelte—.list-columnusesborder-slate-300The custom palette defines
border-mist-defaultasborder-mist-200 dark:border-mist-800. These should use the consistent custom utility.3. Deleted
EmailInputcomponentEmailInput.sveltewas removed. Verify that no routes or components still reference it (grep showed no remaining references, but double-checking is recommended).4. Removed
controls/index.tsre-exportsA.svelteandButton.sveltewere deleted and removed from the index. The+error.svelteroute was correctly updated to use a native<a>tag. Ensure all other usages of these components were migrated.5. Favicon reorganization
Static files were moved from
static/tostatic/favicon/. Ensure the migration is complete and no old paths are referenced anywhere. Also verify that the newweb-app-manifest-192x192.pngandweb-app-manifest-512x512.pngfiles are the correct assets.6. RadioInput defaultEntryUI is not customizable
The
defaultEntryUIsnippet inRadioInput.svelteis defined but not exposed as a prop. TheentryUIprop allows customizing individual entries, but there's no way to customize the default rendering. This might be intentional, but worth noting.7. Biome internal error
The
lint:checkCI step shows a Biome panic:This occurs in the
cups/workspace and appears to be a Biome bug, not a code issue. However, it's worth investigating or skipping that workspace in CI.ℹ️ Notes
@reference/@applywarnings — Svelte-check shows warnings for@referenceand@applyrules. These are valid Tailwind v4 syntax and can be safely ignored or suppressed in the check config.📊 Summary
Overall: Solid refactor with good component organization. The main blocker is the placeholder
hellotext inadmin/+page.svelte. The border color inconsistency should also be fixed for visual consistency.@ -3,4 +3,4 @@import { requireAdmin } from "#lib/auth/index.remote.ts";await requireAdmin();</script>Hardcoded 'hello' text and TODO comment block in admin dashboard page. This needs real content before merging.
Uses 'border-slate-300' instead of the custom 'border-mist-default' utility. Should use the project's custom palette for consistency.
Uses 'border-slate-300' instead of the custom 'border-mist-default' utility. Should use the project's custom palette for consistency.