Add @backstage/cli-module-new to the version map so that the
next-app template can resolve it during templating, and update
the E2E test to build the dist workspace from the next-app
template since it is now the default.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Keep the generated app stylesheet import when rewriting the new frontend app entrypoint for React 17 so the E2E app boots with the same UI setup.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
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
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
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
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
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>
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>
* 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>
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
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
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
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
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
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>
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>
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>
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>
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
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
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
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
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
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
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
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
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
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
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
Make prepared apps choose either onFinalized or finalize so the async and direct finalization flows can no longer be mixed on the same instance.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Move the session-state and bootstrap-error finalization flows into same-file helpers with explicit inputs so the local state updates remain visible at the call sites.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Keep the sign-in finalization path local to the identity callback and use safer error normalization while preserving the finalized bootstrap error flow.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Resolve async finalization failures by building a finalized app that throws from app/root.children, and simplify the identity proxy target callback to a synchronous fire-and-forget hook.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Route bootstrap finalization failures through an external store that re-enters React at app/root.children, and simplify prepared app finalization to use a success-only callback.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Replace the consolidated runtime state object in prepareSpecializedApp with local variables so the control flow stays easier to follow while preserving the extracted helper modules.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Move the phase-specific API proxies and tree initialization helpers out of prepareSpecializedApp so the remaining file can stay focused on bootstrap and finalization flow.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Move predicate reference collection and predicate context loading out of prepareSpecializedApp so the session and finalization flow can focus on lifecycle state.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Move the phased specialized app lifecycle into prepareSpecializedApp.tsx and leave createSpecializedApp.tsx as the deprecated wrapper so the public entry points and their related types live alongside their own implementations.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Let prepared apps observe sign-in completion through the bootstrap identity proxy instead of overriding the sign-in page component, and surface finalization failures back through the default app root.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Move detached API discovery over to the same subtree instantiation traversal that powers the app tree so predicate handling and attachment traversal stay aligned in one place.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Keep deferred API overrides only for bootstrap APIs that were never materialized, while reporting and ignoring overrides of implementations that were already used during bootstrap.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor