-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: Removing parent filter causes incorrect state of child filter #16876
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16876 +/- ##
==========================================
- Coverage 77.05% 77.02% -0.03%
==========================================
Files 1021 1022 +1
Lines 54693 54859 +166
Branches 7457 7482 +25
==========================================
+ Hits 42141 42256 +115
- Misses 12307 12356 +49
- Partials 245 247 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thanks for fixing this + making the code much more readable 👍
restoreFilter, | ||
form, | ||
parentFilters, | ||
}: FiltersConfigFormProps, | ||
ref: React.RefObject<any>, | ||
) => { | ||
const removed = !!removedFilters[filterId]; |
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: isRemoved
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DASHBOARD_NATIVE_FILTERS_SET=true FEATURE_DASHBOARD_FILTERS_EXPERIMENTAL=true |
@geido Ephemeral environment spinning up at http://52.13.99.32:8080. Credentials are |
Hi @michael-s-molina. I found a problem with deleting and undoing a deletion on the fly without saving. As you can see in the video the child filter won't show as hierarchical after the parent filter has been removed and then added back again. Video.Game.Sales.1.mp4 |
@geido I noticed that in my tests. It's related to the form |
I was able to reproduce the correct behavior on master. It appears that the hierarchical setting is properly restored when undoing. One difference that I see is that you have to re-open the "Advanced" section in master currently. Not sure if that is related. Video.Game.Sales.3.mp4 |
@geido I changed the strategy to present "(deleted)" when a parent is removed. This works for saved and non-saved filters. Screen.Recording.2021-09-29.at.11.30.13.AM.mov |
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.
LGTM! Thanks for the fix!
Ephemeral environment shutdown and build artifacts deleted. |
…pache#16876) * fix: Removing parent filter causes incorrect state of child filter * removed to isRemoved * Shows (deleted) when the parent is removed * Removes unnecessary code
…pache#16876) * fix: Removing parent filter causes incorrect state of child filter * removed to isRemoved * Shows (deleted) when the parent is removed * Removes unnecessary code
SUMMARY
Fixes #16825
It also fixes another issue where the advanced section was being collapsed when a user unchecked all the options.
@junlincc @jinghua-qa It would be great to have your approval.
AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-09-28.at.2.55.39.PM.mov
TESTING INSTRUCTIONS
Check the original issue for instructions.
ADDITIONAL INFORMATION