-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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(native-filters): Show alert for unsaved filters after cancelling Filter Config Modal #12554
feat(native-filters): Show alert for unsaved filters after cancelling Filter Config Modal #12554
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12554 +/- ##
==========================================
- Coverage 66.75% 63.68% -3.07%
==========================================
Files 1015 486 -529
Lines 49634 29984 -19650
Branches 4839 0 -4839
==========================================
- Hits 33131 19095 -14036
+ Misses 16380 10889 -5491
+ Partials 123 0 -123
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.
Thank you for the PR @agatapst!
to delete will not be saved.
seems a bit confusing to me.
ae702c9
to
299e798
Compare
@junlincc Thanks for you comment. 🙂 I think that's good idea. One more improvement has come to my mind after your suggestion - to add 'and' before the last filter name. That's how it looks now: |
@zhaoyongjie @villebro @rusackas ready for your code review :) |
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 after adding a simple test.
superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx
Show resolved
Hide resolved
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 👍
@agatapst @junlincc Also, the bottom bar with those buttons should not be part of the scrolling window - it causes a bit of jumpiness. Here's a visual for the warning replacing the existing buttons - |
@mihir174 should the main CTA stay at the rightmost position? |
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.
@junlincc @agatapst Tested and looks nice. I found different issue which may be connected with this a little bit but it was already in master. 🟡 Scenario: Open modal again - > you can see on filter list that name is blank but in filter name we have a blank value. In this PR this kind of change will not be captured by warning. Are you able @agatapst to catch this case as well? |
Thank you QA king!! @adam-stasiak this is a real edge case but super good find! |
… Filter Config Modal (#12554) * Add Alert when native filter is canceled and not saved * Improve styles and setting styles visible * Improve displaying filter names * Add tests for canceling native filter modal * Fix linter errors * Refactor Cancel Confirmation Alert
SUMMARY
The aim was to show info at the bottom of Native Filter Config Modal when users clicks 'cancel'.
Now we want the user to confirm this decision when there are unsaved filters.
Fixes #12459
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Confirming cancel:
![canceling_filters](https://user-images.githubusercontent.com/47450693/104759548-5afdee00-5760-11eb-9419-ee69df2e7ce6.gif)
Remove incorrect
![removing_incorrect_alert](https://user-images.githubusercontent.com/47450693/104759593-6c46fa80-5760-11eb-8341-c117d2127ebf.gif)
Alert with long filter names:
![long_filters](https://user-images.githubusercontent.com/47450693/104760233-5d147c80-5761-11eb-921c-bcae16917906.png)
TEST PLAN
Set
"DASHBOARD_NATIVE_FILTERS": True
Create native filter
Click Cancel
ADDITIONAL INFORMATION
cc @junlincc @rusackas @villebro
@adam-stasiak please test it