feat(core-plugin-api): add optional description to plugin feature flags
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
---
|
||||
'@backstage/core-plugin-api': patch
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
Add optional `description` field to plugin-level feature flags.
|
||||
|
||||
Plugin developers can now provide an optional description for their feature flags:
|
||||
|
||||
```ts
|
||||
export const myPlugin = createPlugin({
|
||||
id: 'my-plugin',
|
||||
featureFlags: [
|
||||
{
|
||||
name: 'show-beta-feature',
|
||||
description: 'Enables the new beta dashboard view',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
If no description is provided, the default "Registered in {pluginId} plugin" message is shown.
|
||||
|
||||
```
|
||||
@@ -336,6 +336,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
||||
for (const flag of plugin.getFeatureFlags()) {
|
||||
featureFlagsApi.registerFlag({
|
||||
name: flag.name,
|
||||
description: flag.description,
|
||||
pluginId: plugin.getId(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ export type BackstagePlugin<
|
||||
export type PluginFeatureFlagConfig = {
|
||||
/** Feature flag name */
|
||||
name: string;
|
||||
/** Feature flag description */
|
||||
description?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user