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 <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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: {},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -199,6 +199,7 @@ export const RenderEnum: FC<{
|
||||
data-testid={`wrap-text_${i}`}
|
||||
variant="tertiary"
|
||||
size="small"
|
||||
aria-label="Show formatted value"
|
||||
>
|
||||
↵
|
||||
</Button>
|
||||
@@ -242,7 +243,7 @@ export const RenderSchema = ({
|
||||
id: 'value',
|
||||
label: t('renderSchema.tableCell.value'),
|
||||
isRowHeader: true,
|
||||
defaultWidth: '3fr' as any,
|
||||
defaultWidth: '3fr',
|
||||
cell: item => <ValueCell item={item} context={context} />,
|
||||
},
|
||||
]
|
||||
@@ -270,7 +271,7 @@ export const RenderSchema = ({
|
||||
{
|
||||
id: 'value',
|
||||
label: t('renderSchema.tableCell.value'),
|
||||
defaultWidth: '1fr' as any,
|
||||
defaultWidth: '1fr',
|
||||
cell: item => <ValueCell item={item} context={context} />,
|
||||
},
|
||||
];
|
||||
@@ -349,7 +350,7 @@ export const RenderSchema = ({
|
||||
}
|
||||
return undefined;
|
||||
})();
|
||||
return result ?? <Text as="p">No schema defined</Text>;
|
||||
return result ?? <Text as="p">{t('renderSchema.undefined')}</Text>;
|
||||
};
|
||||
|
||||
function RenderExpansion({
|
||||
|
||||
Reference in New Issue
Block a user