-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: Enable taxonomy/tagging feature in MFE by default #34633
feat: Enable taxonomy/tagging feature in MFE by default #34633
Conversation
Thanks for the pull request, @rpenido! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
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.
👍 @rpenido Great work, looks good to me!
- I tested this: I followed the instructions in the PR
- I read through the code
-
I checked for accessibility issues - Includes documentation
|
||
def create_flags(apps, schema_editor): |
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.
nit: add more more blank line/space between the imports and function def. Not sure why the linter in the CI didn't catch it.
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.
Thank you for noticing this! Fixed here: 720ce0b30fadc2202a43030ee3be279e0d090204
@rpenido Do we really need a migration for this? Can't we just change the default in the code? |
I will check/test it, but it makes sense to work only to changing the default. |
Hi @bradenmacdonald ! From my research, it is not possible to do it easily without a migration. We have the Also, we use migrations to set defaults in our codebase:
Let me know what you think! |
@rpenido OK, I guess a migration is fine. BTW This might be a good time to rename the flag to Also, I'm not sure if the "Automatic tagging" has been tested well enough to turn it on by default yet - let me ask about that. |
@rpenido Yeah, I just checked with @jmakowski1123 and since the "automatic tagging" hasn't been tested enough (and probably won't be), we want to leave it off by default. So, if you want, one option is to replace |
Sure @bradenmacdonald! I will make this change and let you know when it's ready to review again! But in that case, I think we would still want a migration to clean the old flag from database as it will not be used anymore and may cause confusion. Or you think this is not necessary? |
f581786
to
0d5fe4f
Compare
@rpenido That's not necessary - the waffle flag has never been included in a release version, so it's likely only a few of us developers that have it. |
3be828e
to
014295c
Compare
@@ -150,6 +150,6 @@ def test_number_of_calls_to_db(self): | |||
""" | |||
Test to check number of queries made to mysql and mongo | |||
""" | |||
with self.assertNumQueries(29, table_ignorelist=WAFFLE_TABLES): | |||
with self.assertNumQueries(31, table_ignorelist=WAFFLE_TABLES): |
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.
These are from the tag count queries
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.
Now +3: (1 for the course as a whole, 1 for all the blocks in the course, and 1 for getting the org-specific value of COURSE_AUTHORING_MICROFRONTEND_URL
(within get_course_authoring_url
within get_taxonomy_tags_widget_url
within _get_course_index_context
).
@@ -717,7 +717,7 @@ def test_number_of_calls_to_db(self): | |||
""" | |||
Test to check number of queries made to mysql and mongo | |||
""" | |||
with self.assertNumQueries(26, table_ignorelist=WAFFLE_TABLES): | |||
with self.assertNumQueries(28, table_ignorelist=WAFFLE_TABLES): |
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.
These are from the tag count queries
8fe6de5
to
e5640c1
Compare
e5640c1
to
b272763
Compare
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.
@rpenido Thanks for your work on this! It's almost there, I've gone through the testing steps for this and noticed a few issues:
After deleting the tags mentioned in the testing instructions, by default the manage tags and taxonomies tabs/buttons appear as expected. However, when I try the new content_tagging.disabled
flag, it only hides the Taxonomies
tab in the course authoring mfe, however the "manage tags" buttons still appear. I left a comment in the mfe PR.
Also in legacy studio UI, the manage tags no longer appears regardless of the flag being set or not, that is because there is some missing code needed below.
Great review @yusuf-musleh - thanks :) |
@yusuf-musleh Can you please take another look at this? It should be ready to go now. |
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.
👍 @bradenmacdonald Looks good to me, its working well now!
- I tested this: I followed the testing instructions in the PR
- I read through the code
-
I checked for accessibility issues -
includes documentation
I tested this and it should be safe to merge before the associated course-authoring PR. Tagging features will still be disabled on edx.org. I already asked them to proactively set the |
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.
Minor nit in that I think it's more clear to always have the function be is_xxxxxx_enabled()
and then have it do the right thing when switching waffle flags. But I certainly won't hold this up over that.
…ure-in-mfe-by-default' into taxonomy-sandbox-20240508
…/fal-3708-enable-taxonomy-tagging-feature-in-mfe-by-default
@rpenido 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
* feat: make tagging feature enabled by default * fix: use the correct flag for tagging enabled * fix: make compatible with other changes from master * fix: more compatibility fixes * fix: show tag counts at all levels of the outline, not just units * chore: typo * test: fix counts in test suite now that tagging is on by default --------- Co-authored-by: Braden MacDonald <[email protected]> Co-authored-by: Yusuf Musleh <[email protected]>
Description
This PR sets the tagging feature as enabled by default and creates a new waffle flag,
content_tagging.disabled,
to allow the feature to be turned off.Testing Instructions
new_studio_mfe.use_tagging_taxonomy_list_page
content_tagging.auto
content_tagging.disabled
and set it toTrue
toeveryone
Private ref: FAL-3708