Skip to content

Auto-generate JS component Dependencies tables - #42725

Merged
mdo merged 1 commit into
v6-devfrom
mdo/js-dependencies-tables
Jul 28, 2026
Merged

Auto-generate JS component Dependencies tables#42725
mdo merged 1 commit into
v6-devfrom
mdo/js-dependencies-tables

Conversation

@mdo

@mdo mdo commented Jul 21, 2026

Copy link
Copy Markdown
Member
  • Add site/src/libs/js-dependencies.ts, which resolves a component's dependency list by walking its real import graph from js/src/<component>.ts (skipping type-only imports); the docs tables now stay in sync with the source automatically.
  • Add a <JsDependencies component="…" /> shortcode that renders the File/Description table, matching the existing BsTable markup and .table-stacked behavior.
  • Add a ### Dependencies section to every JavaScript-backed component page (alert, button, carousel, chips, collapse, combobox, datepicker, dialog, drawer, nav-overflow, otp-input, range, scrollspy, password-strength, tab, toasts, toggler).
  • Migrate the existing hand-written tooltip, popover, and menu tables onto the shortcode; these now list the complete transitive set (previously missing data.ts, config.ts, selector-engine.ts).
  • Document the workflow in AGENTS.md; the build throws if a new source file or package lacks a description label.

Stacked on #42724 (the tables reference the .ts sources introduced there); retarget to v6-dev once that merges.

@mdo
mdo requested a review from a team as a code owner July 24, 2026 21:56
@mdo
mdo force-pushed the mdo/js-dependencies-tables branch from 0c4cfea to 3c02814 Compare July 28, 2026 05:36
Base automatically changed from issue-42620 to v6-dev July 28, 2026 05:51
Derive each docs "Dependencies" table from the component's real import
graph (site/src/libs/js-dependencies.ts) via a new <JsDependencies>
shortcode, so the tables stay in sync with the source automatically
instead of being hand-maintained. Add the table to every JavaScript-
backed component page and migrate the existing tooltip, popover, and
menu tables onto the shortcode.
@mdo
mdo force-pushed the mdo/js-dependencies-tables branch from 3c02814 to bd9059f Compare July 28, 2026 06:05
@mdo
mdo merged commit 9d940d2 into v6-dev Jul 28, 2026
12 checks passed
@mdo
mdo deleted the mdo/js-dependencies-tables branch July 28, 2026 06:07
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