Commit Graph

640 Commits

Author SHA1 Message Date
Patrik Oldsberg 837de816d5 frontend-app-api: export prepare app options type
Expose PrepareSpecializedAppOptions from the wiring entrypoint and refresh the API report so the new type is available to callers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:04:42 +01:00
Patrik Oldsberg b6fc7f861f frontend-app-api: fix phased predicate type checks
Use internal extension shapes when reading predicate metadata and type the finalized app test helper explicitly. This fixes the typecheck breakage introduced by the phased predicate and override changes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:29 +01:00
Patrik Oldsberg d65d4812f6 frontend-plugin-api: support predicate overrides
Allow plugin and extension overrides to replace or remove existing if predicates. This makes conditional plugin and extension behavior overrideable through both plugin overrides and module-installed extension overrides.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:21 +01:00
Patrik Oldsberg f30eeba995 frontend-plugin-api: support feature-level predicates
This lets plugin and module instances apply a shared condition to all of their extensions, while preserving extension-level conditions by combining them with logical AND during app spec resolution.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:11 +01:00
Patrik Oldsberg 457904d372 frontend-app-api: defer conditional bootstrap APIs and root elements
This keeps bootstrap rendering stable while still allowing root elements and API subtrees to activate once session predicates are available, and warns when bootstrap-visible extensions depend on APIs that only appear during finalization.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:02:42 +01:00
Patrik Oldsberg 89f83827c9 frontend-app-api: expose bootstrap app state
Expose the prepared bootstrap tree together with subscription-based phase updates so createApp can render from app state directly instead of forcing rerenders through a sign-in callback.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:01:58 +01:00
Patrik Oldsberg f4c03772a4 frontend-app-api: internalize prepared session state
Move prepared app session ownership into frontend-app-api so bootstrap only signals readiness while callers use tryFinalize or finalize to read the finalized app state. This reduces createApp boilerplate and keeps the specialized app lifecycle centered in the lower-level API.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:01:34 +01:00
Patrik Oldsberg 94e91d9de3 frontend-app-api: make session state opaque
Replace exposed prepared app APIs and predicate plumbing with a reusable opaque session state so apps can skip sign-in without leaking internals. Align the specialized app flow around getSignIn().ready and finalize(sessionState) for explicit session bootstrap and reuse.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:01:15 +01:00
Patrik Oldsberg b14e301bb6 frontend-app-api: clean up session boundary initialization
Make the bootstrap-visible app slice explicit so APIs and predicate validation follow the same session boundary rules before the full tree is finalized.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:01:06 +01:00
Patrik Oldsberg 2325e4bf48 frontend-app-api: integrate predicate context into app phases
Compute and cache extension predicate context as part of app phase transitions so sign-in and non-sign-in flows finalize against the same gating state.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:00:56 +01:00
aramissennyeydd ce97558e11 rename to if and add examples of dynamic cards
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2026-03-17 13:00:39 +01:00
aramissennyeydd 25b7ddd664 feat: allow dynamically enabling and disabling extensions
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2026-03-17 13:00:29 +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 925e0895b3 frontend-app-api: add prepareSpecializedApp two-phase app wiring
This adds a new prepare/finalize app wiring flow that renders sign-in first and finalizes the full app after identity capture, while keeping createSpecializedApp as a deprecated wrapper. It also updates frontend-defaults/createApp to use the same flow and includes test and API report updates.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 12:59:58 +01:00
Patrik Oldsberg e9eb585978 Merge pull request #33392 from backstage/rugvip/fix-api-review-items-1-3-5
frontend-plugin-api, frontend-app-api: API review cleanup
2026-03-17 12:46:03 +01:00
Patrik Oldsberg 5fd78ba82f frontend-plugin-api, frontend-app-api: API review cleanup
Remove @backstage/core-plugin-api leakage from the
@backstage/frontend-app-api public API surface. Rename PluginOptions
to CreateFrontendPluginOptions with a deprecated alias. Remove
ResolvedExtensionInputs from the main @backstage/frontend-plugin-api
entry point.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 11:37:13 +01:00
Patrik Oldsberg cc0693ec40 api-ref: move opaque helper to frontend-internal
Share the internal ApiRef opaque helper through frontend-internal and fail fast when ApiRef-shaped values have an unsupported opaque version.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 11:05:00 +01:00
Patrik Oldsberg 4690f20880 api-ref: use opaque metadata for owner lookup
Read ApiRef plugin ownership through the internal opaque type helper and gracefully fall back to legacy ID inference for unsupported ref shapes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:30:59 +01:00
Patrik Oldsberg ccc6b25f87 api-ref: keep plugin ownership metadata internal
Hide plugin ownership metadata from the public ApiRef type while preserving internal ownership resolution for the builder-based API ref flow.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 76b89c7437 api-ref: infer builder ids and plugin ownership
Preserve literal API ref ids in the builder form while keeping the deprecated constructor compatible, and rely on explicit ownership metadata instead of the old core id fallback.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg d911b72811 frontend-plugin-api: add explicit ApiRef plugin ownership
Add the new frontend ApiRef builder form while preserving compatibility with existing refs, and let frontend apps resolve API ownership through an explicit pluginId when provided.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg cc459f73a8 frontend-plugin-api: convert ApiRef to an opaque type
Convert the ApiRef type in the new frontend system to an opaque type
with a $$type discriminator, matching the pattern used by route refs
and extension data refs. Add a builder-pattern creation overload
(createApiRef<T>().with({ id })) alongside the existing direct-config
form. Create OpaqueApiRef in frontend-internal for internal type
validation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 80fed0e8f0 Preserve CSS sizing for translated system icons.
Keep the original icon element as the rendered root so legacy MUI-backed icons can still be styled through CSS like other Backstage UI icons.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg c0ab3763e5 Fix tsc errors and add missing changeset
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +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
Patrik Oldsberg 72991a5211 frontend-plugin-api: remove helper types from top-level API surface
Remove `ResolvedExtensionInput` and `ExtensionDataRefToValue` from
the public API to reduce top-level API clutter. These types were
internal plumbing not needed by plugin authors.

`ResolvedExtensionInput` is now a file-local type only used by
`ResolvedExtensionInputs`. `ExtensionDataRefToValue` is no longer
re-exported from the barrel.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:21:13 +01:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
Andre Wanlin 1eaf17a276 Merge pull request #32061 from elaine-mattos/feat/add-description-plugin-feature-flags
feat(core-plugin-api): add optional description to plugin feature flags
2026-03-07 12:47:26 -06:00
Patrik Oldsberg a462d9ae8b Merge pull request #33148 from backstage/rugvip/move-extensionFactoryMiddleware-to-frontend-app-api
Move `ExtensionFactoryMiddleware` from frontend-plugin-api to frontend-app-api
2026-03-05 13:56:01 +01:00
Patrik Oldsberg 0f61db8bfe Merge pull request #33147 from backstage/rugvip/simplify-extension-attach-to
Simplify the `ExtensionAttachTo` type
2026-03-05 13:52:02 +01:00
Patrik Oldsberg 01929491d7 Keep internal array attachTo support, only simplify public types
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 11:51:10 +01:00
Patrik Oldsberg dab6c46168 Move ExtensionFactoryMiddleware from frontend-plugin-api to frontend-app-api
The `ExtensionFactoryMiddleware` type is only used by the app-level wiring
and has been moved to `@backstage/frontend-app-api` as its canonical location.

The type is preserved in `@backstage/frontend-plugin-api` with a `@deprecated`
tag pointing to the new location. All internal usages have been updated to
import from the new location.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:37:51 +01:00
Patrik Oldsberg a9440f0622 Simplify the ExtensionAttachTo type
Simplified the `ExtensionAttachTo` type to only support a single
attachment target, removing the array form for attaching to multiple
extension points. Also removed the deprecated `ExtensionAttachToSpec`
type alias.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:37:05 +01:00
Patrik Oldsberg 92af1ae9c0 Remove allowUnknownExtensionConfig option from frontend app APIs
The `allowUnknownExtensionConfig` option was unused in practice — unknown
extension config was always reported via the error collector regardless of
the flag. For `createSpecializedApp`, unknown extension config is now always
included in the returned errors. For `createApp`, it is handled as a
console warning via `maybeCreateErrorPage`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:32:08 +01:00
ElaineDeMattosSilvaB a252e4d412 chore: add test
Signed-off-by: ElaineDeMattosSilvaB <elaine.mattos@gmail.com>
2026-02-25 17:52:22 +01:00
ElaineDeMattosSilvaB 9f05964277 feat: add the description also to the NFS
Signed-off-by: ElaineDeMattosSilvaB <elaine.mattos@gmail.com>
2026-02-25 17:13:23 +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 ac6e46cbaa frontend-app-api: fix icon element check
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:24 +01:00
Patrik Oldsberg c8960d0ec3 frontend-plugin-api: add icon method to IconsApi that returns an element, deprecate getIcon
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:23 +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
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
Patrik Oldsberg 3fac11b941 Merge pull request #32617 from backstage/rugvip/api-override-test-utils
frontend-test-utils: add API override support
2026-02-03 13:55:58 +01:00
Patrik Oldsberg 09032d7bd4 frontend-app-api: add internal app options
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-03 00:11:48 +01:00
Patrik Oldsberg 10ebed46b1 frontend-plugin-api: remove type support for multiple attachment points
This is a follow-up to the deprecation in #32521, completely removing
the Array variant from the ExtensionDefinitionAttachTo type.

The runtime still supports multiple attachment points for backward
compatibility, but new code will receive type errors.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-02 16:25:14 +01:00
Patrik Oldsberg bdf05eac2f Revert "frontend-app-api: switch new API conflict error to be a warning"
This reverts commit 17e0eb3e5f.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-29 11:41:01 +01:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00