Skip to content

Commit 033a0b5

Browse files
chore(quickstart): promote quickstart NFS plugin from /alpha to stable api (#3530)
1 parent a8026af commit 033a0b5

20 files changed

Lines changed: 363 additions & 102 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-quickstart': minor
3+
---
4+
5+
Graduate the New Frontend System (NFS) plugin from the `./alpha` export to the primary `./` entry point. OFS (legacy) exports are now available at `./legacy`. Translations remain at `./alpha`.

workspaces/quickstart/packages/app/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import {
2323
quickstartInitModule,
2424
quickstartTranslationsModule,
25-
} from '@red-hat-developer-hub/backstage-plugin-quickstart/alpha';
25+
} from '@red-hat-developer-hub/backstage-plugin-quickstart';
2626
import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme/alpha';
2727
import { navModule } from './modules/nav';
2828

workspaces/quickstart/plugins/quickstart/package.json

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@red-hat-developer-hub/backstage-plugin-quickstart",
33
"version": "1.10.0",
44
"license": "Apache-2.0",
5-
"main": "src/index.ts",
6-
"types": "src/index.ts",
5+
"main": "src/index.tsx",
6+
"types": "src/index.tsx",
77
"publishConfig": {
88
"access": "public"
99
},
@@ -71,15 +71,27 @@
7171
"react-router-dom": "^6.0.0"
7272
},
7373
"exports": {
74-
".": "./src/index.ts",
75-
"./alpha": "./src/alpha/index.tsx",
74+
".": "./src/index.tsx",
75+
"./alpha": "./src/alpha.ts",
76+
"./legacy": "./src/legacyExports.ts",
77+
"./quickstart-init-module": "./src/quickstartInitModuleExport.ts",
78+
"./quickstart-translations-module": "./src/quickstartTranslationsModuleExport.ts",
7679
"./dev": "./dev/CustomDrawer.tsx",
7780
"./package.json": "./package.json"
7881
},
7982
"typesVersions": {
8083
"*": {
8184
"alpha": [
82-
"src/alpha/index.tsx"
85+
"src/alpha.ts"
86+
],
87+
"legacy": [
88+
"src/legacyExports.ts"
89+
],
90+
"quickstart-init-module": [
91+
"src/quickstartInitModuleExport.ts"
92+
],
93+
"quickstart-translations-module": [
94+
"src/quickstartTranslationsModuleExport.ts"
8395
],
8496
"dev": [
8597
"dev/CustomDrawer.tsx"
@@ -98,9 +110,9 @@
98110
"scalprum": {
99111
"name": "red-hat-developer-hub.backstage-plugin-quickstart",
100112
"exposedModules": {
101-
"Alpha": "./src/alpha/index.tsx",
102-
"PluginRoot": "./src/index.ts",
103-
"QuickstartPlugin": "./src/index.ts"
113+
"PluginRoot": "./src/index.tsx",
114+
"QuickstartPlugin": "./src/index.ts",
115+
"Alpha": "./src/alpha.ts"
104116
}
105117
},
106118
"configSchema": "config.d.ts",

workspaces/quickstart/plugins/quickstart/report-alpha.api.md

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,82 +3,9 @@
33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44
55
```ts
6-
import { AppDrawerContent } from '@red-hat-developer-hub/backstage-plugin-app-react';
7-
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
8-
import { FrontendModule } from '@backstage/frontend-plugin-api';
9-
import { GlobalHeaderMenuItemData } from '@red-hat-developer-hub/backstage-plugin-global-header/alpha';
10-
import { MenuItemParams } from '@red-hat-developer-hub/backstage-plugin-global-header/alpha';
11-
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
12-
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
136
import { TranslationRef } from '@backstage/frontend-plugin-api';
147
import { TranslationResource } from '@backstage/frontend-plugin-api';
158

16-
// @alpha
17-
const _default: OverridableFrontendPlugin<
18-
{},
19-
{},
20-
{
21-
'app-drawer-content:quickstart/quickstart': OverridableExtensionDefinition<{
22-
kind: 'app-drawer-content';
23-
name: 'quickstart';
24-
config: {
25-
defaultWidth: number | undefined;
26-
resizable: boolean | undefined;
27-
priority: number | undefined;
28-
};
29-
configInput: {
30-
defaultWidth?: number | undefined;
31-
resizable?: boolean | undefined;
32-
priority?: number | undefined;
33-
};
34-
output: ExtensionDataRef<AppDrawerContent, 'app.drawer.content', {}>;
35-
inputs: {};
36-
params: {
37-
id: string;
38-
element: React.ReactElement;
39-
resizable?: boolean;
40-
defaultWidth?: number;
41-
priority?: number;
42-
};
43-
}>;
44-
'gh-menu-item:quickstart/quickstart': OverridableExtensionDefinition<{
45-
kind: 'gh-menu-item';
46-
name: 'quickstart';
47-
config: {
48-
priority: number | undefined;
49-
title: string | undefined;
50-
titleKey: string | undefined;
51-
icon: string | undefined;
52-
link: string | undefined;
53-
sectionLabel: string | undefined;
54-
sectionLink: string | undefined;
55-
sectionLinkLabel: string | undefined;
56-
};
57-
configInput: {
58-
link?: string | undefined;
59-
title?: string | undefined;
60-
icon?: string | undefined;
61-
titleKey?: string | undefined;
62-
priority?: number | undefined;
63-
sectionLabel?: string | undefined;
64-
sectionLink?: string | undefined;
65-
sectionLinkLabel?: string | undefined;
66-
};
67-
output: ExtensionDataRef<
68-
GlobalHeaderMenuItemData,
69-
'global-header.menu-item',
70-
{}
71-
>;
72-
inputs: {};
73-
params: MenuItemParams;
74-
}>;
75-
}
76-
>;
77-
export default _default;
78-
79-
// @alpha
80-
export const quickstartInitModule: FrontendModule;
81-
829
// @public
8310
export const quickstartTranslationRef: TranslationRef<
8411
'plugin.quickstart',
@@ -146,8 +73,5 @@ export const quickstartTranslationRef: TranslationRef<
14673
// @public
14774
export const quickstartTranslations: TranslationResource<'plugin.quickstart'>;
14875

149-
// @alpha
150-
export const quickstartTranslationsModule: FrontendModule;
151-
15276
// (No @packageDocumentation comment for this package)
15377
```
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
## API Report File for "@red-hat-developer-hub/backstage-plugin-quickstart"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
import { BackstagePlugin } from '@backstage/core-plugin-api';
7+
import { CSSProperties } from 'react';
8+
import { JSX as JSX_2 } from 'react/jsx-runtime';
9+
import { PropsWithChildren } from 'react';
10+
import { TranslationRef } from '@backstage/frontend-plugin-api';
11+
import { TranslationResource } from '@backstage/frontend-plugin-api';
12+
13+
// @public
14+
export type DrawerPartialState = {
15+
id: string;
16+
isDrawerOpen: boolean;
17+
drawerWidth: number;
18+
setDrawerWidth: (width: number) => void;
19+
closeDrawer: () => void;
20+
};
21+
22+
// @public
23+
export type DrawerStateExposerProps = {
24+
onStateChange: (state: DrawerPartialState) => void;
25+
};
26+
27+
// @public
28+
export const filterQuickstartItemsByRole: (
29+
items: QuickstartItemData[],
30+
userRole: string,
31+
) => QuickstartItemData[];
32+
33+
// @public
34+
export const QuickstartButton: (
35+
input: QuickstartButtonProps,
36+
) => JSX_2.Element | null;
37+
38+
// @public
39+
export interface QuickstartButtonProps {
40+
onClick?: () => void;
41+
style?: CSSProperties;
42+
title?: string;
43+
}
44+
45+
// @public
46+
export const QuickstartDrawerContent: () => JSX_2.Element | null;
47+
48+
// @public
49+
export interface QuickstartDrawerContextType {
50+
closeDrawer: () => void;
51+
drawerWidth: number;
52+
isDrawerOpen: boolean;
53+
openDrawer: () => void;
54+
roleLoading: boolean;
55+
setDrawerWidth: React.Dispatch<React.SetStateAction<number>>;
56+
toggleDrawer: () => void;
57+
userRole: UserRole | null;
58+
}
59+
60+
// @public
61+
export const QuickstartDrawerProvider: (
62+
input: PropsWithChildren,
63+
) => JSX_2.Element;
64+
65+
// @public
66+
export const QuickstartDrawerStateExposer: (
67+
input: DrawerStateExposerProps,
68+
) => null;
69+
70+
// @public
71+
export interface QuickstartItemCtaData {
72+
link: string;
73+
text: string;
74+
textKey?: string;
75+
}
76+
77+
// @public
78+
export interface QuickstartItemData {
79+
cta?: QuickstartItemCtaData;
80+
description: string;
81+
descriptionKey?: string;
82+
icon?: string;
83+
roles?: string[];
84+
title: string;
85+
titleKey?: string;
86+
}
87+
88+
// @public
89+
export const quickstartPlugin: BackstagePlugin<{}, {}, {}>;
90+
91+
// @public
92+
export const quickstartTranslationRef: TranslationRef<
93+
'plugin.quickstart',
94+
{
95+
readonly 'header.title': string;
96+
readonly 'header.subtitle': string;
97+
readonly 'steps.setupAuthentication.title': string;
98+
readonly 'steps.setupAuthentication.description': string;
99+
readonly 'steps.setupAuthentication.ctaTitle': string;
100+
readonly 'steps.configureRbac.title': string;
101+
readonly 'steps.configureRbac.description': string;
102+
readonly 'steps.configureRbac.ctaTitle': string;
103+
readonly 'steps.configureGit.title': string;
104+
readonly 'steps.configureGit.description': string;
105+
readonly 'steps.configureGit.ctaTitle': string;
106+
readonly 'steps.managePlugins.title': string;
107+
readonly 'steps.managePlugins.description': string;
108+
readonly 'steps.managePlugins.ctaTitle': string;
109+
readonly 'steps.importApplication.title': string;
110+
readonly 'steps.importApplication.description': string;
111+
readonly 'steps.importApplication.ctaTitle': string;
112+
readonly 'steps.learnAboutCatalog.title': string;
113+
readonly 'steps.learnAboutCatalog.description': string;
114+
readonly 'steps.learnAboutCatalog.ctaTitle': string;
115+
readonly 'steps.exploreSelfServiceTemplates.title': string;
116+
readonly 'steps.exploreSelfServiceTemplates.description': string;
117+
readonly 'steps.exploreSelfServiceTemplates.ctaTitle': string;
118+
readonly 'steps.findAllLearningPaths.title': string;
119+
readonly 'steps.findAllLearningPaths.description': string;
120+
readonly 'steps.findAllLearningPaths.ctaTitle': string;
121+
readonly 'steps.setupLightspeed.title': string;
122+
readonly 'steps.setupLightspeed.description': string;
123+
readonly 'steps.setupLightspeed.ctaTitle': string;
124+
readonly 'steps.getStartedWithLightspeed.title': string;
125+
readonly 'steps.getStartedWithLightspeed.description': string;
126+
readonly 'steps.getStartedWithLightspeed.ctaTitle': string;
127+
readonly 'button.quickstart': string;
128+
readonly 'button.openQuickstartGuide': string;
129+
readonly 'button.closeDrawer': string;
130+
readonly 'button.gotIt': string;
131+
readonly 'snackbar.helpPrompt': string;
132+
readonly 'footer.progress': string;
133+
readonly 'footer.notStarted': string;
134+
readonly 'footer.hide': string;
135+
readonly 'content.emptyState.title': string;
136+
readonly 'item.expandAriaLabel': string;
137+
readonly 'item.collapseAriaLabel': string;
138+
readonly 'item.expandButtonAriaLabel': string;
139+
readonly 'item.collapseButtonAriaLabel': string;
140+
readonly 'dev.pageTitle': string;
141+
readonly 'dev.pageDescription': string;
142+
readonly 'dev.drawerControls': string;
143+
readonly 'dev.currentState': string;
144+
readonly 'dev.stateOpen': string;
145+
readonly 'dev.stateClosed': string;
146+
readonly 'dev.instructions': string;
147+
readonly 'dev.step1': string;
148+
readonly 'dev.step2': string;
149+
readonly 'dev.step3': string;
150+
readonly 'dev.step4': string;
151+
readonly 'dev.step5': string;
152+
}
153+
>;
154+
155+
// @public
156+
export const quickstartTranslations: TranslationResource<'plugin.quickstart'>;
157+
158+
// @public
159+
export const useQuickstartDrawerContext: () => QuickstartDrawerContextType;
160+
161+
// @public
162+
export type UserRole = 'admin' | 'developer';
163+
164+
// (No @packageDocumentation comment for this package)
165+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## API Report File for "@red-hat-developer-hub/backstage-plugin-quickstart"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
import { FrontendModule } from '@backstage/frontend-plugin-api';
7+
8+
// @public
9+
const quickstartInitModule: FrontendModule;
10+
export default quickstartInitModule;
11+
12+
// (No @packageDocumentation comment for this package)
13+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## API Report File for "@red-hat-developer-hub/backstage-plugin-quickstart"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
import { FrontendModule } from '@backstage/frontend-plugin-api';
7+
8+
// @public
9+
const quickstartTranslationsModule: FrontendModule;
10+
export default quickstartTranslationsModule;
11+
12+
// (No @packageDocumentation comment for this package)
13+
```

0 commit comments

Comments
 (0)