Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-07-08 12:33:02 +02:00
parent 5bb73faa54
commit 80da5162c7
9 changed files with 58 additions and 30 deletions
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/core-plugin-api': patch
---
Introduced plugin options for the components, to be able to customise existing components.
Those customizations are stored in React context of the plugin.
The configurable options could be defined during the creation of the plugin via `__experimentalConfigure` method.
And the user of the plugin can redefine it with.
-24
View File
@@ -1,24 +0,0 @@
---
'@backstage/app-defaults': patch
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
'@backstage/plugin-catalog': patch
---
Introduced plugin options for the components, to be able to customise existing components.
The author of the component might define the configurable places of the component, and the user of this
component can reconfigure it if necessary.
The configurable options could be defined during the creation of the plugin via `__experimentalConfigure` method.
And the user of the plugin can redefine it with
```typescript jsx
import { catalogPlugin } from '@backstage/plugin-catalog';
catalogPlugin.__experimentalReconfigure({
createButtonTitle: 'New',
});
```
Also introduced an extra parameter in BackstagePlugin.
This optional parameter is responsible for providing a type for input options for the plugin.
+15
View File
@@ -0,0 +1,15 @@
---
'@backstage/plugin-catalog': minor
---
Plugin catalog has been modified to use an experimental feature where you can customize the title of the create button.
You can modify it by doing next:
```typescript jsx
import { catalogPlugin } from '@backstage/plugin-catalog';
catalogPlugin.__experimentalReconfigure({
createButtonTitle: 'New',
});
```
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/app-defaults': patch
---
Introduced an extra parameter in BackstagePlugin.
This optional parameter is responsible for providing a type for input options for the plugin.
```
myPlugin.__experimentalReconfigure({
...
});
```
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-app-api': patch
---
Introduced an extra parameter in BackstagePlugin.
This optional parameter is responsible for providing a type for input options for the plugin.
+2 -2
View File
@@ -155,7 +155,7 @@ export type AppConfigLoader = () => Promise<AppConfig[]>;
// @public
export type AppContext = {
getPlugins(): BackstagePlugin<any, any>[];
getPlugins(): BackstagePlugin<any, any, any>[];
getSystemIcon(key: string): IconComponent | undefined;
getComponents(): AppComponents;
};
@@ -254,7 +254,7 @@ export type AuthApiCreateOptions = {
// @public
export type BackstageApp = {
getPlugins(): BackstagePlugin<any, any>[];
getPlugins(): BackstagePlugin<any, any, any>[];
getSystemIcon(key: string): IconComponent | undefined;
getProvider(): ComponentType<{}>;
getRouter(): ComponentType<{}>;
+9 -4
View File
@@ -639,10 +639,15 @@ export type PluginFeatureFlagConfig = {
name: string;
};
// Warning: (ae-forgotten-export) The symbol "PluginOptionsProviderProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "PluginProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export interface PluginOptionsProviderProps {
// (undocumented)
children: ReactNode;
// (undocumented)
plugin?: BackstagePlugin;
}
// @alpha
export const PluginProvider: ({
children,
plugin,
@@ -15,3 +15,4 @@
*/
export { usePluginOptions, PluginProvider } from './usePluginOptions';
export type { PluginOptionsProviderProps } from './usePluginOptions';
@@ -34,6 +34,11 @@ export interface PluginOptionsProviderProps {
plugin?: BackstagePlugin;
}
/**
* Contains the plugin configuration.
*
* @alpha
*/
export const PluginProvider = ({
children,
plugin,