Add Storybook component explorer for dashboard UI #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #1
Design reference
Goal
Add Storybook so every reusable dashboard component can be viewed, reviewed, and tested in isolation while the product UI is still being built.
Existing
components/uidecisionThere is no
components/uidirectory indimensionlab-websiteyet. The React files in/home/vince/forgejo-brutalist-frontend/src/components/uican inform the visual language, but must not be copied directly because this product is SvelteKit/Svelte.Use as Svelte equivalents now:
Button: for refresh, preview/publish actions, future editor actions, and compact toolbar controls.Badge: for status, severity, source, stale/unavailable, and operational labels.Separator: for hard layout dividers where a semantic component is clearer than ad hoc borders.Add now because the dashboard needs them even though they are not in the old React UI folder:
IconGlyph: generic Iconify renderer driven by model-provided icon names.IconButton: square action button for refresh/open/inspect controls.Panel: hard-edged section frame used by dashboard sections.GridFrame: page/grid wrapper for the command-center layout.TelemetryCard: metric card with value, unit, severity, source label, progress/sparkline slot, and stale/error states.ProgressMeter: compact bar meter for metric cards.Sparkline: lightweight chart primitive; can later feed richeruPlotcases.ServiceRow: service link/status row with icon, title, description, latency/status, and keyboard focus behavior.ServiceGroupPanel: grouped list of service rows.StatusStrip: top/bottom operational status band.WeatherModule: generic compact summary module, not hardcoded to weather-only content.FooterStatusCell: individual footer/status-bar item.EmptyState,LoadingState,ErrorState,UnavailableState: reusable system states.Defer until an editor/admin workflow needs them:
Input: not needed for the public dashboard shell, but likely needed for import/editor/agent preview UI later.ToggleGroup: defer until there are actual view/density/filter controls.ScrollArea: avoid for the one-page dashboard; use native page scrolling unless a future editor/sidebar requires a custom scroll region.Scope
Required stories
Base UI:
Button.stories.svelte: default, secondary, danger, ghost/outline, disabled, loading, icon-leading, compact.IconButton.stories.svelte: refresh/open/inspect examples, disabled, active, focus-visible.Badge.stories.svelte: neutral, ok, warning, danger, stale, unavailable, long label.Separator.stories.svelte: horizontal, vertical, dense panel use.IconGlyph.stories.svelte: valid icon, missing icon fallback, size variants, severity colors.Dashboard primitives:
Panel.stories.svelte: default, dense, warning, danger, empty, nested-content guard.GridFrame.stories.svelte: desktop grid, tablet wrap, mobile stack.TelemetryCard.stories.svelte: percent, bytes, temperature, latency, no data, stale, warning, danger, long source label.ProgressMeter.stories.svelte: low/normal/warn/danger/empty values.Sparkline.stories.svelte: flat, rising, spiky, missing data, stale.ServiceRow.stories.svelte: normal, down, degraded, stale, no link, long title/description, keyboard focus.ServiceGroupPanel.stories.svelte: short list, long list, empty group, mixed statuses.StatusStrip.stories.svelte: all operational, degraded, incident, syncing, stale.WeatherModule.stories.svelte: compact summary, unavailable, long location/value, generic module variant.FooterStatusCell.stories.svelte: label/value, action cell, stale, long value.SystemState.stories.svelte: loading, empty, error, unavailable, validation failure.Composition stories:
DashboardHeader.stories.svelte: title/subtitle/status module composition with generic content.TelemetryStrip.stories.svelte: 8-card and 16-card density, wrap behavior, mixed severity.DashboardOnePager.stories.svelte: full generic dashboard composition at desktop and mobile widths.Acceptance criteria
npm run storybookstarts the component explorer.npm run build-storybooksucceeds.Out of scope
components/uifiles from the Forgejo frontend project.