74233 Commits

Author SHA1 Message Date
Patrik Oldsberg 2dce1f23eb e2e-test: fix React 17 app bootstrap for new frontend apps
Use the generated app root API when switching the scaffolded app to React 17 so the new frontend app still type-checks in E2E.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:18:00 +01:00
Patrik Oldsberg 9603f9c6c0 cli: fix frontend plugin template dev dependency
Add the missing frontend dev utils package so newly scaffolded frontend plugins compile in the create-app E2E flow.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:17:59 +01:00
Patrik Oldsberg 7cd15e7c90 create-app: fix next-app template formatting
Align the next-app template output with the scaffolded app Prettier config so the default app E2E checks pass.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:17:18 +01:00
Patrik Oldsberg 35686dc9f7 cli: add frontend template filtering coverage
Clarify the legacy frontend plugin template label and lock in template selection behavior for legacy and new frontend system apps.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:17:18 +01:00
Patrik Oldsberg 08d9770715 cli: Rename frontend plugin templates and add auto-detection
Renamed the CLI templates for frontend plugins:
- new-frontend-plugin → frontend-plugin
- new-frontend-plugin-module → frontend-plugin-module
- frontend-plugin (legacy) → legacy-frontend-plugin

Added auto-detection logic that checks packages/app/package.json to
determine which frontend system the app uses. When using default
templates, only the appropriate frontend plugin template is shown:
- Apps with @backstage/frontend-defaults see the new system templates
- Apps with @backstage/app-defaults see the legacy template

Both templates display as "frontend-plugin" to users, so existing
workflows are preserved while automatically using the correct template.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 16:17:17 +01:00
Fredrik Adelöw c607020290 Merge pull request #33398 from backstage/freben/fix-cli-module-build-coverage
fix(cli): exclude __fixtures__ from coverage in cli-module-build
2026-03-17 16:16:58 +01:00
Patrik Oldsberg a6735c33b1 create-app: Make new frontend system the default
The new frontend system is now the default template when creating a new
Backstage app. The previous `--next` flag has been replaced with a
`--legacy` flag that can be used to create an app using the old frontend
system instead.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 16:12:27 +01:00
Patrik Oldsberg f7777a6ec8 revert: keep scaffolder on the old layout
Back out the scaffolder NFS header migration for now so the create and related pages stay on the existing layout until the follow-up scaffolder-specific work is ready.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:52:42 +01:00
Fredrik Adelöw 85346e51b2 chore(cli): remove unused coveragePathIgnorePatterns from @backstage/cli
The __fixtures__ directory that required this exclusion was moved to
@backstage/cli-module-build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-17 15:40:41 +01:00
Patrik Oldsberg b02ed6ee79 docs: replace core-plugin-api and core-app-api references with frontend-plugin-api
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:39:42 +01:00
Fredrik Adelöw 64b7132d40 fix(cli): exclude __fixtures__ from coverage in cli-module-build
When the transform tests were moved from @backstage/cli to
@backstage/cli-module-build, the coveragePathIgnorePatterns config
was not carried over. This caused test failures in CI when running
with --coverage, as Jest tried to instrument the fixture files
containing fake node_modules packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-17 15:37:24 +01:00
Patrik Oldsberg 97411ebb0c Merge pull request #32542 from backstage/bui-toast
feat: Introduce ToastApi for rich notifications in the new frontend system
2026-03-17 15:34:16 +01:00
Johan Persson c548a0ff86 refactor(catalog,api-docs): migrate entity table cards to BUI (#33260)
* feat(catalog-react): add EntityDataTable and EntityRelationCard components

Add EntityDataTable (BUI Table wrapper for entity data) and
EntityRelationCard (card shell + data fetching + table) as shared
building blocks for entity relation table cards. Includes BUI column
factories, column presets for common entity types, and a new
translation key for the empty state help link.

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

* refactor(catalog): migrate 8 entity table cards to EntityRelationCard

Rewrite HasComponentsCard, HasResourcesCard, HasSubcomponentsCard,
HasSubdomainsCard, HasSystemsCard, DependsOnComponentsCard,
DependsOnResourcesCard, and DependencyOfComponentsCard as thin
wrappers around EntityRelationCard from catalog-react. Remove variant
and tableOptions props.

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

* refactor(api-docs): migrate 5 entity table cards to EntityRelationCard

Rewrite ConsumedApisCard, ProvidedApisCard, HasApisCard,
ConsumingComponentsCard, and ProvidingComponentsCard to use
EntityRelationCard from catalog-react. Add BUI column presets for
API-specific columns alongside existing MUI presets. Remove variant
and tableOptions props.

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

* chore: add API reports and changesets for entity table card migration

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

* fix(catalog-react,api-docs): refine entity card migration

Use BUI Alert for error states and BUI Link for empty state help
links in EntityRelationCard instead of core-components. Replace MUI
ToggleButton with BUI ButtonIcon for the API definition column.
Add trailing periods to empty state translation messages. Fix tests
asserting on removed external link icon SVG.

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

* feat(catalog-react): add column sorting to EntityDataTable

Introduce EntityColumnConfig extending ColumnConfig with an optional
sortValue getter. EntityDataTable now uses useTable with a sortFn
that reads sortValue from each column, restoring the per-column
sorting that the old core-components Table provided by default. All
built-in column factories set isSortable and sortValue.

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

* fix(api-docs): use dynamic entity kind in empty state messages

Restore entity.kind interpolation in ConsumedApisCard, ProvidedApisCard,
and HasApisCard empty state translations instead of hardcoded strings.

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

* fix(catalog-react): use data length for useTable pageSize

Replace pageSize: Infinity with tableData.length to avoid potential
edge cases in pagination math.

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

* fix(catalog-react): avoid this binding in column factories

Use columnFactories.createEntityRelationColumn instead of
this.createEntityRelationColumn so the methods work when
destructured.

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

* chore: update alpha API reports

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

* fix(create-app): remove variant prop from migrated entity cards in template

The create-app template EntityPage still passed variant="gridItem"
to cards that no longer accept it.

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

* test(catalog-react): add tests for EntityDataTable and EntityRelationCard

Cover rendering with data, empty state, error state, and column
sorting for EntityDataTable. Cover title rendering, empty state
with help link, related entity display, and error state for
EntityRelationCard.

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

* refactor(catalog,api-docs): add backwards compatibility for legacy props

Support both old (variant, columns, tableOptions) and new (columnConfig)
props via a discriminated union type. When legacy props are detected the
old MUI-based implementation is used; otherwise the new BUI-based
EntityRelationCard renders. This avoids immediate breaking changes and
provides a migration path. Changesets downgraded from major/minor to
minor/patch accordingly.

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

* refactor(catalog-react,catalog,api-docs): address review feedback

Remove BaseProps types and use inline union in component signatures.
Move EntityDataTable, EntityRelationCard, and related types to alpha
exports. Group column presets and help links into entityColumnPresets
object. Update all consumers and API reports.

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

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 14:33:45 +00:00
David Festal e8ba654360 chore(dyamic-frontend-feature-loader): update README with the new bundle command
Signed-off-by: David Festal <dfestal@redhat.com>
2026-03-17 15:32:34 +01:00
Patrik Oldsberg 8e559b427d Merge pull request #33393 from backstage/rugvip/move-cli-new-templates
cli-module-new: move yarn new templates from @backstage/cli
2026-03-17 15:32:09 +01:00
Patrik Oldsberg c5cbc84e7f Fix prettier formatting in microsite sidebars
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:25:33 +01:00
Patrik Oldsberg d5a958fd88 fix: stabilize devtools-react api report generation
Mark the empty devtools-react entrypoint as a module and refresh the remaining API reports so the generated report step succeeds for the header page migration branch.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg ba11a7a907 chore: refresh api reports for NFS header pages
Update the generated API reports to match the NFS header page migration and the new subpage-based public surface in the affected plugins.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg 0c12141335 chore: dedupe lockfile for header page migration
Refresh the root lockfile after the new header page dependencies so the verify duplicate check passes in CI.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg 2e65865d93 fix: use TechDocs root route for NFS breadcrumb
Point the NFS TechDocs reader breadcrumb at the docs index route so the new header wiring type-checks and links back to the correct page.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg aa22de55f4 fix: restore NFS header migration regressions
Restore page theming and header metadata for the migrated NFS pages so the new BUI headers preserve the same context and navigation as before. This also makes the DevTools landing tab deterministic and adds focused regression coverage for the scaffolder and TechDocs fixes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg c104960da7 Tidy NFS catalog entity header content
Preserve custom entity header content below the page header and use the entity display title in breadcrumb text so the NFS entity page reads more consistently.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:39 +01:00
Patrik Oldsberg f19392de18 Move user settings NFS tabs to subpages
Switch the new frontend system settings page to built-in subpages so the top-level page tabs come from the app shell, while keeping the legacy settings layout for the old frontend system.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:38 +01:00
Patrik Oldsberg f4a1edd2b0 Align NFS headers with existing BUI page patterns
Update migrated NFS pages to use the existing HeaderPage contract instead of extending Backstage UI, and move DevTools to real subpages with the legacy DevTools content blueprint removed.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 15:05:38 +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 d9655bcb16 Remove empty publish-private doc page
The page only contained a TODO placeholder and was never filled in.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:55:18 +01:00
Patrik Oldsberg c374ed33e5 frontend-plugin-api: refresh API report after rebase
Regenerate the frontend plugin API report after rebasing so the deprecated AlertApi ref annotations match the current extracted public API.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:54:58 +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 b3466f6f78 Merge pull request #33356 from backstage/conditional-extensions
frontend-app-api: add phased app preparation
2026-03-17 14:44:00 +01:00
Patrik Oldsberg 35cd7a20b2 Fix typos in templates documentation
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:43:31 +01:00
Patrik Oldsberg 094cee6a40 repo: refresh remaining API reports
Check in the remaining generated API report updates after the rebase so verify sees the current exported surfaces and generated ordering.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:03:17 +01:00
Patrik Oldsberg 3860435f6c core-components: refresh alpha API report
Update the generated core-components alpha API report after the rebase so verify sees the current translation key ordering.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:49:09 +01:00
Johan Persson a91000018a fix(ui): improve screen reader output for Checkbox and Table selection
Added aria-hidden to the Checkbox indicator div to prevent screen
readers from announcing decorative icons. Added aria-label to the
Table header selection column wrapper.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson 1f9682bf28 fix(ui): make Table row a bg consumer for correct hover/selection states
Table rows now participate in the bg provider/consumer system, using
the appropriate neutral token level based on their container background.
On a neutral-1 surface (e.g. inside a Card), rows step up to neutral-2
tokens for hover, selected, pressed, and disabled states.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson 545129a9d8 fix(ui): use aria-label for Table selection checkboxes
Updated Table selection checkboxes to use aria-label instead of
empty fragment children, improving accessibility and removing the
unnecessary label gap in the selection cells.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson a6b84e13ec fix(ui): make Checkbox children optional with a11y warning
Made children optional and only render the label wrapper div when
children are provided. When used without children, a dev warning is
shown if no aria-label or aria-labelledby is set.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +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 d6742bb1fe Exclude templates from lint in cli-module-new
The templates directory was excluded from linting in the @backstage/cli
package but the ignore pattern was not carried over to cli-module-new.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:28:10 +01:00
Patrik Oldsberg 7ffb61b703 frontend-app-api: fix rebased test type import
Remove a stale createSpecializedApp test import that started failing repository type checking after the rebase.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:19:10 +01:00
Patrik Oldsberg 2df91cd745 Update API reports after rebase
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:14:42 +01:00
Patrik Oldsberg 3b9973c7df Fix E2E test template path after move to cli-module-new
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:10:24 +01:00
Patrik Oldsberg ea90ab0590 Move yarn new templates from @backstage/cli to @backstage/cli-module-new
The built-in templates used by `yarn new` are moved from `packages/cli/templates/`
to `packages/cli-module-new/templates/`, colocating them with the code that
consumes them.

A backwards compatibility rewrite in the template resolution ensures that
existing `@backstage/cli/templates/*` references in root `package.json`
configurations continue to work by transparently resolving them to
`@backstage/cli-module-new/templates/*`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:10:24 +01:00
Patrik Oldsberg 46b530378d frontend-app-api: revert predicate traversal cleanup
Restore the more defensive predicate traversal implementation after the narrowing cleanup turned out not to be worth the type fallout.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg 0d6596f4e7 frontend-app-api: apply review follow-up cleanup
Tighten a few small follow-up details from review by improving stack traces in permission batching, simplifying synthetic child refs, and making predicate traversal narrowing more direct.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg c6d96e7426 frontend-app-api: address remaining review feedback
Move the deprecated createSpecializedApp API holder option back under advanced and disable DataLoader caching in IdentityPermissionApi so batching stays limited to same-tick requests.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg d7ed46b83c frontend-app-api: follow up phased app review feedback
Fix utility API resolution for falsy values and clarify how phased app finalization is owned between onFinalized and finalize.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:20 +01:00
Patrik Oldsberg da11157729 frontend-app-api: move session reuse to prepare time
Remove the late-bound finalize session override so prepared apps accept reusable session state in one place. This keeps bootstrap and finalization semantics aligned and simplifies the prepared app API.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:20 +01:00
Patrik Oldsberg e04955b861 frontend-app-api: split prepared app wiring helpers
Extract the prepared app tree and API factory lifecycle helpers so prepareSpecializedApp reads as orchestration, while keeping the finalization flow documented and behaviorally unchanged.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00
Patrik Oldsberg 65805c8117 frontend-app-api: split prepared app session loading
Separate direct and callback-driven finalization by keeping async session loading inside onFinalized and simplifying the shared finalization helpers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00