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:
ElaineDeMattosSilvaB
2025-12-08 13:03:23 +01:00
parent e1e0dc6eab
commit 0452d02693
3 changed files with 26 additions and 0 deletions
+23
View File
@@ -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;
};
/**