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.
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.
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.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 1, part 4, and the last part. Stacked on the overlays PR (#119).
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, socomponents/ui/toast.tsxis gone.After this, none of
src/components/uioruse-toastis upstream's.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.