101 Commits

Author SHA1 Message Date
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
Charles de Dreuille e6e796e45c chore(deps): update storybook monorepo to v10.4.0
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-05-15 10:29:56 +01:00
github-actions[bot] 42a2f56e61 Version Packages (next) 2026-05-12 18:28:01 +00:00
github-actions[bot] b0bc1e5cc9 Version Packages (next) 2026-05-05 14:57:07 +00:00
Charles de Dreuille 021b36800f fix(ui): collapse plugin header spacing before headers
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-30 09:33:18 +01:00
github-actions[bot] 7295193bb6 Version Packages (next) 2026-04-28 15:53:09 +00:00
Charles de Dreuille 030fb311aa Merge pull request #33997 from backstage/charlesdedreuille/act-355-header-improvements
feat(ui): add description, tags, and metadata props to Header
2026-04-24 13:59:56 +01:00
Patrik Oldsberg f635139ebc Limit @remixicon/react to versions below 4.9.0
The license changed in 4.9.0, so we need to cap the allowed version
range across all packages that depend on it.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-23 16:42:38 +02:00
Johan Persson 1a8de99d1d Add test suite for useDefinition hook in @backstage/ui (#34042)
* Add test infrastructure to @backstage/ui

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add resolveResponsiveValue tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition prop resolution and classes tests

Fixed a bug in useDefinition where passing null for classNameTarget or
utilityTarget was incorrectly defaulted to 'root' due to the nullish
coalescing operator treating null as falsy.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition data attributes tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add resolveDefinitionProps tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add processUtilityProps tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition bg system tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition utility style and analytics tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition href resolution tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add useDefinition options tests

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Wrap all useDefinition tests with BUIProvider

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Fix type errors in useDefinition tests

Use `as const satisfies ComponentConfig<any, any>` instead of
`as ComponentConfig<any, any>` to preserve literal types needed
by the conditional type machinery (DataAttributes, ResolveBgProps,
analytics intersection).

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Address review feedback in useDefinition tests

- Rename shadowed Wrapper to RouterWrapper in createRouterWrapper
- Fix inaccurate comment about splat vs non-splat routes
- Clarify misleading test name for provider data-bg behavior

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-23 16:00:09 +02:00
Charles de Dreuille 5a7495d072 chore: merge master and resolve package.json conflict
Both @braintree/sanitize-url (this branch) and @internationalized/date
(master) were added to packages/ui dependencies; keeping both.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-23 08:53:44 +01:00
Charles de Dreuille 251acf38d6 fix(ui): address further PR review comments
- Replace custom UNSAFE_HREF_RE with @braintree/sanitize-url for robust XSS prevention
- Shorten renderInlineMarkdown JSDoc
- Single-user with href: collapse two adjacent links into one wrapping avatar + name
- Multi-user list: use href ?? index:name as key to avoid collisions on duplicate names
- Status dot: replace role="img"/aria-label with aria-hidden (text label is sufficient)

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-23 08:52:08 +01:00
Charles de Dreuille ec109ce7fb fix(ui): replace custom regex with marked Lexer for inline description parsing
Uses marked's Lexer.lexInline() instead of a hand-rolled regex to parse
inline links in the Header description. marked ships CommonJS, has zero
dependencies, and is already used in the monorepo. This gives us a proper
token model that handles edge cases the regex could not.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-22 12:41:26 +01:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Charles de Dreuille 2deaa49120 fix(ui): replace react-markdown with inline parser to fix ESM Jest failures
react-markdown v8+ is ESM-only and breaks Jest in Node-role packages that
transitively import @backstage/ui via core-app-api. Since the Header
description only needs inline link support, a small regex-based parser
is sufficient and avoids the ESM dependency entirely.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-20 17:59:45 +01:00
Charles de Dreuille c96e2b3445 feat(ui): add description, tags, and metadata props to Header
Add three new props to the Header component:
- `tags`: renders a row of text/link items above the title, separated by
  3×3px circle dividers
- `description`: renders a markdown string below the title with inline
  link support via react-markdown
- `metadata`: renders key-value pairs below the description with 20px gaps

Also deprecates the `breadcrumbs` prop for future removal.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 09:48:56 +02:00
Charles de Dreuille 401916d55b feat(ui): add DateRangePicker component
Adds a new DateRangePicker component to @backstage/ui built on React Aria,
featuring a custom field group with two DateInput fields and a calendar
trigger, a RangeCalendar popover with proper range selection visuals
(solid circles for start/end, transparent solid fill for in-range cells
with row-boundary rounding), and full BUI token usage including bg
consumer auto-increment. Includes Storybook stories and a docs-ui page.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:38:19 +02:00
Johan Persson e2d9831352 fix: clamp React Aria dependency ranges to patch-only updates
Changed version ranges for react-aria, react-aria-components, and
react-stately from `^` (minor) to `~` (patch) across all consuming
packages to prevent unintended minor version upgrades.

Also aligned app-visualizer's react-aria-components from 1.14 to 1.17.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-17 11:49:34 +02:00
Fredrik Adelöw 3846774beb chore: add missing transitive dependencies
Add dependencies that were only available transitively through other
packages but were being imported directly:

- csstype and copy-to-clipboard in @backstage/core-components
- @storybook/react-vite in @backstage/ui
- react-aria-components in @backstage/plugin-notifications
- @octokit/core in @backstage/plugin-scaffolder-backend-module-github
- @rjsf/utils in example-app-legacy

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 13:28:21 +02:00
Johan Persson d1be10cb89 fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
React Aria Components v1.17.0 consolidated individual packages
into monopackages, dropping `@react-types/table` as a transitive
dependency. This caused `TS2307` errors in new app installations
where `react-aria-components@1.17.0` was resolved.

Migrate all imports from individual `@react-aria/*` and
`@react-stately/*` packages to the `react-aria` and
`react-stately` monopackages in both `@backstage/ui` and
`@backstage/plugin-app`, and update minimum dependency versions
accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-15 12:21:23 +02:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
github-actions[bot] 6c10d88c13 Version Packages (next) 2026-04-07 15:30:58 +00:00
github-actions[bot] a2cb332e25 Version Packages (next) 2026-03-31 15:30:51 +00:00
Fredrik Adelöw 8a2a81fa1e Merge pull request #33687 from backstage/freben/bump-glob-rollup
Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities
2026-03-31 16:06:22 +02:00
Fredrik Adelöw 2e5c5f85b2 Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 23:13:08 +02:00
Fredrik Adelöw 0419acede2 Revert "Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities"
This reverts commit 6d76b1729b.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 23:11:17 +02:00
Fredrik Adelöw 6d76b1729b Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 23:10:09 +02:00
Fredrik Adelöw d06ba3a58e Revert "Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities"
This reverts commit 91b359ee5f.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 23:05:11 +02:00
Fredrik Adelöw 91b359ee5f Bump glob to v13 and rollup to v4.59+ to fix security vulnerabilities
Addresses the high severity rollup path traversal vulnerability
(GHSA-mw96-cpmx-2vgc) and the glob security advisory by upgrading
all instances across the monorepo. Updates code that used the legacy
callback-based glob API to use the modern promise/sync API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 23:02:37 +02:00
renovate[bot] c368cf3db7 chore(deps): update dependency @types/use-sync-external-store to v1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-30 10:43:01 +00:00
Charles de Dreuille dc009ed8a9 Improve BUI manifest
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:02:31 +01:00
github-actions[bot] c1b510cabb Version Packages (next) 2026-03-24 14:54:00 +00:00
Patrik Oldsberg 7d86248253 Merge pull request #33424 from backstage/rugvip/ui-react-aria-deps
ui: add React Aria and React Stately dependencies
2026-03-18 21:18:54 +01:00
Patrik Oldsberg 4b95f50f3b Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-18 17:32:21 +01:00
Patrik Oldsberg 0257ada6de ui: add React Aria and React Stately dependencies
Add `react-aria`, `@react-aria/interactions`, `@react-stately/layout`,
and `@react-stately/overlays` as dependencies, and `react-stately` as a
dev dependency to `@backstage/ui`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-18 16:21:19 +01:00
Patrik Oldsberg bed3307b72 Drop React 17 support from @backstage/ui
Updated the peer dependency ranges for `react`, `react-dom`, and
`@types/react` in `packages/ui` to require React 18+, removing the
`^17.0.0` range.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-18 16:02:42 +01:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
Fredrik Adelöw a41eff026f Merge pull request #33251 from backstage/renovate/globals-17.x
chore(deps): update dependency globals to v17
2026-03-12 10:25:46 +01:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
renovate[bot] 9599697048 chore(deps): update dependency globals to v17
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 03:44:26 +00:00
github-actions[bot] db0d171511 Version Packages (next) 2026-03-03 14:16:49 +00:00
Johan Persson 154492c05f chore(ui): add use-sync-external-store dependency
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
Patrik Oldsberg 903a854ebc Merge branch 'master' into runtime-module-federation-enablement
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-12 23:46:00 +01:00
github-actions[bot] 7c41134684 Version Packages (next) 2026-02-10 16:14:59 +00:00
Patrik Oldsberg ae08712748 Fix repo fix to not add typesVersions for non-script exports
Only CSS and other non-script, non-JSON exports should be excluded from
typesVersions. The package.json export still needs to be included.

Also preserves field order when updating existing typesVersions.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 09:23:12 +01:00
Patrik Oldsberg 30053d9676 Remove invalid typesVersions entries for non-script exports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:51:54 +01:00
Patrik Oldsberg a51c633f35 Fix packages/ui/package.json exports configuration
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 20:16:10 +01:00
Patrik Oldsberg 4f9d980943 cli: Add support for CSS exports in package build
This adds support for CSS entry points in package exports. When a package
declares a CSS file in its exports field, the CLI will now automatically
bundle it during `backstage-cli package build` and rewrite the export
path from src/ to dist/ at publish time.

The CSS bundling uses lightningcss to resolve @import statements and
preserves @layer declarations that would otherwise be stripped during
bundling.

This allows packages like @backstage/ui to use the standard build command
instead of custom build scripts for CSS bundling.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 13:53:05 +01:00
Paul Schultz a7e0d506a2 feat: enable react router feature flags for v7
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2026-02-03 09:37:11 -06:00