Skip to content

Commit 8e05546

Browse files
committed
refactor(components)!: retire the unused ViewSkeleton dispatcher and ShimmerSkeleton
ViewSkeleton (with ViewSkeletonVariant and ViewSkeletonDispatchProps) and ShimmerSkeleton (with ShimmerSkeletonProps) were published from the @object-ui/components entry and had no importer in the workspace. The dispatcher leaves view-skeleton.tsx, which keeps the Grid, Kanban, Form, List and Chart skeletons; shimmer-skeleton.tsx and its barrel line go, and the app-shell styles.css comment no longer points at it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZK9w6fe2Y6mGQjj6L
1 parent c4c515a commit 8e05546

5 files changed

Lines changed: 21 additions & 90 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
refactor(components)!: retire the unused `ViewSkeleton` dispatcher and `ShimmerSkeleton`
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#ViewSkeleton, @object-ui/components#ViewSkeletonVariant, @object-ui/components#ViewSkeletonDispatchProps, @object-ui/components#ShimmerSkeleton, @object-ui/components#ShimmerSkeletonProps) the retired operands are React components and their prop types in a published ui package's entry that nothing in the workspace imported; no packages/spec schema, no registered node type, no ADR-0087 conversion surface and no stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports either component from `@object-ui/components`. Both were published from the package entry and had no importer anywhere in the workspace, so the Console and every `@object-ui/*` package are unaffected. The other skeletons in `view-skeleton.tsx` stay exported unchanged: `GridSkeleton`, `KanbanSkeleton`, `FormSkeleton`, `ListSkeleton`, `ChartSkeleton` and the `ViewSkeletonProps`, `GridSkeletonProps` and `KanbanSkeletonProps` types.
13+
14+
What leaves, and what to write instead:
15+
16+
- FROM `ViewSkeleton` TO the skeleton for the variant you passed: `variant: "grid"` is `GridSkeleton`, `"kanban"` is `KanbanSkeleton`, `"form"` is `FormSkeleton`, `"list"` is `ListSkeleton`, `"chart"` is `ChartSkeleton`, each taking the same remaining props.
17+
- FROM `ViewSkeletonVariant` TO a local union of the variants you render, or no type at all once you call the skeleton components directly.
18+
- FROM `ViewSkeletonDispatchProps` TO `GridSkeletonProps` or `KanbanSkeletonProps` (which carry `columns`; `KanbanSkeletonProps` carries `cardsPerColumn`), or `ViewSkeletonProps` for the others.
19+
- FROM `ShimmerSkeleton` TO `Skeleton` from `@object-ui/components`, or a `div` carrying the `animate-shimmer` utility that `@object-ui/app-shell/styles.css` still declares.
20+
- FROM `ShimmerSkeletonProps` TO `React.HTMLAttributes<HTMLDivElement>`, which it aliased.

‎ui/packages/app-shell/src/styles.css‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
/* Shimmer keyframe + utility for skeleton loading placeholders.
1919
*
20-
* Usage: <div class="animate-shimmer ..."> or via ShimmerSkeleton
21-
* from @object-ui/components.
20+
* Usage: <div class="animate-shimmer ...">
2221
*
2322
* The keyframe slides a 200%-wide gradient across an element's
2423
* background. Pair with `bg-[length:200%_100%]` and a gradient that

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export * from './spinner';
2121
export * from './sort-builder';
2222
export * from './grouping-editor';
2323
export * from './view-skeleton';
24-
export * from './shimmer-skeleton';
2524
export * from './RecordTitleChip';
2625
export * from './refresh-indicator';
2726
export * from './view-states';

‎ui/packages/components/src/custom/shimmer-skeleton.tsx‎

Lines changed: 0 additions & 57 deletions
This file was deleted.

‎ui/packages/components/src/custom/view-skeleton.tsx‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -204,37 +204,7 @@ function ChartSkeleton({
204204
)
205205
}
206206

207-
// ---------------------------------------------------------------------------
208-
// ViewSkeleton – convenience wrapper that dispatches by variant
209-
// ---------------------------------------------------------------------------
210-
211-
export type ViewSkeletonVariant = "grid" | "kanban" | "form" | "list" | "chart"
212-
213-
export interface ViewSkeletonDispatchProps extends ViewSkeletonProps {
214-
variant: ViewSkeletonVariant
215-
/** Number of columns (grid / kanban) */
216-
columns?: number
217-
/** Cards per column (kanban only) */
218-
cardsPerColumn?: number
219-
}
220-
221-
function ViewSkeleton({ variant, ...props }: ViewSkeletonDispatchProps) {
222-
switch (variant) {
223-
case "grid":
224-
return <GridSkeleton {...props} />
225-
case "kanban":
226-
return <KanbanSkeleton {...props} />
227-
case "form":
228-
return <FormSkeleton {...props} />
229-
case "list":
230-
return <ListSkeleton {...props} />
231-
case "chart":
232-
return <ChartSkeleton {...props} />
233-
}
234-
}
235-
236207
export {
237-
ViewSkeleton,
238208
GridSkeleton,
239209
KanbanSkeleton,
240210
FormSkeleton,

0 commit comments

Comments
 (0)