feat(ui): shared components, dialog confirms, toasts, sheet nav - #317
Merged
Conversation
…oasts, sheet nav - Extract duplicated empty states (5 pages) and pagination controls (4 pages) into EmptyState/Pagination components - Replace native confirm() and unconfirmed destructive actions with AlertDialog: delete project, rotate DSN, delete alert rule - Add svelte-sonner Toaster (themed via mode-watcher) with success/ error feedback for project, rule, and password mutations - Replace hand-rolled mobile nav accordion with bits-ui Sheet drawer: gains focus trap, Escape close, and outside-click close - Add WithoutChild/WithoutChildrenOrChild type helpers required by current shadcn-svelte registry components
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
EmptyStateandPaginationcomponents; replaces 5 duplicated empty-state blocks and 4 copy-pasted pagination controls (issues, transactions, release-health, issue detail events, projects)AlertDialogconfirmations for destructive actions: delete project, rotate DSN, delete alert rule (replaces the nativeconfirm()and previously-unconfirmed rotate/delete)svelte-sonnerToaster in the root layout, themed via mode-watcher; success/error toasts for project create/archive/unarchive/delete/rename, DSN rotate, rule create/toggle/delete, password changeSheet(left drawer): focus trap, Escape close, outside-click close for free — previously a hand-rolled accordion with none of thoseWithoutChild/WithoutChildrenOrChildtype helpers toutils.tsrequired by the current shadcn-svelte registry; shadcn CLI added alert-dialog/sheet/sonner componentsWhy
Copy-pasted UI machinery drifts per page and makes consistency work harder. Destructive actions need accessible, styled confirmation; mutations need visible feedback; the mobile menu lacked basic dialog accessibility.
Testing
npm run check(0 errors),npm test(10/10),npm run buildpass