From 8f93ed9e12805c50cc37abb6b1a1d4c10129cc1f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 1 Apr 2026 14:32:38 +0200 Subject: [PATCH] scaffolder: address copilot review feedback - Use translation key for "No schema defined" fallback instead of hardcoded string - Add aria-label to the enum format button for accessibility - Remove unnecessary `as any` casts on defaultWidth column config - Fix "Github" -> "GitHub" capitalization in test data - Update changeset wording to match actual sidebar list UI Signed-off-by: Patrik Oldsberg Made-with: Cursor --- .changeset/scaffolder-actions-page-table.md | 2 +- .../src/components/ActionsPage/ActionsPage.test.tsx | 6 +++--- .../src/components/RenderSchema/RenderSchema.tsx | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.changeset/scaffolder-actions-page-table.md b/.changeset/scaffolder-actions-page-table.md index a53b7fa8ce..ec6c7ad335 100644 --- a/.changeset/scaffolder-actions-page-table.md +++ b/.changeset/scaffolder-actions-page-table.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder': patch --- -Migrated the actions page to use `@backstage/ui` table and search components. Actions are now listed in a table with aligned name and description columns, with click-to-expand detail view and built-in search filtering. +Migrated the actions page to use `@backstage/ui` list and search components. Actions are now presented in a sidebar list with a separate detail panel for the selected action, along with built-in search filtering. diff --git a/plugins/scaffolder/src/components/ActionsPage/ActionsPage.test.tsx b/plugins/scaffolder/src/components/ActionsPage/ActionsPage.test.tsx index 462c162970..b40e514f88 100644 --- a/plugins/scaffolder/src/components/ActionsPage/ActionsPage.test.tsx +++ b/plugins/scaffolder/src/components/ActionsPage/ActionsPage.test.tsx @@ -606,7 +606,7 @@ describe('ActionsPage', () => { scaffolderApiMock.listActions.mockResolvedValue([ { id: 'github:repo:create', - description: 'Create a new Github repository', + description: 'Create a new GitHub repository', schema: { input: { type: 'object', @@ -622,7 +622,7 @@ describe('ActionsPage', () => { }, { id: 'github:repo:push', - description: 'Push to a Github repository', + description: 'Push to a GitHub repository', schema: { input: { type: 'object', @@ -682,7 +682,7 @@ describe('ActionsPage', () => { scaffolderApiMock.listActions.mockResolvedValue([ { id: 'github:repo:create', - description: 'Create a new Github repository', + description: 'Create a new GitHub repository', schema: {}, }, ]); diff --git a/plugins/scaffolder/src/components/RenderSchema/RenderSchema.tsx b/plugins/scaffolder/src/components/RenderSchema/RenderSchema.tsx index d343a8bc10..0383d46c81 100644 --- a/plugins/scaffolder/src/components/RenderSchema/RenderSchema.tsx +++ b/plugins/scaffolder/src/components/RenderSchema/RenderSchema.tsx @@ -199,6 +199,7 @@ export const RenderEnum: FC<{ data-testid={`wrap-text_${i}`} variant="tertiary" size="small" + aria-label="Show formatted value" > ↵ @@ -242,7 +243,7 @@ export const RenderSchema = ({ id: 'value', label: t('renderSchema.tableCell.value'), isRowHeader: true, - defaultWidth: '3fr' as any, + defaultWidth: '3fr', cell: item => , }, ] @@ -270,7 +271,7 @@ export const RenderSchema = ({ { id: 'value', label: t('renderSchema.tableCell.value'), - defaultWidth: '1fr' as any, + defaultWidth: '1fr', cell: item => , }, ]; @@ -349,7 +350,7 @@ export const RenderSchema = ({ } return undefined; })(); - return result ?? No schema defined; + return result ?? {t('renderSchema.undefined')}; }; function RenderExpansion({