-
Notifications
You must be signed in to change notification settings - Fork 14k
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: Explore misleading save action #24862
fix: Explore misleading save action #24862
Conversation
placeholder={ | ||
<div> | ||
<b>{t('Select')}</b> | ||
{t(' a dashboard OR ')} |
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 labels should be a good example of adding unit tests.
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.
Yes but I'll focus on the PR changes. This part was only indented.
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.
I think this change makes the process more intuitive, so lgtm design wise. Thanks!
Codecov Report
@@ Coverage Diff @@
## master #24862 +/- ##
==========================================
+ Coverage 68.99% 69.01% +0.01%
==========================================
Files 1903 1904 +1
Lines 74073 74111 +38
Branches 8193 8196 +3
==========================================
+ Hits 51108 51145 +37
- Misses 20844 20847 +3
+ Partials 2121 2119 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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
(cherry picked from commit bf1b1a4)
SUMMARY
When saving a chart in Explore, we have different states:
Currently, the Save modal buttons change to accommodate different combination of states:
The problem is that are missing some combinations which leads to confusion when saving charts:
One example of such confusion is when a user is not an owner of a chart but can save that chart as a new one. The button displays Save & go to dashboard which leads the user to think that a chart will be overridden in that dashboard but what actually happens is that a new chart is created and added to the dashboard. One can argue that the Save as radio selection would be sufficient to indicate the difference but that's not the case. Specially because we're changing the buttons text for some states and not for others.
To fix this, my first attempt was to make sure the button labels accounted for all possible states but that resulted in a poor UI as you can see bellow:
A better solution was to change the modal to preserve the button labels and add an information message when creating a new chart, a dashboard or both:
This message only appears when it's not clear that a new asset will be created. If a user is creating a chart for the first time and adding it to an existing dashboard, no message is displayed.
This PR also moves the alert message to the bottom, similar to the native filters modal, closer to the dashboard select and save button which are the sources for the alert.
TESTING INSTRUCTIONS
Make sure the correct information message is displayed or not depending on the chart state.
ADDITIONAL INFORMATION