Commit ec6df1e
authored
* feat(dashboard): replace loop fetch with cursor-paginated infinite scroll - Add GET /api/invoices route with cursor + limit params (closes #460) - Add useInfiniteInvoices hook backed by useSWRInfinite - Add InvoiceListSentinel component (IntersectionObserver, rootMargin 300px) - Wire DashboardClient to useInfiniteInvoices; remove 1-50 id scan loop - Sentinel shows spinner while fetching, 'All invoices loaded' when done - persistSize:true preserves loaded pages on browser back-button
* feat(invoice): responsive detail layout with px-4 sm:px-6 lg:px-8 gutters - Update layout.tsx wrapper: overflow-x-hidden + responsive padding (closes #461) - Update page.tsx main container: max-w-3xl, overflow-x-hidden, py-8 sm:py-12 - Add justify-end to header action button row to wrap cleanly on mobile - No horizontal overflow at 375px / 390px / 414px viewport widths
* feat(a11y): focus management — trap, restoration, Cancel Invoice trigger - Add src/components/ui/Modal.tsx: reusable accessible dialog shell using FocusTrap (closes #462) - Add triggerRef for each modal in InvoiceDetailPage (share, shareQR, duplicate, cancel, pay) - Add useEffect per modal to restore focus to trigger on close - Add Cancel Invoice button in header (creator-only, Pending invoices) - Tab cycling within open modals already handled by existing FocusTrap
* feat(theme): dark mode hook + ui re-exports + implementation docs - Add src/hooks/useTheme.ts: re-exports useTheme from ThemeContext (closes #463) - Add src/components/ui/ThemeToggle.tsx: re-export from ThemeToggle - darkMode:'class' already set in tailwind.config.js - themeBootstrap IIFE already injected in layout.tsx (no FOUC) - ThemeContext + ThemeToggle already implement light/dark/system cycle with localStorage persistence under key 'split-theme' - Add docs/IMPLEMENTATION_SUMMARY.md covering all 4 issues
1 parent daa4467 commit ec6df1e
10 files changed
Lines changed: 640 additions & 253 deletions
File tree
- docs
- src
- app
- api/invoices
- invoice/[id]
- components
- ui
- hooks
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
142 | 165 | | |
143 | 166 | | |
144 | 167 | | |
| |||
394 | 417 | | |
395 | 418 | | |
396 | 419 | | |
397 | | - | |
| 420 | + | |
398 | 421 | | |
399 | 422 | | |
400 | 423 | | |
| |||
448 | 471 | | |
449 | 472 | | |
450 | 473 | | |
451 | | - | |
| 474 | + | |
452 | 475 | | |
453 | 476 | | |
454 | 477 | | |
455 | 478 | | |
| 479 | + | |
456 | 480 | | |
457 | 481 | | |
458 | 482 | | |
| |||
461 | 485 | | |
462 | 486 | | |
463 | 487 | | |
| 488 | + | |
464 | 489 | | |
465 | 490 | | |
466 | 491 | | |
| |||
487 | 512 | | |
488 | 513 | | |
489 | 514 | | |
| 515 | + | |
490 | 516 | | |
491 | 517 | | |
492 | 518 | | |
| |||
519 | 545 | | |
520 | 546 | | |
521 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
522 | 559 | | |
523 | 560 | | |
524 | 561 | | |
| |||
881 | 918 | | |
882 | 919 | | |
883 | 920 | | |
884 | | - | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
885 | 925 | | |
886 | 926 | | |
887 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
123 | 135 | | |
124 | 136 | | |
125 | 137 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 138 | + | |
152 | 139 | | |
153 | 140 | | |
154 | 141 | | |
| |||
574 | 561 | | |
575 | 562 | | |
576 | 563 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | 564 | | |
582 | 565 | | |
583 | 566 | | |
| |||
692 | 675 | | |
693 | 676 | | |
694 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
695 | 687 | | |
696 | 688 | | |
697 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
0 commit comments