Commit Graph

311 Commits

Author SHA1 Message Date
Fredrik Adelöw c64d386fc6 Fix flaky api-docs alpha test by increasing findByText timeout
The test assertions for lazy-loaded extension components used the
default 1000ms RTL timeout, which is insufficient under CI load.
Increased to 10000ms to match the pattern in createDevApp.test.tsx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 22:51:48 +02:00
Patrik Oldsberg 6a565f6880 Merge pull request #33389 from backstage/rugvip/nfs-header-page-migration
plugins: migrate NFS pages to HeaderPage
2026-03-17 22:16:12 +01:00
Patrik Oldsberg 717bbaf075 Fix alpha entry point translation ref re-exports to use @alpha instead of @public
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 17:50:25 +01:00
Patrik Oldsberg 0be2541b5c Promote translation refs from alpha to stable entry points
Add each plugin and package translation ref to the corresponding stable
entry point, changing the JSDoc tag from @alpha to @public. The alpha
entry points now re-export with a @deprecated annotation so existing
consumers continue to work.

Affected packages: core-components, api-docs, catalog, catalog-graph,
catalog-import, catalog-react, home, home-react, kubernetes,
kubernetes-cluster, kubernetes-react, notifications, org, scaffolder,
scaffolder-react, search, search-react, user-settings.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 17:50:25 +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
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 ed8d9ce67c further NFS icon migration and alignment
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-16 21:39:40 +01:00
Fredrik Adelöw ace86adcf7 Update plugins/api-docs/src/setupTests.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-09 14:38:17 +01:00
Fredrik Adelöw 49a130c68c bump a timeout somewhat
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 14:31:13 +01:00
Patrik Oldsberg 30e08dfbcc Add default entity content groups for techdocs and api-docs plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-25 15:37:10 +01:00
Andre Wanlin 35e8d6cb34 Merge pull request #32813 from intelliking/fix/issue-32804
fix: Parameter field input data is obscured with dark mode on
2026-02-21 11:52:39 -06:00
Patrik Oldsberg 018ca876d0 add plugin title and icons
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:34 +01:00
Patrik Oldsberg a63eee6a73 api-docs: bring back page header
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:30 +01:00
Patrik Oldsberg 4449136abd api-docs: hide page header in NFS
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:25 +01:00
Fredrik Adelöw c8f65a1e53 Merge pull request #32247 from Erob711/api-card-table-options
feat: add table options and title for components cards of api
2026-02-16 17:02:39 +01:00
intelliking 69d6e3c7f9 fix: Parameter field input data is obscured with dark mode on
Signed-off-by: intelliking <tyleradams93226@gmail.com>
2026-02-12 15:10:30 +00:00
Patrik Oldsberg 41836147fc api-docs: migrate entity filters to entity predicates
Migrated entity filters from deprecated string-based format to the new
entity predicate format in the alpha exports. Also updated documentation
across multiple plugins to use the new format and Blueprint APIs.

Changes:
- Migrated all entity filters in api-docs plugin from strings like
  'kind:api' to entity predicates like { kind: 'api' }
- Updated documentation examples in api-docs, org, kubernetes, and
  catalog-graph plugins
- Migrated all documentation examples from createEntityCardExtension and
  createEntityContentExtension to use EntityCardBlueprint and
  EntityContentBlueprint

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-04 21:25:13 +01:00
Patrik Oldsberg ac9bead0dc Add createTestEntityPage utility for testing entity extensions
This adds a test utility that simplifies testing entity cards and content
extensions in the new frontend system. The utility creates a test page
that provides EntityProvider context and accepts entity extensions through
input redirects.

Also adds the `apis` option to `renderTestApp` for API overrides, and
includes tests for entity cards in catalog, org, and api-docs plugins.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-04 11:29:47 +01:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
Fredrik Adelöw b1e1cb5252 fixup
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-08 16:24:42 +01:00
Eric Roberson 629c3ec822 add table options and title for components cards of api
add changeset

update api report

Signed-off-by: Eric Roberson <emattroberson@gmail.com>
2026-01-05 10:35:39 -07:00
benjdlambert 5993488172 chore: fix breaking change for swagger type
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-09 13:13:27 +01:00
Patrik Oldsberg 1c7ea4a3e8 plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 14:36:02 +01:00
Patrik Oldsberg d02db50b42 plugins: cleanup unnecessary use of compatWrapper
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 12:56:54 +01:00
Christoph Jerolimov 7c281a5b5c fix(api-docs): Add i18n support for Raw tab title and an error message
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
2025-11-12 12:47:48 +01:00
Fredrik Adelöw f46e3af943 Merge pull request #30861 from benjidotsh/api-docs/improve-styling-dark-mode
style(api-docs): improve styling for dark mode
2025-08-19 08:59:08 +02:00
Benjamin Janssens 633327cba2 style(api-docs): improve styling for dark mode
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-08-11 16:17:30 +02:00
Patrik Oldsberg 147482b700 frontend-plugin-api: switch naming recommendation from define to defineParams
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-08-04 17:17:05 +02:00
Patrik Oldsberg e4ddf22854 frontend-plugin-api,catalog-react: remove default* prefix from blueprint params
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-08-04 16:46:55 +02:00
Patrik Oldsberg f2f133ce8d update all usages of ApiBlueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-07-28 22:27:13 +02:00
Patrik Oldsberg 18c64e9bd4 plugins: add info.packageJson loader for all plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-05-15 11:25:53 +02:00
Fredrik Adelöw 28aa309325 Merge pull request #29665 from GabDug/typos
chore(typos): fix various code typos
2025-04-28 16:50:18 +02:00
Patrik Oldsberg fb58f20613 frontend-plugin-api: rename plugin ID option to pluginId
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-04-27 12:53:08 +02:00
Gabriel Dugny 72d019d663 chore(typos): Fix low-impact typos
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-04-23 17:56:22 +02:00
mario ma c682f5fd40 fix: prettier:check
Signed-off-by: mario ma <mario.ma.node@gmail.com>
2025-04-11 10:25:19 +08:00
mario ma e33e8b0d67 add api-docs i18n report
Signed-off-by: mario ma <mario.ma.node@gmail.com>
2025-04-11 10:24:57 +08:00
mario ma 317bc3dd1e feat: api-docs pulgin support i18n
Signed-off-by: mario ma <mario.ma.node@gmail.com>
2025-04-11 10:24:56 +08:00
Paul Schultz 2e26579e06 chore: update react imports
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-04-08 07:35:24 -05:00
Gabriel Dugny 74871ccc3e fix(api-docs): Consistent Typography in Entity HasApisCard
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-02-28 19:52:34 +01:00
MT Lewis dcf6e720d1 api-docs: fix typos in README and default path
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2024-12-31 16:27:44 +00:00
Fredrik Adelöw 921ac08c30 Merge pull request #27560 from backstage/align-entity-cards-html
Fix link styling in ProvidedApisCard component
2024-11-20 15:14:56 +01:00
Jonathan Roebuck 11babd91c1 Fix link styling in ProvidedApisCard component
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2024-11-08 15:01:02 +00:00
luccas 6836522a8e added pagination to defaultApiExplorerPage
Signed-off-by: luccas <luccasmtxr@gmail.com>
2024-11-04 23:25:29 -03:00
Fredrik Adelöw 2c958fbd17 Merge pull request #27163 from backstage/blam/async-react-bump
deps: bump async-api
2024-10-22 12:23:52 +02:00
blam 11f57de56d fix: bump async-api
Signed-off-by: blam <ben@blam.sh>
2024-10-16 11:11:12 +02:00
Jonathan Roebuck 8963eaa7a0 remove duplicated style
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2024-10-15 14:33:21 +01:00
Jonathan Roebuck 0bd8730855 Use theme values for OpenApiDefinition styles
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2024-10-15 14:07:11 +01:00
Fredrik Adelöw 7d06a43916 implement storage too
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-11 09:48:52 +02:00
Fredrik Adelöw e39f72f813 implement permission too
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-11 09:48:52 +02:00