Commit Graph

795 Commits

Author SHA1 Message Date
Patrik Oldsberg e4d8a9ce52 repo: refresh blueprint snapshots for predicates
Update inline snapshots that now include the new extension predicate shape so the changed-package test suite matches the intentional blueprint output.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +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
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 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 90c3a9d1c0 api-ref: preserve const ids in builder types
Use a const type parameter for createApiRef().with(...) so literal API ref ids stay narrow instead of widening to string.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:46:42 +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 7a960a0d75 Regenerate API reports
Update the frontend plugin API report after removing explicit ApiRef constant annotations from the frontend API ref declarations.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg cb8a487bde frontend-plugin-api: rely on ApiRef inference
Remove explicit ApiRef constant annotations from frontend API ref declarations and rely on the createApiRef type argument for inference instead.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +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 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 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 3775ef5b51 Merge pull request #33364 from backstage/rugvip/auth-provider-icon-element
frontend-plugin-api: accept IconElement in AuthProviderInfo
2026-03-16 16:10:13 +01:00
Patrik Oldsberg 99d80927bd Merge pull request #33367 from backstage/rugvip/reduce-frontend-plugin-api-surface
frontend-plugin-api: reduce top-level API surface clutter
2026-03-16 16:06:54 +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
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
Patrik Oldsberg e26e3de81e frontend-plugin-api: accept IconElement in AuthProviderInfo
Update the `icon` field on `AuthProviderInfo` to accept `IconElement`
in addition to `IconComponent`, and update consumers in core-components
and user-settings to handle both types at runtime.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:07:36 +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 edb872c49a Rename PageTab to PageLayoutTab in @backstage/frontend-plugin-api
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-06 11:21:32 +01:00
Patrik Oldsberg d9e999a631 Merge pull request #33152 from backstage/rugvip/use-api-holder-no-throw
frontend-plugin-api: change `useApiHolder` to not throw outside API context
2026-03-05 14:10:02 +01: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 9581cdfbc5 Merge pull request #33144 from backstage/rugvip/remove-any-extension-data-ref
Remove deprecated `AnyExtensionDataRef` type
2026-03-05 13:51:54 +01:00
Patrik Oldsberg f41cd2478e Merge pull request #33142 from backstage/rugvip/deprecate-nav-item-blueprint
Deprecate NavItemBlueprint in @backstage/frontend-plugin-api
2026-03-05 13:51:00 +01:00
Patrik Oldsberg 1408dfc6ca Merge pull request #33141 from backstage/rugvip/deprecate-withApis-frontend-plugin-api
Deprecate `withApis` in `@backstage/frontend-plugin-api`
2026-03-05 13:50:53 +01:00
Patrik Oldsberg 9989e9f98d Merge pull request #33139 from backstage/rugvip/move-analytics-blueprint-to-app-react
Move AnalyticsImplementationBlueprint to @backstage/plugin-app-react
2026-03-05 13:50:43 +01:00
Patrik Oldsberg 9b8d43069d Merge pull request #33138 from backstage/rugvip/fix-dialog-api-jsx-type-inconsistency
Fix JSX type reference inconsistency in DialogApiDialog
2026-03-05 13:50:34 +01:00
Patrik Oldsberg cae80d6d91 Freeze the empty ApiHolder singleton
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-05 13:50:19 +01:00
Patrik Oldsberg d7311c8bac Address review feedback from PR #33140
- Keep explicit error when API context provider exists but v1 is not
  available, only return empty holder when there is no provider at all
- Update tests in core-app-api to expect the new error message when
  rendering outside a provider
- Add @backstage/core-plugin-api to changeset since it re-exports
  useApiHolder

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-05 13:32:15 +01:00
Patrik Oldsberg 749ccb432d Use plain text instead of @link in deprecation tags
The {@link} tags resolve to the local deprecated symbols rather than
the new ones in @backstage/plugin-app-react, and TSDoc doesn't support
cross-package links.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 12:34:33 +01:00
Patrik Oldsberg fa0277093e Address review feedback
- Remove {@link} from @deprecated tag (freben feedback)
- Use Object.hasOwn instead of hasOwnProperty
- Use NotImplementedError instead of plain Error
- Add @backstage/errors dependency
- Add tests for withApis in core-compat-api

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 12:30:47 +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 a447ea8162 Update API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 11:46:42 +01:00
Patrik Oldsberg a1de46c7f2 Update API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 11:46:17 +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 6573901551 Remove deprecated AnyExtensionDataRef type
The `AnyExtensionDataRef` type alias was deprecated in favor of using
`ExtensionDataRef` without type parameters, which is equivalent since
all type parameters have defaults. This removes the deprecated type,
its export, and updates `ExtensionDataRefToValue` to use
`ExtensionDataRef` directly.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:33:38 +01:00
Patrik Oldsberg 8a3a906fb7 Deprecate NavItemBlueprint in @backstage/frontend-plugin-api
Nav items are now automatically inferred from PageBlueprint extensions
based on their title and icon params, making NavItemBlueprint redundant.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:30:38 +01:00
Patrik Oldsberg b15a685e52 Deprecate withApis in @backstage/frontend-plugin-api
Moved withApis to @backstage/core-compat-api and deprecated the export
in @backstage/frontend-plugin-api, pointing users to the new location.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:19:10 +01:00
Patrik Oldsberg fe848e09e6 Change useApiHolder to not throw when outside API context
Instead of throwing a NotImplementedError, useApiHolder now returns an
empty ApiHolder when no API context is available in the React tree.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:18:26 +01:00
Patrik Oldsberg 2c383b535b Move AnalyticsImplementationBlueprint to @backstage/plugin-app-react
Migrated the AnalyticsImplementationBlueprint and
AnalyticsImplementationFactory from @backstage/frontend-plugin-api to
@backstage/plugin-app-react. The original exports are deprecated with
pointers to the new location.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-05 10:01:46 +01:00