Commit Graph

216 Commits

Author SHA1 Message Date
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 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 cfb4177cd8 review fixes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 13:42:26 +01:00
Patrik Oldsberg 40dfe4a00f frontend-plugin-api: drop match strategy from PageLayout tabs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 13:14:45 +01:00
Patrik Oldsberg b7ae1243e0 frontend-plugin-api: make header actions a element[]
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 12:35:20 +01:00
Patrik Oldsberg 31222cc921 app: use PluginHeader
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:58:16 +01:00
Patrik Oldsberg 92d77a98ff rename header action to plugin header action
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:37 +01:00
Patrik Oldsberg 85261a3b3c frontend-plugin-api: use react element for header action
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:35 +01:00
Patrik Oldsberg 5920062fcc app-react: API cleanup and component utility for nav items
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:34 +01:00
Patrik Oldsberg 1fcffa72e3 app-react: new API for consuming nav items that detects page extensions
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:30 +01:00
Patrik Oldsberg 5fa6797b95 app: remove a bunch of wrapping page elements
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:29 +01:00
Patrik Oldsberg 7b82dca42b app: hide plugin header if there are no subpages for now
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:29 +01:00
Patrik Oldsberg 4d2b2642c0 frontend-plugin-api: added noHeader param for page blueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:28 +01:00
Patrik Oldsberg da2015bb3b prettier and API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:27 +01:00
Patrik Oldsberg 133dff7320 app: fix new PageLayout layout
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:24 +01:00
Patrik Oldsberg d6de6069aa frontend-plugin-api: switch to just PageHeaderAction
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:24 +01:00
Patrik Oldsberg 4738047ab7 frontend-plugin-api: intial page and plugin header actions
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:24 +01:00
Patrik Oldsberg abd0a5ad52 frontend-plugin-api: migration to IconElement + API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:23 +01:00
Patrik Oldsberg 3fd3d82360 app: remove page layout gap
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:23 +01:00
Patrik Oldsberg e1f22f2d15 plugin icons and titles
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:22 +01:00
Patrik Oldsberg 4b996d05d3 frontend-plugin-api: initial support for subpages
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:22 +01:00
Patrik Oldsberg d56d9eae3c Explicitly disable v7 future flags to suppress warnings
Rather than removing the future prop, set v7_relativeSplatPath and
v7_startTransition to false so react-router stops logging deprecation
warnings.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-13 15:09:23 +01:00
Patrik Oldsberg 47d064a51b Revert react-router v7 future flags from #31818
Roll back the v7_relativeSplatPath and v7_startTransition future flags
and the Outlet-based route structure, keeping the version bump to
react-router-dom@^6.30.2.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-12 10:03:13 +01:00
github-actions[bot] 7c41134684 Version Packages (next) 2026-02-10 16:14:59 +00: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
github-actions[bot] 1ea737c1e2 Version Packages (next) 2026-02-03 14:24:29 +00:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
Fredrik Adelöw 69d880e171 Bump to latest zod
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:52:02 +01:00
Patrik Oldsberg c38b74df5f frontend-plugin-api: complete deprecation of app blueprints
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-23 11:41:16 +01:00
Patrik Oldsberg 7edb810248 frontend-plugin-api: add new internal option for extension inputs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-23 11:41:15 +01:00
github-actions[bot] 2e902e7b43 Version Packages 2026-01-20 16:40:05 +00:00
Patrik Oldsberg a1be5e1770 review fixes for plugin wrapper blueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-20 00:11:46 +01:00
Patrik Oldsberg f9d5756354 app: add missing plugin wrapper API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-19 14:14:23 +01:00
Patrik Oldsberg 85c8156984 frontend-plugin-api: simplify deprecation of AppRootWrapperBlueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-19 14:14:21 +01:00