Skip to content

html: distribute Demo exports under a dedicated /demos import path #5864

@kirchoni

Description

@kirchoni

Problem

The html package currently exports components with a Demo suffix (e.g. ButtonDemo, GridDemo, etc.) alongside the official spec components from its main entry point. These Demo components are not the same as the spec components — they serve a different purpose (visual test scenarios, showcases).

Projects like SakurAI that do import * from "@progress/kendo-themes-html" (or similar barrel imports) unintentionally pick up all Demo exports in addition to the official spec components. SakurAI only needs the spec components — the Demos pollute its namespace and can cause confusion or incorrect usage.

Meanwhile, ThemeBuilder only needs the Demo components, not the specs.

Proposed Solution

Introduce a dedicated /demos sub-path export (e.g. @progress/kendo-themes-html/demos) so that:

  • The main index (/) exports only spec components.
  • The /demos sub-path exports only Demo components.

Migration Plan (two steps)

Step 1 — Dual export (non-breaking)

  • Export Demo components from both the main index (/) and the new /demos sub-path.
  • If feasible, mark the Demo re-exports in the main index as @deprecated (via JSDoc / TSDoc) so consumers get IDE warnings nudging them toward the new /demos path.
  • This gives downstream projects time to update their imports without breakage.

Step 2 — Remove Demos from main index (breaking)

  • Once all known consumers have migrated their Demo imports to the /demos path, remove the Demo re-exports from the main index.
  • After this step:
    • Main index → spec components only
    • /demos → Demo components only

Affected Consumers

Project Needs Current state Action needed
SakurAI Spec components only (no Demos) Gets everything via barrel import No change needed — Step 2 will clean up the index automatically
ThemeBuilder Demo components only Imports from main index Switch Demo imports to /demos path before Step 2

Acceptance Criteria

  • /demos sub-path export is available and contains all Demo components
  • (Step 1) Main index still re-exports Demos, ideally with @deprecated annotations
  • (Step 2) Main index no longer exports Demo components
  • ThemeBuilder imports updated to use /demos path before Step 2 lands

Metadata

Metadata

Assignees

Labels

EnhancementNew feature of an existing functionality or an improvement of an existing functionality.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions