feat(frontend): migrate resources, app store, and blueprint sheets to §9.11 chrome (#962)

Final PR of the System Sheet (§9.11) chrome rollout, stacked on PR 2.
Migrates the last five sheet consumers and extracts the inline network
detail sheet from ResourcesView into its own file.

Sheets migrated:
* VolumeBrowserSheet: crumb Resources > Volumes > {name}, Refresh tree
  primary, footer audit-log notice. Uses the new SystemSheet noScroll
  prop because the body is a 2-pane file browser that manages its own
  scroll regions; each pane (file tree, file preview) wraps its scroll
  region in ScrollArea per §10 Scrollbars.
* ImageDetailsSheet: crumb Resources > Images > {name}. Three sections
  (Overview, Config, Layers) flush against hairlines. Removed the
  icon-prefixed title and per-layer card wrapping (replaced with
  divide-y dividers).
* NetworkDetailSheet: NEW file extracted from the inline 150-line
  network sheet that lived inside ResourcesView.tsx. Crumb Resources >
  Networks > {name}. Five sections (Overview, IPAM, Options, Connected,
  Labels). Re-exports NetworkInspectData so ResourcesView can import
  the type. ResourcesView now renders the extracted component and drops
  its now-unused Sheet, ScrollArea, copyToClipboard, Copy, and Container
  imports.
* AppStoreView template detail sheet: crumb App store > {template}.
  Tabs Essentials | Advanced. Deploy lifted from SheetFooter into the
  toolbar primary slot. The remote-target signal (was a Badge in the
  header) collapses into the meta line as "→ {remoteName}".
* BlueprintDetail: the §9.11 reference implementation, intentionally
  migrated last. Crumb Blueprints > {name}. The kebab dropdown
  dissolves into individual toolbar actions: Apply now (primary), Edit
  (secondary, when not in editMode), Enable/Disable (secondary), Delete
  (destructive). Body has Description, Deployments, Compose sections.

Primitive enhancement:
* Added noScroll?: boolean to SystemSheet. When true, the body is
  rendered as a flex container instead of being wrapped in ScrollArea.
  Caller manages its own scroll regions and body padding.

Final state: frontend/src/components/ui/sheet.tsx is now imported only
by TopBar.tsx (mobile nav drawer, intentionally out of scope per the
plan) and SystemSheet itself. The §9.11 rollout is complete.
This commit is contained in:
Anso
2026-05-06 23:23:25 -04:00
committed by GitHub
parent 3ec0a45ff0
commit 907e7427e5
7 changed files with 735 additions and 745 deletions
+15 -3
View File
@@ -53,6 +53,13 @@ export interface SystemSheetProps {
footerContext?: React.ReactNode;
size?: SystemSheetSize;
/**
* Skip wrapping the body in `<ScrollArea>`. Use when the sheet body manages its own
* scroll regions (e.g. multi-pane file browsers). The caller is responsible for
* keeping scrollbars to `<ScrollArea>` per §10 Scrollbars, AND for adding their own
* body padding (`noScroll` skips the default `px-6 py-5` wrapper).
*/
noScroll?: boolean;
children?: React.ReactNode;
}
@@ -70,6 +77,7 @@ export function SystemSheet({
onTabChange,
footerContext,
size = 'md',
noScroll = false,
children,
}: SystemSheetProps) {
const hasToolbar = !!(primaryAction || (secondaryActions && secondaryActions.length > 0) || destructiveAction);
@@ -111,9 +119,13 @@ export function SystemSheet({
/>
)}
<ScrollArea className="flex-1">
<div className="px-6 py-5">{children}</div>
</ScrollArea>
{noScroll ? (
<div className="flex-1 min-h-0 flex flex-col">{children}</div>
) : (
<ScrollArea className="flex-1">
<div className="px-6 py-5">{children}</div>
</ScrollArea>
)}
{hasFooter && <FooterBand context={footerContext} />}
</SheetContent>