Skip to content

feat: v0.4 components, loaders, command palette rework, overlay a11y fixes - #32

Merged
Shewart merged 7 commits into
mainfrom
feat/v0.4-components
Sep 27, 2026
Merged

Shewart merged 7 commits into
mainfrom
feat/v0.4-components

Conversation

@Shewart

@Shewart Shewart commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

The first 0.4 feature batch: 14 new components, a rebuilt Loading with 23 variants, a reworked command palette, and fixes found while testing the demo against what the CLI installs. Merge after v0.3.0 is tagged; Directory.Build.props is untouched, so it merges cleanly onto main.

New components (90 direct targets, up from 76; 194 registry entries)

Each is written once in ShellUI.Components and its CLI template generated from that file. TemplateSyncTests keeps the two copies identical. Sub-parts are hidden (IsAvailable = false) and install automatically with their parent.

Target What it is Installs with it
kbd Keyboard key hint
aspect-ratio Fixed-ratio container
button-group Joined buttons, horizontal or vertical
toggle-group Single- or multi-select toggles (@bind-Value / @bind-Values) toggle-group-item
input-group Input with Prefix / Suffix slots
number-input −/+ input with min, max and step
stat-card KPI tile with trend badge
timeline Continuous line with a dot on each event timeline-item
tree-view Expandable, selectable tree (@bind-SelectedValue) tree-view-item
qr-code QR code as SVG NuGet QRCoder 1.8.0
image-viewer Thumbnail with a zoomable lightbox (Escape and backdrop close)
chat AI chat panel pinned to the newest message chat-message, chat-input
chat-message Bubble with streaming indicator; Text keeps line breaks
chat-input Enter sends, Shift+Enter adds a line

None of them use custom JavaScript.

Loading: rebuilt, 23 variants

  • Self-contained: keyframes are prefixed shellui-loading-* and ship inside the component. Before, the bars animations only existed in init's CSS, so they never animated for NuGet users.
  • Smoother: animates only transform and opacity.
  • Recolourable: uses currentColor, so Class="text-…" changes it.
  • Accessible: role="status", and it slows down under reduced motion rather than stopping.
  • Culture-safe: fixes delays that were invalid CSS in decimal-comma locales.
  • New variants: logo (the ShellUI mark, sweeping between logo and its inverse; theme-aware), snake, rows, columns, sequence, twinkle, activity, chase, dual-ring, wave, typing, ripple, progress, shimmer.
  • Redrawn: orbit, as an SVG with a comet tail.

Command palette

  • Command rewritten: anchored near the top of the screen, filters as you type, ↑/↓/Home/End/Enter, the highlighted row scrolls into view and follows the mouse, optional Group headings, a footer with key hints and a count, and a "No results" state. No custom JavaScript.
  • CommandItem moved to a hidden command-models template. This fixes the rc.2 compile error, where the class sat after @code and was never compiled.
  • CommandPalette gains bindable IsOpen / IsOpenChanged, so a button and Ctrl+K can share the same state.

Fixes

  • shellui.js shortcuts required Ctrl and ⌘, so Ctrl+K never fired. Either key now works (package and CLI copies).
  • Dialog, AlertDialog, Sheet and Drawer: focus moves in on open, Escape closes, and they have role="dialog" and aria-modal.
  • alert-dialog didn't compile: it was missing its Variants import.
  • shellui add now adds @using ….Components.UI.Variants / .Components.Models to _Imports.razor once files in those namespaces exist.
  • init writes h1:focus { outline: none; }, restoring the stock rule that FocusOnNavigate relies on (lost when init overwrites app.css).
  • Radar chart tooltips were pinned to the top of the chart and now follow the pointer (FollowCursor).
  • TreeView hover looked identical to selected; hover now uses bg-muted and rows no longer touch.

Demo

  • New pages: a "New in 0.4" section on the home page and at /components/new.
  • Loaders grid: shows all 23 variants.
  • Brought up to date through the CLI: SidebarProvider, shellui.js and the chart files (which added wwwroot/css/charts.css) were stale and are now reinstalled. This fixes Ctrl+B.
  • Ctrl+K: the header uses CommandPalette. A leftover layout Ctrl+K handler that closed the palette 33 ms after opening is removed.
  • EmptyState: "Upload File" now opens a file picker.
  • app.css: rebuilt in Release, so it's minified.

Docs

  • Roadmap: the 0.4 components are added and the ShellDocs items marked done; the composable Select/ContextMenu/NavigationMenu/Carousel parts are listed as package-only.
  • Counts and dependencies: registry counts are updated across the docs, and the dependency table has the new entries.

Tests (129 passing, up from 107)

  • Sync: template/package sync for all new components and command.
  • Shortcuts: accept Ctrl or ⌘.
  • _Imports wiring: RequiredImports adds the right namespaces.
  • init CSS: keeps the h1:focus rule.
  • Existing sweeps now cover the new components: syntax, dependency graph, Class parameter, no external icon fonts.

Test plan

  • Clean Release build of ShellUI.slnx: 0 warnings, 0 errors
  • dotnet test: 129/129
  • Fresh dotnet new blazor + init + add with all 90 components: builds with 0 warnings, _Imports updated automatically
  • Parent-only install (toggle-group timeline tree-view chat command qr-code) pulls in all hidden sub-parts and QRCoder
  • Demo checked in the browser: new components, toggle and tree state, chat with real Enter/Shift+Enter keypresses, image viewer, Escape on all dialog types, Ctrl+K (real keypress) and Ctrl+B on the dashboard layout, loader geometry, logo loader in light and dark themes, radar tooltip placement
  • CI

Follow-ups

  • Reconcile the three drifted copies of each component (package, CLI templates, demo), then generate templates from the package at build time.
  • Popover and Dropdown: Escape handling, and click-outside for Dropdown.
  • feat/init-dashboard: wire dashboard layouts on init / add.

Shewatipa Tseisi added 7 commits September 27, 2026 14:29
Added new components including StatCard, Chat, ButtonGroup, ToggleGroup, InputGroup, NumberInput, TreeView, Timeline, QrCode, ImageViewer, AspectRatio, and Kbd. Updated the ComplexComponentsDemo and created a NewComponentsDemo to showcase these additions. Enhanced the App layout with a new CSS link for charts and improved the command palette functionality. Updated Home and Components pages to reflect the new components and their usage.
Updated the component registry to reflect the current totals: 194 entries, including 90 direct install targets and 104 hidden dependency entries. Adjusted various documentation files to ensure consistency with the new counts, including README, architecture, CLI syntax, and contributing guidelines. This change enhances clarity for users regarding available components and their classifications.
…component versions

- Added QRCoder package reference to the BlazorInteractiveServer project.
- Updated shellui.json to include a new LayoutPath and updated versions for several components to 0.3.0-rc.2.
- Introduced new CSS file for chart styles to enhance visual consistency across chart components.
- Introduced new components: AspectRatio, ButtonGroup, Chat, ChatInput, ChatMessage, ChatTemplate, CommandModels, CommandPalette, Command, DrawerContent, ImageViewer, InputGroup, Kbd, Loading, and NumberInput.
- Updated existing templates to improve functionality and user experience, including enhancements to the DialogContent and DrawerContent templates for better accessibility and focus management.
- Added necessary namespaces and parameters to support new features and improve integration with existing components.
- Introduced `RequiredImportsTests` to validate namespace imports for component files.
- Added `InputCssTests` to ensure focus outline behavior is correctly applied in the CSS templates.
- Expanded `TemplateSyncTests` with additional data entries for new UI components, enhancing template validation coverage.
- Added multiple new UI components to the ComponentRegistry, including Kbd, AspectRatio, ButtonGroup, ToggleGroup, InputGroup, NumberInput, StatCard, Timeline, TreeView, QrCode, ImageViewer, ChatMessage, ChatInput, and CommandModels.
- Updated the GetComponentContent method to include content retrieval for the newly added components, enhancing the overall functionality and usability of the component library.
- Added `EnsureImports` method to manage and update necessary namespace imports for component files dynamically.
- Introduced `RequiredImports` method to determine required namespaces based on file paths, improving the integration of components with sub-namespaces.
- Updated the import handling logic to append missing imports to the `_Imports.razor` file, ensuring that all required namespaces are included for proper functionality.
@Shewart
Shewart merged commit b3b5797 into main Sep 27, 2026
1 check passed
@Shewart
Shewart deleted the feat/v0.4-components branch September 27, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant