Skip to content

Commit c742d93

Browse files
feat: renaming Create to Self-service (#2574)
* renaming create to Self-service Signed-off-by: its-mitesh-kumar <[email protected]> * removing package.json change Signed-off-by: its-mitesh-kumar <[email protected]> * updating e2e tests Signed-off-by: its-mitesh-kumar <[email protected]> * changing folder name Signed-off-by: its-mitesh-kumar <[email protected]> * updating global-header-version Signed-off-by: its-mitesh-kumar <[email protected]> * fixing e2e tests Signed-off-by: its-mitesh-kumar <[email protected]> --------- Signed-off-by: its-mitesh-kumar <[email protected]>
1 parent a7a8386 commit c742d93

File tree

21 files changed

+61
-59
lines changed

21 files changed

+61
-59
lines changed

.ibm/pipelines/resources/config_map/dynamic-global-header-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dynamicPlugins:
3030
config:
3131
priority: 90
3232
props:
33-
title: Create...
33+
title: Self-service
3434
icon: add
3535
to: create
3636
- mountPoint: global.header/component

catalog-entities/marketplace/packages/red-hat-developer-hub-backstage-plugin-global-header.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
config:
6262
priority: 90
6363
props:
64-
title: Create...
64+
title: Self-service
6565
icon: add
6666
to: create
6767
- mountPoint: global.header/component

dynamic-plugins.default.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ plugins:
557557
config:
558558
priority: 90
559559
props:
560-
title: Create...
560+
title: Self-service
561561
icon: add
562562
to: create
563563
- mountPoint: global.header/component

dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-global-header/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"dependencies": {
3131
"@mui/material": "5.16.14",
32-
"@red-hat-developer-hub/backstage-plugin-global-header": "1.0.0"
32+
"@red-hat-developer-hub/backstage-plugin-global-header": "1.1.0"
3333
},
3434
"devDependencies": {
3535
"@backstage/cli": "0.30.0",

e2e-tests/playwright/e2e/audit-log/catalog.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ test.describe.skip("Audit Log check for Catalog Plugin", () => {
9090
});
9191

9292
test("Should fetch logs for QueriedCatalogEntityFetch event and validate log structure and values", async () => {
93-
await uiHelper.clickButton("Create");
93+
await uiHelper.clickButton("Self-service");
9494
await validateCatalogLogEvent(
9595
"QueriedCatalogEntityFetch",
9696
"Queried entity fetch attempt",
@@ -102,7 +102,7 @@ test.describe.skip("Audit Log check for Catalog Plugin", () => {
102102
test("Should fetch logs for CatalogLocationCreation event and validate log structure and values", async () => {
103103
const template =
104104
"https://github.com/RoadieHQ/sample-service/blob/main/demo_template.yaml";
105-
await uiHelper.clickButton("Create");
105+
await uiHelper.clickButton("Self-service");
106106
await uiHelper.clickButton("Register Existing Component");
107107
await catalogImport.analyzeComponent(template);
108108

e2e-tests/playwright/e2e/audit-log/scaffold.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test.describe.skip("Audit Log check for Catalog Plugin", () => {
2222
common = new Common(page);
2323
catalogImport = new CatalogImport(page);
2424
await common.loginAsGuest();
25-
await uiHelper.clickLink({ ariaLabel: "Create..." });
25+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
2626
});
2727

2828
test("Should fetch logs for ScaffolderParameterSchemaFetch event and validate log structure and values", async ({
@@ -32,7 +32,7 @@ test.describe.skip("Audit Log check for Catalog Plugin", () => {
3232
await uiHelper.clickButton("Register Existing Component");
3333
await catalogImport.registerExistingComponent(template, false);
3434
await page.waitForTimeout(1000);
35-
await uiHelper.clickLink({ ariaLabel: "Create..." });
35+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
3636
await common.waitForLoad();
3737
await uiHelper.clickBtnInCard("Hello World 2", "Choose");
3838
await LogUtils.validateLogEvent(

e2e-tests/playwright/e2e/authProviders/github-happy-path.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test.describe.serial("GitHub Happy path", () => {
130130
test("Register an existing component", async () => {
131131
await uiHelper.openSidebar("Catalog");
132132
await uiHelper.selectMuiBox("Kind", "Component");
133-
await uiHelper.clickButton("Create");
133+
await uiHelper.clickButton("Self-service");
134134
await uiHelper.clickButton("Register Existing Component");
135135
await catalogImport.registerExistingComponent(component);
136136
});
@@ -161,7 +161,7 @@ test.describe.serial("GitHub Happy path", () => {
161161
});
162162

163163
test("Verify all 12 Software Templates appear in the Create page", async () => {
164-
await uiHelper.clickLink({ ariaLabel: "Create..." });
164+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
165165
await uiHelper.verifyHeading("Templates");
166166

167167
for (const template of TEMPLATES) {

e2e-tests/playwright/e2e/catalog-scaffolded-from-link.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ test.describe.serial("Link Scaffolded Templates to Catalog Items", () => {
3939

4040
test("Register an Template", async () => {
4141
await uiHelper.openSidebar("Catalog");
42-
await uiHelper.clickButton("Create");
42+
await uiHelper.clickButton("Self-service");
4343
await uiHelper.clickButton("Register Existing Component");
4444
await catalogImport.registerExistingComponent(template, false);
4545
});
4646

4747
test("Create a React App using the newly registered Template", async () => {
4848
test.setTimeout(130000);
4949
await uiHelper.openSidebar("Catalog");
50-
await uiHelper.clickButton("Create");
50+
await uiHelper.clickButton("Self-service");
5151
await uiHelper.searchInputPlaceholder("Create React App Template");
5252
await uiHelper.verifyText("Create React App Template");
5353
await uiHelper.waitForTextDisappear("Add ArgoCD to an existing project");

e2e-tests/playwright/e2e/catalog-timestamp.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test.describe("Test timestamp column on Catalog", () => {
3131
});
3232

3333
test("Register an existing component and verify `Created At` column and value in the Catalog Page", async () => {
34-
await uiHelper.clickButton("Create");
34+
await uiHelper.clickButton("Self-service");
3535
await uiHelper.clickButton("Register Existing Component");
3636
await catalogImport.registerExistingComponent(component);
3737
await uiHelper.openSidebar("Catalog");

e2e-tests/playwright/e2e/default-global-header.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test.describe("Default Global Header", () => {
2020
page,
2121
}) => {
2222
await expect(page.locator(`input[placeholder="Search..."]`)).toBeVisible();
23-
await uiHelper.verifyLink({ label: "Create..." });
23+
await uiHelper.verifyLink({ label: "Self-service" });
2424
await uiHelper.verifyLink({ label: "Support (external link)" });
2525
await uiHelper.verifyLink({ label: "Notifications" });
2626
expect(await uiHelper.isBtnVisible("rhdh-qe-2")).toBeTruthy();
@@ -31,9 +31,9 @@ test.describe("Default Global Header", () => {
3131
expect(await uiHelper.isBtnVisible("Settings")).toBeFalsy();
3232
});
3333

34-
test("Verify that clicking on Create button opens the Software Templates page", async () => {
35-
await uiHelper.clickLink({ ariaLabel: "Create..." });
36-
await uiHelper.verifyHeading("Software Templates");
34+
test("Verify that clicking on Self-service button opens the Templates page", async () => {
35+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
36+
await uiHelper.verifyHeading("Self-service");
3737
});
3838

3939
test("Verify that clicking on Support button opens a new tab", async ({

e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ test.describe
272272
test('Verify repo from "register existing component" are displayed in bulk import Added repositories', async () => {
273273
// Register Existing Component
274274
await uiHelper.openSidebar("Catalog");
275-
await uiHelper.clickButton("Create");
275+
await uiHelper.clickButton("Self-service");
276276
await uiHelper.clickButton("Register Existing Component");
277277
await catalogImport.registerExistingComponent(
278278
existingComponentDetails.url,

e2e-tests/playwright/e2e/plugins/http-request.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test.describe("Testing scaffolder-backend-module-http-request to invoke an exter
2323

2424
test("Create a software template using http-request plugin", async () => {
2525
test.setTimeout(130000);
26-
await uiHelper.clickLink({ ariaLabel: "Create..." });
26+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
2727
await uiHelper.verifyHeading("Templates");
2828
await uiHelper.clickButton("Register Existing Component");
2929
await catalogImport.registerExistingComponent(template, false);
@@ -34,7 +34,7 @@ test.describe("Testing scaffolder-backend-module-http-request to invoke an exter
3434
await uiHelper.clickLink("Test HTTP Request");
3535
await uiHelper.verifyHeading("Test HTTP Request");
3636
await uiHelper.clickLink("Launch Template");
37-
await uiHelper.verifyHeading("Software Templates");
37+
await uiHelper.verifyHeading("Self-service");
3838
await uiHelper.clickButton("Create");
3939
//Checking for Http Status 200
4040
await uiHelper.verifyText("200", false);

e2e-tests/playwright/e2e/plugins/kubernetes-actions/kubernetes-actions.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ test.describe("Test Kubernetes Actions plugin", () => {
1818
kubeClient = new KubeClient();
1919

2020
await common.loginAsGuest();
21-
await uiHelper.clickLink({ ariaLabel: "Create..." });
21+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
2222
});
2323

2424
test("Creates kubernetes namespace", async () => {
2525
namespace = `test-kubernetes-actions-${Date.now()}`;
26-
await uiHelper.verifyHeading("Software Templates");
26+
await uiHelper.verifyHeading("Self-service");
2727
await uiHelper.clickBtnInCard("Create a kubernetes namespace", "Choose");
2828
await uiHelper.waitForTitle("Create a kubernetes namespace", 2);
2929

e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ test.describe.serial("Test RBAC", () => {
550550
await uiHelper.openSidebar("Catalog");
551551
await uiHelper.selectMuiBox("Kind", "Component");
552552
await uiHelper.verifyTableIsEmpty();
553-
await uiHelper.clickLink({ ariaLabel: "Create..." });
553+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
554554
await page.reload();
555555
await uiHelper.verifyText(
556556
"No templates found that match your filter. Learn more about",
@@ -565,7 +565,7 @@ test.describe.serial("Test RBAC", () => {
565565
});
566566

567567
test("Test catalog-entity create is allowed", async () => {
568-
await uiHelper.clickLink({ ariaLabel: "Create..." });
568+
await uiHelper.clickLink({ ariaLabel: "Self-service" });
569569
expect(await uiHelper.isLinkVisible("Register Existing Component"));
570570
await uiHelper.clickButton("Register Existing Component");
571571
const catalogImport = new CatalogImport(page);

e2e-tests/playwright/utils/navbar.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
export type SidebarTabs =
22
| "Catalog"
3-
| "Create"
43
| "Settings"
54
| "My Group"
65
| "Home"
7-
| "Create..."
6+
| "Self-service"
87
| "Learning Paths"
98
| "Extensions"
109
| "Bulk import"

packages/app/src/components/AppBase/AppBase.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ const AppBase = () => {
9797
<Route
9898
path="/create"
9999
element={
100-
<ScaffolderPage
101-
headerOptions={{ title: 'Software Templates' }}
102-
/>
100+
<ScaffolderPage headerOptions={{ title: 'Self-service' }} />
103101
}
104102
>
105103
<ScaffolderFieldExtensions>

packages/app/src/components/DynamicRoot/DynamicRoot.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import extractDynamicConfig, {
2020
DynamicRoute,
2121
} from '../../utils/dynamicUI/extractDynamicConfig';
2222
import initializeRemotePlugins from '../../utils/dynamicUI/initializeRemotePlugins';
23+
import { catalogTranslations } from '../catalog/translations/catalog';
2324
import { MenuIcon } from '../Root/MenuIcon';
2425
import CommonIcons from './CommonIcons';
2526
import defaultAppComponents from './defaultAppComponents';
@@ -458,6 +459,10 @@ export const DynamicRoot = ({
458459
api => !remoteApis.some(remoteApi => remoteApi.api.id === api.api.id),
459460
);
460461
app.current = createApp({
462+
__experimentalTranslations: {
463+
availableLanguages: ['en'],
464+
resources: [catalogTranslations],
465+
},
461466
apis: [...filteredStaticApis, ...remoteApis],
462467
bindRoutes({ bind }) {
463468
bindAppRoutes(bind, resolvedRouteBindingTargets, routeBindings);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2+
import { catalogTranslationRef } from '@backstage/plugin-catalog/alpha';
3+
4+
const en = createTranslationMessages({
5+
ref: catalogTranslationRef,
6+
full: false, // False means that this is a partial translation
7+
messages: {
8+
'indexPage.createButtonTitle': 'Self-service',
9+
},
10+
});
11+
12+
export default en;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
2+
import { catalogTranslationRef } from '@backstage/plugin-catalog/alpha';
3+
4+
export const catalogTranslations = createTranslationResource({
5+
ref: catalogTranslationRef,
6+
translations: {
7+
en: () => import('./catalog-en'),
8+
},
9+
});

packages/app/src/consts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const DefaultMainMenuItems = {
3030
priority: 60,
3131
},
3232
'default.create': {
33-
title: 'Create...',
33+
title: 'Self-service',
3434
icon: 'add',
3535
to: 'create',
3636
priority: 50,

yarn.lock

+8-29
Original file line numberDiff line numberDiff line change
@@ -13234,27 +13234,6 @@ __metadata:
1323413234
languageName: node
1323513235
linkType: hard
1323613236

13237-
"@mui/styled-engine@npm:5.16.13":
13238-
version: 5.16.13
13239-
resolution: "@mui/styled-engine@npm:5.16.13"
13240-
dependencies:
13241-
"@babel/runtime": ^7.23.9
13242-
"@emotion/cache": ^11.13.5
13243-
csstype: ^3.1.3
13244-
prop-types: ^15.8.1
13245-
peerDependencies:
13246-
"@emotion/react": ^11.4.1
13247-
"@emotion/styled": ^11.3.0
13248-
react: ^17.0.0 || ^18.0.0 || ^19.0.0
13249-
peerDependenciesMeta:
13250-
"@emotion/react":
13251-
optional: true
13252-
"@emotion/styled":
13253-
optional: true
13254-
checksum: d9459ef4baac056d1a65e351e084b2fe1eb30516907fc48166f570c60e3db3cb30de2d0af2bf22a8caa004bf2c37a1b831ccad1069b1d03cfae202c247967e44
13255-
languageName: node
13256-
linkType: hard
13257-
1325813237
"@mui/styled-engine@npm:5.16.14, @mui/styled-engine@npm:^5.16.14":
1325913238
version: 5.16.14
1326013239
resolution: "@mui/styled-engine@npm:5.16.14"
@@ -16893,9 +16872,9 @@ __metadata:
1689316872
languageName: node
1689416873
linkType: hard
1689516874

16896-
"@red-hat-developer-hub/backstage-plugin-global-header@npm:1.0.0":
16897-
version: 1.0.0
16898-
resolution: "@red-hat-developer-hub/backstage-plugin-global-header@npm:1.0.0"
16875+
"@red-hat-developer-hub/backstage-plugin-global-header@npm:1.1.0":
16876+
version: 1.1.0
16877+
resolution: "@red-hat-developer-hub/backstage-plugin-global-header@npm:1.1.0"
1689916878
dependencies:
1690016879
"@backstage/catalog-model": ^1.7.3
1690116880
"@backstage/core-components": ^0.16.3
@@ -16912,15 +16891,15 @@ __metadata:
1691216891
"@backstage/plugin-search-react": ^1.8.5
1691316892
"@backstage/plugin-signals-react": ^0.0.9
1691416893
"@backstage/theme": ^0.6.3
16915-
"@mui/icons-material": 5.16.13
16916-
"@mui/material": 5.16.13
16917-
"@mui/styled-engine": 5.16.13
16894+
"@mui/icons-material": 5.16.14
16895+
"@mui/material": 5.16.14
16896+
"@mui/styled-engine": 5.16.14
1691816897
"@scalprum/react-core": 0.9.3
1691916898
react-use: ^17.5.0
1692016899
peerDependencies:
1692116900
react: ^16.13.1 || ^17.0.0 || ^18.0.0
1692216901
react-router-dom: ^6.0.0
16923-
checksum: 6500dfcac091608b4eb466c1702f28934a276dd7cbf04aaafca167c74c605c6a520dfaa425f8669d21f5365e46b830a6acbb291206fe5b67bf7fde742823a586
16902+
checksum: 1ea671962219deb0a927d3bc93c54cc5e369824b3cf316f2bb1a6c0d2e0577a058d7449bd6dcd146ef2ad513ecd62b6a48356424a0372605a7e7ce397ab46b43
1692416903
languageName: node
1692516904
linkType: hard
1692616905

@@ -41444,7 +41423,7 @@ __metadata:
4144441423
"@backstage/cli": 0.30.0
4144541424
"@janus-idp/cli": 3.3.0
4144641425
"@mui/material": 5.16.14
41447-
"@red-hat-developer-hub/backstage-plugin-global-header": 1.0.0
41426+
"@red-hat-developer-hub/backstage-plugin-global-header": 1.1.0
4144841427
typescript: 5.8.2
4144941428
languageName: unknown
4145041429
linkType: soft

0 commit comments

Comments
 (0)