Commit Graph

257 Commits

Author SHA1 Message Date
Fredrik Adelöw 8e7f7249e7 chore: regenerate knip reports
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 12:14:47 +02:00
Patrik Oldsberg ba9717cf70 Merge pull request #33913 from drodil/config_schemas
fix: replace old config schemas for extensions and blueprints
2026-04-15 14:21:47 +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
Hellgren Heikki cad156e797 fix: replace old config schemas for extensions and blueprints
to overcome a lot of warnings given during for example testing where
these extensions are used.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-04-15 12:55:27 +03:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
Patrik Oldsberg d3627319a1 Merge pull request #33836 from backstage/rugvip/explore-standard-schema-decoupling
frontend-plugin-api: decouple zod dependency using Standard Schema
2026-04-14 12:27:53 +02:00
Patrik Oldsberg e4804abb44 Add DialogApi.open() and deprecate show/showModal
The existing show() and showModal() methods render dialog chrome (a
Material UI Dialog) as part of the implementation. This causes focus
trap conflicts when the caller's content uses components from a
different design library (e.g. Backstage UI).

The new open() method renders the caller's content as-is, without any
dialog chrome. The caller provides the full dialog component including
overlay, backdrop, and surface, making the API design-library-agnostic.

The deprecated show/showModal are re-implemented on top of open() with
a MUI Dialog wrapper for backward compatibility, and emit console
warnings when used.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-12 11:14:02 +02:00
Patrik Oldsberg 1ef7954725 Migrate catalog-react and app blueprints to configSchema
Move EntityCardBlueprint and EntityContentBlueprint to the new
`configSchema` option using zod v3, and AppLanguageApi to zod v4.
Fix config schema merge in `makeWithOverrides` when mixing
`configSchema` and deprecated `config.schema` sources.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:39:50 +02: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
Patrik Oldsberg 014ba202ba Merge pull request #33670 from backstage/rugvip/app-routes-redirect-config
plugin-app: add redirect config to app/routes extension
2026-03-30 16:40:37 +02:00
Patrik Oldsberg baa72405ac Fix root path redirect matching all routes
Special-case `from: '/'` in redirect config to use an exact path match
instead of the `/*` wildcard, which would match the entire app.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 14:46:18 +02:00
Charles de Dreuille 3bd5a0c7b8 Improve Toast setup
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 13:13:23 +01:00
Charles de Dreuille 4dab043bd5 Update Toast.stories.tsx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 12:05:12 +01:00
Charles de Dreuille cf2de9c8b8 Update Toast.stories.tsx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:56:42 +01:00
Charles de Dreuille b651807e56 fix(storybook): replace require() with ESM import in Toast stories
The RealAlertApiStory component used require('@backstage/core-plugin-api')
inside the function body. Vite bundles Storybook as ESM, where require is
not available at runtime, causing a ReferenceError. Replace with a
standard top-level import.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-03-30 11:55:27 +01:00
Patrik Oldsberg e5baa20a1b plugin-app: add redirect config to app/routes extension
Allow users to configure URL redirects on the app/routes extension
through app-config. Redirects are specified as an array of {from, to}
path pairs in the extension config schema.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 00:34:56 +02:00
github-actions[bot] c1b510cabb Version Packages (next) 2026-03-24 14:54:00 +00:00
Johan Persson d66a3ec9ab feat(frontend-plugin-api): add titleRouteRef to PageBlueprint
Add `titleRouteRef` to `PageLayoutProps` so the plugin header title
links back to the plugin root. `PageBlueprint` resolves it from
`plugin.routes.root` with fallback to `params.routeRef`.

- PageLayout swap resolves the title link via a conditional child
  component that calls `useRouteRef` only when a route ref exists
- Header actions get stable React keys via `cloneElement`

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-20 09:05:23 +01:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
Patrik Oldsberg 6a565f6880 Merge pull request #33389 from backstage/rugvip/nfs-header-page-migration
plugins: migrate NFS pages to HeaderPage
2026-03-17 22:16:12 +01:00
Patrik Oldsberg 6211dd871a Move sub-page tab href resolution to PageLayout
Move the logic for resolving relative sub-page tab hrefs from
PageBlueprint into the app PageLayout component, where it belongs
as an app-level rendering concern.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 20:33:11 +01:00
Gabriel Dugny a49a40d314 Proper /v3 usage everywhere
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2026-03-17 16:48:42 +01:00
Patrik Oldsberg 5f3f5d298b app-react: keep nav rest results in sync
Make nav rest results stay live when additional items are taken later in the same render, which lets app nav layouts place specific items after collecting the remaining sidebar entries.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:20:22 +01:00
Patrik Oldsberg aa29b508d1 Migrate NFS pages to HeaderPage
Always render the plugin header for page blueprints and move page-level actions into the Backstage UI header pattern for affected NFS pages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:38 +01:00
Patrik Oldsberg 305f4edf00 Fix toast surface tokens for current BUI theme
Update the toast surface and interaction styles to use the current overlay token set so notifications render with the intended background and focus treatment after the BUI token changes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:45:23 +01:00
Patrik Oldsberg c7201754af Merge master and update toastApiRef to new ApiRef pattern
Resolve merge conflicts from master introducing the new ApiRef_2 type
pattern with `.with()` builder. Update toastApiRef to use the same
`createApiRef<T>().with({ id, pluginId })` pattern as all other API
refs, and regenerate API reports.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:45:22 +01:00
Patrik Oldsberg 11328fc31b frontend-plugin-api: fix alpha API report exports
Re-export the PluginWrapperBlueprint support types from the alpha entrypoint and regenerate the affected API reports so verify passes after the rebase.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:37:17 +01:00
Patrik Oldsberg 00982b947d repo: refresh phased app API reports
Update generated API reports to match the phased app and predicate changes, and drop the stray core-compat-api dependency addition that would otherwise require its own changeset.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg 72dd26a3a6 frontend-app-api: route sign-in errors through app boundary
Rethrow sign-in bootstrap failures from inside the prepared sign-in tree so the app root extension boundary handles them instead of createApp keeping its own error state. This keeps bootstrap error handling aligned with the rest of the extension tree.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:01:48 +01:00
aramissennyeydd 4958e320b6 fix other lint warning
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2026-03-17 13:00:39 +01:00
Patrik Oldsberg 00381fa7b2 frontend-app-api: add session boundary app initialization
Instantiate the app shell up to app/root.children during sign-in, then rebuild the full tree after sign-in without cloning the app tree.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:00:19 +01:00
Patrik Oldsberg fc08a9b4dd plugin-app: keep identity proxy in prepared finalize flow
This fixes the prepare/finalize sign-in flow so finalized apps continue to use AppIdentityProxy, including protected-mode cookie auth behavior. It also avoids setting guest identity in protected mode when no sign-in page is configured, which lets pre-captured identities remain intact.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 12:59:58 +01:00
Patrik Oldsberg ed3483e560 Merge remote-tracking branch 'origin/master' into bui-toast
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

# Conflicts:
#	packages/frontend-defaults/src/createPublicSignInApp.test.tsx
#	yarn.lock
2026-03-17 12:05:59 +01:00
Patrik Oldsberg ac560a24cb Regenerate API reports
Update downstream app plugin API reports after the ApiRef type changes affected generated union output.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 11:27:46 +01:00
Patrik Oldsberg e8d410d915 Regenerate API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 29b87812ba Regenerate API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 3f36ce1257 Clarify icon sizing rules for NFS icons
Document the IconElement sizing contract, ensure deprecated icon component registrations inherit size correctly, and add changesets for the affected icon migration packages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg ed8d9ce67c further NFS icon migration and alignment
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-16 21:39:40 +01:00
Johan Persson 42f8c9b2b8 feat(ui): centralize routing in BUIProvider (#33267)
* feat(ui): centralize routing in BUIProvider

BUIProvider now auto-detects React Router context and provides
client-side navigation for all BUI components. Retired
InternalLinkProvider and added BUIRouterProvider as a public
export for integration use.

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

* feat(plugin-app): move BUIProvider inside app router

Moved BUIProvider from wrapping AppRouter to being a child inside
it, so it detects the React Router context and provides client-side
routing for all BUI components.

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

* feat(core-app-api): add BUIRouterProvider to legacy app router

Added BUIRouterProvider inside the legacy AppRouter to provide
React Aria routing for all BUI components.

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

* docs(ui): update BUIProvider documentation for routing

Updated installation docs to cover BUIProvider's routing role
and the requirement to render it inside a React Router context.

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

* refactor(ui): move BUIProvider from analytics to provider directory

BUIProvider now handles both analytics and routing, so it no longer
belongs in the analytics directory.

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

* fix(ui): add BUIProvider to storybook stories with MemoryRouter

Added BUIProvider inside MemoryRouter in all stories that use
routing, so client-side navigation works in Storybook.

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

* fix(plugin-app): move BUIProvider inside RouterComponent

Moved BUIProvider to wrap all content inside RouterComponent
so that extraElements (like dialogs) also get BUI context.

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

* refactor: replace BUIRouterProvider with BUIProvider in legacy app

Use BUIProvider directly inside the legacy AppRouter instead of a
separate BUIRouterProvider export. Removes BUIRouterProvider from
the public API of @backstage/ui.

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

* refactor(ui): inline routing logic into BUIProvider

Removed the routing/ directory and inlined the RouterProvider
setup directly into BUIProvider since it's the only consumer.

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

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-16 18:56:24 +01:00
Patrik Oldsberg 9508514116 frontend-plugin-api: promote PluginWrapper API to stable with useWrapperValue hook
Promote PluginWrapperApi, pluginWrapperApiRef, PluginWrapperBlueprint, and
the new PluginWrapperDefinition type from @alpha to @public. Add getRootWrapper()
method to PluginWrapperApi and integrate the useWrapperValue hook pattern from
the rugvip/plugin-wrapper branch, allowing plugin wrappers to share stateful
values via a hook that runs once in the root wrapper and is distributed to all
wrapper instances via useSyncExternalStore.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:19:57 +01:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
Johan Persson 12d8afe82d feat(ui): add analytics event tracking to BUI navigation components (#33150)
* feat(ui): add analytics types

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

* feat(ui): add useAnalytics hook with dev-mode swap guard

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

* feat(ui): add AnalyticsProvider, getNodeText, and analytics barrel exports

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

* feat(ui): integrate analytics into defineComponent and useDefinition

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

* feat(ui): add analytics tracking to Link component

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

* feat(ui): add analytics tracking to ButtonLink component

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

* feat(ui): add analytics tracking to Tab component

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

* feat(ui): add analytics tracking to MenuItem component

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

* feat(ui): add analytics tracking to Tag component

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

* feat(ui): add analytics tracking to Table Row component

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

* feat(ui): widen getNodeText to accept render functions

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

* chore(ui): update API reports

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

* chore: add changeset for BUI analytics

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

* fix(ui): chain MenuItem onAction with user-provided handler instead of overwriting

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

* chore(ui): address review feedback — changeset wording and types docs

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

* feat(core-app-api): wire AnalyticsProvider from @backstage/ui into app shell

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

* feat(plugin-app): add AnalyticsProvider wrapper extension for BUI components

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

* chore: update API reports

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

* chore: update API reports for core-components and scaffolder

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

* docs(ui): add analytics documentation and noTrack prop to component docs

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

* chore: update yarn.lock

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

* feat(plugin-app): move AnalyticsProvider into AppRoot directly

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

* chore: format installation docs

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

* fix(ui): call user onPress before analytics in Tag component

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

* refactor(ui): replace AnalyticsProvider with generic BUIProvider

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

* chore: replace remaining AnalyticsProvider references with BUIProvider

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

* fix(plugin-app): import useAnalytics from frontend-plugin-api

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

* docs(ui): improve noTrack prop description

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

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-06 14:45:57 +01:00
github-actions[bot] db0d171511 Version Packages (next) 2026-03-03 14:16:49 +00:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
Patrik Oldsberg 909c742c18 Stabilize translation API in the new frontend system
Remove @alpha tags from translation-related types and switch all
translation API imports in new frontend system packages to use stable
paths from @backstage/frontend-plugin-api instead of
@backstage/core-plugin-api/alpha.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-23 21:23:05 +01:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
Patrik Oldsberg 26135af5b3 app: stop exporting toast display
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 15:14:29 +01:00
Patrik Oldsberg da5a35a38c frontend-plugin-api,app: move toast forwading to be internal
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 15:01:16 +01:00
Charles de Dreuille 2f4e800d66 Fix tests
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-02-17 14:39:11 +01:00