Skip to content

Commit 254394d

Browse files
committed
refactor(components)!: retire ten zero-consumer shadcn sub-part exports
The dialog, dropdown-menu, sheet and sidebar lines of the unpublished src/ui/index.ts sub-barrel become named lists without DialogPortal, DialogOverlay, DialogClose, DropdownMenuPortal, SheetPortal, SheetClose, SidebarSeparator, SidebarGroupAction, SidebarMenuBadge and SidebarMenuSkeleton. The shadcn module files are unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7c523aa commit 254394d

2 files changed

Lines changed: 88 additions & 4 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
refactor(components)!: retire ten zero-consumer shadcn sub-part exports (dialog, dropdown-menu, sheet and sidebar parts)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#DialogPortal, @object-ui/components#DialogOverlay, @object-ui/components#DialogClose, @object-ui/components#DropdownMenuPortal, @object-ui/components#SheetPortal, @object-ui/components#SheetClose, @object-ui/components#SidebarSeparator, @object-ui/components#SidebarGroupAction, @object-ui/components#SidebarMenuBadge, @object-ui/components#SidebarMenuSkeleton) the retired operands are React UI primitives of the components package; nothing in the workspace or in hotcrm imports any of them from the package entry (the only other spellings are the upstream shadcn registry snapshots under `ui/scripts/__tests__/fixtures/shadcn-registry/`, which declare their own copies, and a comment naming Radix's own portal part), and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these ten names from `@object-ui/components`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected, and every schema node type (`dialog`, `sheet`, `dropdown-menu`, `sidebar` and the rest) renders exactly as before.
13+
14+
All ten stay in their shadcn modules, which `pnpm shadcn:update` keeps in step with the registry and which this package's own code still reads (`MobileDialogContent` mounts `DialogPortal` and `DialogOverlay`); only the entry stops publishing them:
15+
16+
- `dialog`: `DialogPortal`, `DialogOverlay`, `DialogClose`
17+
- `dropdown-menu`: `DropdownMenuPortal`
18+
- `sheet`: `SheetPortal`, `SheetClose`
19+
- `sidebar`: `SidebarSeparator`, `SidebarGroupAction`, `SidebarMenuBadge`, `SidebarMenuSkeleton`
20+
21+
Every other name the entry exported stays exported unchanged, among them `Dialog`, `DialogTrigger`, `DialogContent` and its header, footer, title and description parts, `DropdownMenu` with its trigger, content, item, group, label, separator, shortcut, radio, checkbox and sub-menu parts, `Sheet` with `SheetOverlay`, `SheetTrigger`, `SheetContent` and its header, footer, title and description parts, and `Sidebar`, `SidebarProvider`, `useSidebar`, `useOptionalSidebar` with every other sidebar part.
22+
23+
What leaves, and what to write instead:
24+
25+
- FROM `DialogPortal`, `DialogOverlay` TO `DialogContent`, which already mounts the portal and the overlay.
26+
- FROM `DialogClose` TO the close button `DialogContent` already draws, or the `Close` part of `@radix-ui/react-dialog` for a custom one.
27+
- FROM `DropdownMenuPortal` TO `DropdownMenuContent`, which already mounts its own portal; for a sub-menu, the `Portal` part of `@radix-ui/react-dropdown-menu` around `DropdownMenuSubContent`.
28+
- FROM `SheetPortal` TO `SheetContent`, which already mounts the portal and the overlay.
29+
- FROM `SheetClose` TO the close button `SheetContent` already draws, or the `Close` part of `@radix-ui/react-dialog` for a custom one.
30+
- FROM `SidebarSeparator`, `SidebarGroupAction`, `SidebarMenuBadge`, `SidebarMenuSkeleton` TO the same parts in the host's own tree (`npx shadcn@latest add sidebar`), or `Separator`, `SidebarMenuAction` and `Skeleton`, which stay exported.

‎ui/packages/components/src/ui/index.ts‎

Lines changed: 58 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)