Write our own toasts and combobox #120

Merged
jcoffey-dev merged 1 commits from phase1/toast-combobox into main 2026-10-19 00:25:22 +00:00
Owner

Phase 1, part 4, and the last part. Stacked on the overlays PR (#119).

  • Toasts: a small store of our own (hooks/use-toast.ts) with 5 new tests: newest first, five at most, and each one goes after five seconds or its own duration. toast(), useToast() and the variants work as before. The toaster draws the list itself, so components/ui/toast.tsx is gone.
  • Combobox: rewritten on shadcn/ui's combobox pattern with the same props. The list takes the button's width from Radix instead of measuring it.

After this, none of src/components/ui or use-toast is upstream's.

Not upstream's Upstream lines left Dual headers
previous PR 76.1% 17,887 in 104 files 89
this PR 76.6% 17,435 in 100 files 85

The plan's target for phase 1 was 76.7%.

Visual check: see the base-components PR (#118). That check covered the whole stack, these components included, and found no change here.

Typecheck, lint, i18n:check, all 694 tests, build and notice check pass locally. No new strings.

Phase 1, part 4, and the last part. Stacked on the overlays PR (#119). - **Toasts:** a small store of our own (`hooks/use-toast.ts`) with 5 new tests: newest first, five at most, and each one goes after five seconds or its own duration. `toast()`, `useToast()` and the variants work as before. The toaster draws the list itself, so `components/ui/toast.tsx` is gone. - **Combobox:** rewritten on shadcn/ui's combobox pattern with the same props. The list takes the button's width from Radix instead of measuring it. After this, none of `src/components/ui` or `use-toast` is upstream's. | | Not upstream's | Upstream lines left | Dual headers | |---|---|---|---| | previous PR | 76.1% | 17,887 in 104 files | 89 | | this PR | 76.6% | 17,435 in 100 files | 85 | The plan's target for phase 1 was 76.7%. **Visual check:** see the base-components PR (#118). That check covered the whole stack, these components included, and found no change here. Typecheck, lint, i18n:check, all 694 tests, build and notice check pass locally. No new strings.
jcoffey-dev added 3 commits 2026-10-18 23:51:38 +00:00
Rebuild the simple base components on shadcn/ui
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 1m12s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m26s
ffc91393f2
Button, badge, card, input, textarea, label, separator, checkbox, switch,
collapsible, tabs, tooltip and popover are rewritten as function components
with the structure of shadcn/ui 4.21.1 (MIT), over the same Radix packages,
keeping the console's look. Input and textarea share one field style.

LICENSES/MIT.txt carries shadcn/ui's notice, and the README says which files
use it.
Rebuild dialogs, menus, select, command and calendar on shadcn/ui
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 50s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m22s
40b8b81582
Dialog, alert dialog, dropdown menu, select, command and calendar follow
shadcn/ui 4.21.1 (MIT) as function components, over the same Radix, cmdk and
DayPicker packages, keeping the console's look. Dialog and alert dialog share
their overlay and panel styles (modalClasses.ts).

Exports nothing uses are gone: the command dialog, shortcut and separator,
the menu's checkbox item and shortcut, the select's group, label and scroll
buttons as exports, and the portal and overlay parts. The calendar only picks
single dates, which is all the date field asks of it, so range and
week-number styling are dropped.
Write our own toasts and combobox
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 12s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m22s
1a42516646
The toast list is a small store of our own (hooks/use-toast.ts), read
through useSyncExternalStore, with tests: newest first, five at most, gone
after five seconds or the toast's own duration, and a handle to take it down
or change it. toast(), useToast() and the variants work as before. The
toaster draws the list itself, so components/ui/toast.tsx goes.

The combobox is rewritten too, with the same props. Its list now takes the
button's width from Radix's trigger-width variable instead of measuring it.
jcoffey-dev merged commit 7e11ae99ca into main 2026-10-19 00:25:22 +00:00
jcoffey-dev deleted branch phase1/toast-combobox 2026-10-19 00:25:22 +00:00
Sign in to join this conversation.