Merge pull request #5483 from backstage/rugvip/notgreet

catalog: switch out time-based greeting for plain title
This commit is contained in:
Patrik Oldsberg
2021-04-27 14:26:06 +02:00
committed by GitHub
10 changed files with 18 additions and 21 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Updates the end to end test in the app to match the new catalog index page title. To apply this change to an existing app, update `packages/app/cypress/integration/app.js` to search for `"My Company Catalog"` instead of `"My Company Service Catalog"`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Switch out the time-based personal greeting for a plain title on the catalog index page, and remove the clocks for different timezones.
@@ -1,6 +1,6 @@
describe('App', () => {
it('should render the catalog', () => {
cy.visit('/');
cy.contains('My Company Service Catalog');
cy.contains('My Company Catalog');
});
});
+1 -1
View File
@@ -335,7 +335,7 @@ async function testAppServe(pluginName: string, appDir: string) {
try {
const browser = new Browser();
await waitForPageWithText(browser, '/', 'My Company Service Catalog');
await waitForPageWithText(browser, '/', 'My Company Catalog');
await waitForPageWithText(
browser,
`/${pluginName}`,
@@ -14,37 +14,24 @@
* limitations under the License.
*/
import {
configApiRef,
Header,
HomepageTimer,
identityApiRef,
Page,
useApi,
} from '@backstage/core';
import { configApiRef, Header, Page, useApi } from '@backstage/core';
import React from 'react';
import { getTimeBasedGreeting } from './utils/timeUtil';
type Props = {
children?: React.ReactNode;
};
const CatalogLayout = ({ children }: Props) => {
const greeting = getTimeBasedGreeting();
const profile = useApi(identityApiRef).getProfile();
const userId = useApi(identityApiRef).getUserId();
const orgName = useApi(configApiRef).getOptionalString('organization.name');
const orgName =
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
return (
<Page themeId="home">
<Header
title={`${greeting.greeting}, ${profile.displayName || userId}!`}
subtitle={`${orgName || 'Backstage'} Service Catalog`}
tooltip={greeting.language}
title={`${orgName} Catalog`}
subtitle={`Catalog of software components at ${orgName}`}
pageTitleOverride="Home"
>
<HomepageTimer />
</Header>
/>
{children}
</Page>
);