Commit Graph

20 Commits

Author SHA1 Message Date
Johan Persson 552e4b2d43 docs-ui: add missing component slugs and fix changelog sync
Add `badge`, `slider`, and `use-table` to the Component type so
the changelog sync script recognizes them. Add `useTable` special
case mapping in the sync script, and include `use-table` in the
Table docs page changelog.

Also fix CHANGELOG.md to use `Slider` instead of `RangeSlider`
as the affected component name.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-16 09:26:39 +02:00
Johan Persson 7b77d918ca fix(docs-ui): strip backticks from affected component names in changelog sync
Vale validation can require backticks around component names like
`useTable` in changesets. The sync script now strips backticks so
these names are matched correctly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-26 10:14:46 +01:00
Johan Persson d566823908 fix(docs-ui): improve changelog sync script component detection
Broaden "Affected components" regex to handle all formats found in
CHANGELOG.md (bold, plain, and typo variants). Align unknown component
detection to use extraction-time tracking instead of re-parsing
stripped descriptions. Deduplicate component arrays after mapping.
Add --skip-prs flag and Grid.Item special case.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-18 16:45:54 +01:00
Charles de Dreuille ed7b4ad052 docs-ui: replace CSS sync script with postcss-import
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-02-20 07:32:10 +01:00
Charles de Dreuille 62a3add97f Fix some other issues
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-29 15:15:23 +00:00
Charles de Dreuille 29006ec722 Update sync-css script to output to src/css instead of public
Changed the CSS sync script to output theme files to src/css/ instead
of public/, matching the new location for theme CSS files.

Updated variable names from publicPath to outputPath for clarity and
updated log messages to reflect the correct output location.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-29 15:14:03 +00:00
Fredrik Adelöw f02219a054 Merge pull request #32516 from backstage/freben/nodecolon
Add a rule for the use of `node:` prefix on native imports
2026-01-27 14:17:14 +01:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
Charles de Dreuille 95c70b1285 Update sync-changelog.mjs
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-26 10:47:32 +00:00
Charles de Dreuille 988b46ff13 Update sync-changelog.mjs
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-26 10:37:20 +00:00
Charles de Dreuille 9d712d3e80 Remove old format support
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-26 10:26:47 +00:00
Charles de Dreuille 4926084387 Improve script
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-26 10:12:10 +00:00
Charles de Dreuille 8adc108bc7 Remove duplicates
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-23 22:56:08 +00:00
Charles de Dreuille 3aa908fdce Cleaning up
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-23 22:42:14 +00:00
Charles de Dreuille 2f709e15ab Add new changelog structure
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-23 18:34:28 +00:00
Charles de Dreuille 3342b2af29 Add new changelog format for BUI
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-01-23 15:10:25 +00:00
Johan Persson 67f5310557 feat(docs-ui): add automated changelog sync from @backstage/ui
Adds automated synchronization of component changelogs from
@backstage/ui package to the documentation site, eliminating
manual changelog maintenance.

The sync script parses CHANGELOG.md using remark/unified, extracts
component-specific entries via "Affected components:" tags, and
generates per-version TypeScript files with preserved markdown
formatting. Includes GitHub API integration to automatically fetch
PR numbers for changelog entries.

Key features:
- Version comparison to sync only new releases
- Per-version file structure (changelogs/v0.2.0.ts, etc.)
- Markdown preservation via AST position slicing
- Component name mapping (PascalCase → kebab-case)
- Duplicate detection for idempotent syncing
- GitHub authentication via gh CLI or GITHUB_TOKEN
- Dry-run mode with preview

Usage:
```bash
yarn sync:changelog              # Sync new entries
yarn sync:changelog:dry-run      # Preview changes
```

Technical changes:
- Added scripts/sync-changelog.mjs (991 lines)
- Refactored changelog.ts to import per-version files
- Extracted types to separate types.ts file
- Added dependencies: @octokit/rest, unified (remark-parse via @mdx-js/mdx)
- Added documentation in README.md

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-11-17 11:37:39 +01:00
Charles de Dreuille c82dd4afe1 Cleanup
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2025-08-13 22:57:39 +02:00
Charles de Dreuille 0b3f0dcbc4 Fix docs
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2025-08-13 21:04:43 +02:00
Charles de Dreuille 5dde3bfe92 Move canon-docs to docs-ui
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2025-07-15 11:09:59 +01:00