-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
File tree diff: migrate feature flag to model field #11793
base: main
Are you sure you want to change the base?
Conversation
There is no need to use a feature flag for this. We can use a model field as we are doing for all the other addons. As we are not exposing this field to the user yet, they can't enable it by themselves yet. So, we still have the control of it. This follows the pattern we have for all the other addons.
create_manifest = version.project.addons.filetreediff_enabled and ( | ||
version.is_external or version.slug == LATEST |
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 like test are failing because projects don't have an addons object. I think we should create one for each project on a post save signal, otherwise we will see that error in production as well.
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.
I thought we had this in place already 🤔 . I know we are automatically creating an AddonsConfig
somewhere..., but I don't remember wehere.
@@ -185,6 +185,9 @@ class AddonsConfig(TimeStampedModel): | |||
# EthicalAds | |||
ethicalads_enabled = models.BooleanField(default=True) | |||
|
|||
# File Tree Diff | |||
filetreediff_enabled = models.BooleanField(default=False, null=True, blank=True) |
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.
I feel like we probably want to discuss the branding here before we bake it into the models. I feel like File Tree Diff
is a weird name, and we probably want something a bit more user friendly.
I know we talked about Files changed
being joint branding for docdiff & FTD, but I'm open to other ideas. We could always just have Files changed
be a top-level concept for a workflow that includes docdiff and filetreediff?
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.
I like the "generic name" Files changed
to involve both features: docdiff and file tree diff. Due to each addon being very specific (but related, tho), I'm not able to find better names for each of them. Both names are not ideal for marketing purposes; but are pretty descriptive of what they are... for a developer at least 😅
I think it's hard to explain what they do in a simple and nice name:
- Documentation page changes
- Files changed between versions
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.
@agjohnson @stsewd do you have any idea/suggestion?
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.
Documentation diff
/ DocDiff
is also something we could use as overarching branding if we wanted, and is at least "brandable".
There is no need to use a feature flag for this. We can use a model field as we are doing for all the other addons.
As we are not exposing this field to the user yet, they can't enable it by themselves yet. So, we still have the control of it.
This follows the pattern we have for all the other addons.