Skip to content
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

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 25, 2024

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.

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.
@humitos humitos requested a review from a team as a code owner November 25, 2024 12:05
@humitos humitos requested a review from stsewd November 25, 2024 12:05
@humitos humitos enabled auto-merge (squash) November 25, 2024 16:02
@@ -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)
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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?

Copy link
Member

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".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've also been advocating for not using file tree diff to describe this addon or the feature. I think it makes the most sense for both of these features, and the addons and UI, to be combined.

Files changed at least describes the addon now. I don't feel it makes sense as a standalone addon that users can configure though.

Before we ship this, it feels like these should be a single, unified addon/feature. I don't particular like DocDiff for this. Diff view is short and clear, Documentation diff works too. Something closer to that works best I think.

Copy link
Member Author

@humitos humitos Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use visualdiff for docdiff and fileschanged for filetreediff. Those names are pretty explicit about what they are and I think they work well for marketing as well. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He, we are already using Visual Diff in the new dashboard actually:

Screenshot_2024-11-26_18-38-46

Copy link
Contributor

@agjohnson agjohnson Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think visual diff covers both well, I don't see a long term reason to use two names/addons/UIs.

Short term, I don't have opinions about not using filechanged but I would not surface this name in configuration/UI/marketing either. It should just be a single feature.

Copy link
Member Author

@humitos humitos Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I will keep docdiff and filetreediff for the models and code names because we are already using those names in our code. When we expose this to users, I suppose we will use "Visual diff" as we are already doing, and maybe "Files changed" if we have 2 different features.

I don't want to rename the model fields to use fileschanged if we are already using filetreediff for the API response, for the function that calculate the diff, etc. It will just add more confusion to the code.

I'm happy to rename the code methods, functions, model fields, if we finally find a name that we like and we are convinced about 😄

…11794)

Add the field `options_base_version` to allow users specifying what's
the base version they want to compare against in general for those
addons that depend on a base version: DocDiff and File Tree Diff for
now.

Closes #11770
Requires #11793
@humitos humitos merged commit 6112959 into main Nov 27, 2024
5 checks passed
@humitos humitos deleted the humitos/featureflag-to-field branch November 27, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants