-
-
Couldn't load subscription status.
- Fork 10.3k
feat: enable/disable dashboard features #37921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally toggling profile:email off and worked as expected!
* feat: enable/disable dashboard features * use the set directly * move enabled features to common * remove sneaky any --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This PR adds client side (non-API-driven) support for disabling dashboard features. It extends the existing
useIsFeatureEnabled()hook.API Design
How to add support for enabling/disabling a new feature in the dashboard:
Add a name and description to
enabled-features.schema.jsonThe naming convention should be
group:feature. This PR includes the examples:profile:show_emailandprofile:update. These names can conflict with existing feature names returned by the API. This is so we can have API or Frontend control over a feature.Add the default state (true/false for on/off) in
enabled-features.json. Generally we should be defaulting to true for hosted studio.Implement
useIsFeatureEnabled()to conditionally check if a feature is enabled.For a single check:
For checking multiple features at a time: