-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(insights): add pay gate for data color themes #27644
base: master
Are you sure you want to change the base?
Conversation
Size Change: 0 B Total Size: 1.13 MB ℹ️ View Unchanged
|
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.
Looks good, once we add to billing this should work. I'll wait to test it all before approving.
Replied to you in Slack about billing.
ee/models/license.py
Outdated
@@ -78,6 +78,7 @@ class License(models.Model): | |||
AvailableFeature.SAML, | |||
AvailableFeature.SSO_ENFORCEMENT, | |||
AvailableFeature.ROLE_BASED_ACCESS, | |||
AvailableFeature.DATA_COLOR_THEMES, |
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.
This isn't used so you don't need to add here.
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.
Removed. This brings up another question though: Are we ok with soft-gating features like this? You could still use the API to create custom themes and then use them, we just don't show the UI for it.
Also, should I add special handling for users who downgrade? They could have a custom theme in place and then there's no way to go back to the default theme.
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.
We can also add these on the server, available features is stored on the organization so no paygate but if you search the API you'll see some examples.
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.
Cool, I'll:
(a) shadow the default theme id field on the team serializer to always return the default theme if the feature isn't available and
(b) add a feature check on the create/update endpoints for themes
Amazing, thank you. I've updated this PR https://github.com/PostHog/billing/pull/1075 based on feedback from you and Raquel. |
Problem
We want data color themes to be part of the teams plan, like other white-labelling stuff.
Changes
Adds a pay gate to the settings section:
How did you test this code?
👀 - waiting for some guidance on how to actually set the feature availability up