Merge pull request #26586 from backstage/scaffolder/copy-improvements
[Scaffolder] copy improvements
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Removed default title set to Unknown page on `ContentHeaderTitle` component to support usage of component without title prop.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Removed duplicated titles on Scaffolder `TemplateListPage` component
|
||||
@@ -30,6 +30,13 @@ describe('<ContentHeader/>', () => {
|
||||
rendered.getByText('Title');
|
||||
});
|
||||
|
||||
it('should render without title', async () => {
|
||||
const rendered = await renderInTestApp(
|
||||
<ContentHeader>content</ContentHeader>,
|
||||
);
|
||||
rendered.getByText('content');
|
||||
});
|
||||
|
||||
it('should render with titleComponent', async () => {
|
||||
const title = 'Custom title';
|
||||
const titleComponent = <h1>{title}</h1>;
|
||||
|
||||
@@ -73,10 +73,7 @@ type ContentHeaderTitleProps = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
const ContentHeaderTitle = ({
|
||||
title = 'Unknown page',
|
||||
className,
|
||||
}: ContentHeaderTitleProps) => (
|
||||
const ContentHeaderTitle = ({ title, className }: ContentHeaderTitleProps) => (
|
||||
<Typography
|
||||
variant="h4"
|
||||
component="h2"
|
||||
|
||||
@@ -230,7 +230,6 @@ export const scaffolderTranslationRef: TranslationRef<
|
||||
readonly 'templateListPage.pageTitle': 'Create a new component';
|
||||
readonly 'templateListPage.templateGroups.defaultTitle': 'Templates';
|
||||
readonly 'templateListPage.templateGroups.otherTitle': 'Other Templates';
|
||||
readonly 'templateListPage.contentHeader.title': 'Available Templates';
|
||||
readonly 'templateListPage.contentHeader.registerExistingButtonTitle': 'Register Existing Component';
|
||||
readonly 'templateListPage.contentHeader.supportButtonTitle': 'Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).';
|
||||
readonly 'templateListPage.additionalLinksForEntity.viewTechDocsTitle': 'View TechDocs';
|
||||
|
||||
@@ -177,7 +177,7 @@ export const TemplateListPage = (props: TemplateListPageProps) => {
|
||||
<ScaffolderPageContextMenu {...scaffolderPageContextMenuProps} />
|
||||
</Header>
|
||||
<Content>
|
||||
<ContentHeader title={t('templateListPage.contentHeader.title')}>
|
||||
<ContentHeader>
|
||||
<RegisterExistingButton
|
||||
title={t(
|
||||
'templateListPage.contentHeader.registerExistingButtonTitle',
|
||||
|
||||
@@ -261,7 +261,6 @@ export const scaffolderTranslationRef = createTranslationRef({
|
||||
otherTitle: 'Other Templates',
|
||||
},
|
||||
contentHeader: {
|
||||
title: 'Available Templates',
|
||||
registerExistingButtonTitle: 'Register Existing Component',
|
||||
supportButtonTitle:
|
||||
'Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).',
|
||||
|
||||
Reference in New Issue
Block a user