Plugin Feature Flag Feature Not Working as Documented
See original GitHub issueExpected Behavior
The following should enable a Feature Flag and it currently doesn’t:
import {
createPlugin,
createRoutableExtension,
createRouteRef,
} from '@backstage/core';
import WelcomePageComponent from '../pages/WelcomePage';
export const rootRouteRef = createRouteRef({
title: 'Welcome',
});
export const welcomePlugin = createPlugin({
id: 'welcome',
register({ router, featureFlags }) {
router.addRoute(rootRouteRef, WelcomePageComponent);
featureFlags.register('enable-welcome-box');
},
});
When going to /settings/feature-flags i still see No Feature Flags
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Enable the feature flag for the structured data blocks?
The feature will disable it if selected. Disabling our caching can sometimes fix issues related to the sitemaps. If you are not experiencing...
Read more >Document features deployed behind feature flags - GitLab Docs
A FLAG note renders on the GitLab documentation site as: On self-managed GitLab, by default this feature is not available. To make it...
Read more >Using Feature Flags | Cloud Foundry Docs
This topic describes how Cloud Foundry admins can set feature flags using the Cloud Foundry Command Line Interface (cf CLI) to enable or ......
Read more >Integrate with feature flags - Atlassian Support
Split's documentation. Once the flag has a Jira issue key linked to it, you will see feature flag information in the following places:...
Read more >Feature Flags: What They Are and How to Use Them
Learn about feature flags, the benefits they bring, and how the Space ... Our feature flags are tightly connected to issues in our...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah feature flag API is a bit behind the composability work, iirc it’s currently only possible to check if a flag is active via the API itself, meaning that you’ll need to manually check the state of the flag and then not render the rest of the react tree within your own component. We definitely want to provide some more utilities to make feature flags easier to work with.
One idea is to just have a single
FeatureFlagged
component for use in the app, that’ll both take care of acting as a switch but also register the feature flag. It would be implemented to work with the composability API, and simply act as a switch for whether its children should be renderer. Basically this:Where the
Route
works as expected, is discovered in the app etc, and the"show-welcome-page"
flag is both automatically registered as well as used to toggle whether the welcome page should be renderer. I’m not sure if that exact implementation is possible, but something of that sort x)This’d lift the feature flag registration from plugins to the app, which we can ofc debate a bit 😉
Hy there, Rugvip. If it’s possible, I would like to take some doubt with you: I need to know how to disable this option from the screen. I saw on core-plugin-api folder into node modules that exist a FeatureFlagState Enum where we can declare an attribute none 0. How to put in a component SidebarSettings to disable this element?