Skip to content

feat(ui): shared confirm/prompt dialogs + list pager on top with typeable page - #14

Closed
jcfrei wants to merge 1 commit into
masterfrom
feat/dialogs-and-pager
Closed

feat(ui): shared confirm/prompt dialogs + list pager on top with typeable page#14
jcfrei wants to merge 1 commit into
masterfrom
feat/dialogs-and-pager

Conversation

@jcfrei

@jcfrei jcfrei commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Why

Native window.confirm/prompt dialogs are ugly and inconsistent, and long lists forced a scroll to the bottom to page.

What

Shared dialog system (replaces all native dialogs):

  • <DialogProvider> (mounted by AppShell) + useConfirm() / usePrompt() hooks → styled, on-brand modals.
  • <ConfirmButton> — inline arm-to-confirm for low-stakes in-row actions. First click splits the control into Cancel | Confirm with Cancel taking the trigger's original position, so an accidental double-click lands on Cancel → nothing happens. Auto-collapses after a few seconds / on pointer-leave.
  • Migrated core's own native dialogs: submit/cancel (document-actions), master delete, proposal discard, and the invite-link fallback.

Pagination on DocumentList:

  • The pager (range, per-page, prev/next) now renders above and below the table.
  • The current page is a typeable field — type a number + Enter to jump (clamped 1..last). Extracted into a reusable <ListPager>.

Exports: DialogProvider, useConfirm, usePrompt, ConfirmButton.

Design note

Intentional split by severity: inline ConfirmButton for row-level actions (unobtrusive, double-click-safe), modal useConfirm for destructive/top-level ones (deliberate, names the consequence — better than adding inline expansions to already-busy toolbars).

🤖 Generated with Claude Code

…able page

Replaces window.confirm/window.prompt with a styled dialog system:
- <DialogProvider> (mounted by AppShell) + useConfirm()/usePrompt() hooks.
- <ConfirmButton>: inline arm-to-confirm for in-row actions — first click splits
  into Cancel | Confirm with Cancel on the trigger's spot, so a double-click
  cancels (nothing happens); auto-collapses.
- Core submit/cancel (document-actions), master delete, proposal discard, and the
  invite-link fallback now use these instead of native dialogs.

DocumentList pagination now renders above AND below the table (no scroll-to-
bottom on long lists), and the page number is an editable field (Enter to jump,
clamped 1..last). Extracted into a reusable <ListPager>.

All new APIs exported: DialogProvider, useConfirm, usePrompt, ConfirmButton.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jcfrei added a commit that referenced this pull request Jul 30, 2026
feat(ui): shared confirm/prompt dialogs + list pager on top with typeable page (#14)

DialogProvider + useConfirm/usePrompt hooks and an inline ConfirmButton replace
window.confirm/prompt across core; DocumentList pager now renders above and below
with an editable page number.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jcfrei

jcfrei commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Squash-merged into master as 8ffe0c7 and released as v0.6.10.

@jcfrei jcfrei closed this Jul 30, 2026
@jcfrei
jcfrei deleted the feat/dialogs-and-pager branch July 30, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant