Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Multiple variant tags filtering #3502
Multiple variant tags filtering #3502
Changes from 11 commits
71e905d
424e66b
cc216dc
f13dc6c
ab47e9c
f3b94bf
48f0111
de8cbd4
83e3979
fed9cdd
ee46678
5162ae9
561822e
303981c
b45b050
6b7a039
7ea4f23
e46151c
f05bc63
eacc42c
b2e440e
72711c2
de1927b
03185c6
5072223
fae6d42
664394f
fb288fe
cc04e2c
00e37d4
91d3959
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
should be
tag_types
plural, as it is a collection of models not a single modelThere 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 function is only used twice so theres no reused behavior for
mock_get_ws_access_level
at all anymore - it wold be better to take that check out of the helper and explicitly add the correct check for it after calling this helperThere 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.
The behaviors include: if the latest selected option is a category, remove all selected options; otherwise if the previous (or the first) selected option is a category, remove the category option.
The issue is that when a category is selected, the category disappears from the option list.
No category is selected:
After a category (
Collaboration
) is selected: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.
if a category is selected, all the tags in the category should be shown as selected and should be added to the list of selected tag breadcrumbs, the category itself should remain in the dropdown and clicking it again will have no effect
Also, selected tags need to be the color of the tag, similar to how they behave in the UI for adding tags to a variant
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.
How about the category also disappear from the dropdown list? It is much easier to implement and it doesn't make sense to click on a selected category.
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.
what was the advantage of moving this? The constant is only ever used here so it is better to keep it in the file. In general, PRs should really focus on changing the behavior needed for the actual functional change, adding unrelated changes makes reviewing the actual functional changes harder
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.
Oh, you are right. I used the tag options for the reducer to update the tag-loaded state before my latest update. We don't need it 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.
A multiple dropdown should have a list as its value, and it should therefore handle adding or removing elements to that list smoothly, and you should not be writing this sort of custom logic
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.
All the custom logic is about the
SHOW_ALL
option. We need to remove the existingSHOW_ALL
when adding a new option and remove all current options if the last option isSHOW_ALL
.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.
show all should not act like a multi-option - there should be no way to select "show all" and also select other tags. Is there a reason users should even have the show all option anymore on the summary page? Presumably, if they send a request with no tags we will return results for all tags, so just have "All" be something thats shown by default when the tag list is empty should be suufficient
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.
Doesn't doing the split here means all the above logic for MME/notes would not work?
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.
MME Submission/Has Notes
won't work for multiple-tag filtering. They are not required since they are not on the summary data options list. But we should have a more systemic solution for handling tag/tags 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.
Since we filter the tags in the backend and don't support the project saved-variant multiple-tag filtering, these changes are unnecessary.