Skip to content

CLI templates and package components drift apart #52

Closed

Description

@Shewart

Summary

Every component exists in up to three copies: the NuGet package (src/ShellUI.Components), the CLI templates (src/ShellUI.Templates) and the demo app. They have drifted: about 50 components differ between package and template, and the APIs don't always match. Examples:

  • Pagination: the template raises OnPageChange, the package CurrentPageChanged.
  • Sheet / Drawer: the CLI version needs Compositional="true", the package detects it.

Code written against the docs can then work with one install method and not the other.

Proposal

  1. Reconcile the differences component by component, keeping the better of each copy (worst offenders: AppSidebar, Toast, DatePicker, Carousel, HoverCard, ThemeToggle, TimePicker, Select, Popover, Stepper, Pagination, Tabs).
  2. Generate the CLI templates from the package components at build time, with rules for the namespace, the JS path (module import vs window.ShellUI) and the ClassName alias.
  3. Have the demo install everything through the CLI.
  4. Extend TemplateSyncTests to every component, with an explicit allowed-drift list.

This is large; it can be split into one PR per group of components.

Activity

  1. Shewart commented on Oct 18, 2026

    @Shewart
    ContributorAuthor

    Done in #63, #65, #66 and #68. 210 of 217 package components now match their CLI templates. The other 7 are recorded as allowed drift in TemplateSyncTests (CopyButton, CommandPalette, InputOTP and SidebarProvider reach JS differently; AppSidebar is the dashboard block; Resizable is #67), plus ShellUILogo, which has no template. The sync tests cover every reconciled component, so new drift fails CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions