-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Dashboard] Adds Save as button to top menu #90320
Conversation
3a179e1
to
1ef43e2
Compare
1ef43e2
to
1808abd
Compare
@elasticmachine merge upstream |
Pinging @elastic/kibana-presentation (Team:Presentation) |
Looking good and feeling more natural, nice work. Is there a technical reason for having both Cancel and Discard? I feel like we could just have Cancel to cover both situations:
|
The reason there is both a cancel and discard is because during the dashboard unsaved changes PR, I noticed that the user can get into a situation where they are in view mode with unsaved changes simply by pressing the browser back button after doing their edits and I didn't want that action to discard their changes. I also wanted that to feel intentional, instead of like a bug. The badge from #88901 will partially mitigate this by showing their changes are still around, but I thought that separating out 'cancel' and 'discard' would make it more explicit. @cqliu1 has mentioned before that having two buttons feels redundant and I agreed, but didn't have a better solution at the time. Now I'm wondering if we can cover this by adding an extra option in the @cqliu1 & @ryankeairns, do you think this could work? |
Ah right, thanks for the refresher @ThomThomson ! |
I think this should be doable. I'd prefer to handle this in a separate PR and go ahead and merge this one if we're good with the save button changes. Just to clarify, the |
@cqliu1, that is exactly the way I envisioned it! And a followup will definitely work. I wonder if there is a better way to word |
We can hash it out further in the next PR, but one idea comes to min:
|
My 2 cents. I am not a fan of "unsaved changes" persisting while leaving Edit mode and going back to View mode. As a customer, I go to edit mode to make changes, I decide not to, and hit cancel. I go back to View mode. It starts to become fringe for us to support unsaved changes, while allowing a customer to navigate back to View mode. The trade-off here is flexibility for the customer vs complexity for the customer to be aware of (i.e. they go back to Edit mode and discover previous edits, that would be surprising to many I would guess). Happy to chat about this further, there is likely other context that I am not aware of. |
The reason this difference exists in the first place is mostly technical. The edit mode is stored in the URL, so the user can change it simply by using the back and forward browser buttons. Fully discarding any unsaved changes shouldn't be done without a warning / confirmation, and it would introduce design challenges to show a modal when the back button is pressed, and then potentially stop the navigation. I agree that if a user has decided to 'cancel' out of edit mode, they are more than likely looking to discard the changes. Perhaps switching the default call to action on the modal from
This is actually a different, but equally interesting discussion. I can see this being true, but it currently does not work that way. Saving will always boot you out of edit mode, though it is trivial to get back in. |
+1 to keeping the conversation alive post merge. There are some things we've learned to live with here that are atypical / could be improved upon. |
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.
Code is looking great! Tested locally on chrome. I have a few small changes that will help this editing experience align with the others.
- When creating a new item in Visualize, Lens & Maps, the main CTA button is named
save
whereas on dashboard it's currently namedsave as
- In Maps / Vis / Lens, when editing an existing item, the 'save as' button opens with 'save as new ...` preselected.
Overall, everything works as expected, and the quicksave is an awesome addition. This will help us make 7.12.0 feel vastly different / better!
@ThomThomson I updated the label when creating a new dashboard. |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
I appreciate that -- and yes, move your mouse and click Edit again is trivial. Let's continue the discussion. |
You're absolutely right. If you look at other products, saving doesn't boot you out of edit mode, and we should try to be as consistent with the wider ecosystem as possible. I think a meeting would be ideal for us all to talk through the behaviour of all the dashboard top nav buttons, and settle on all of the improvements that need to be made, as well as a time frame for these changes. Dashboard is meant to be the easier / more out of the box presentation tool, so it's important that we make it as intuitive as possible. |
Summary
Related to #85666.
This adds a
Save as
button that triggers the dashboard save modal for editing the dashboard title, description, and tags and changes theSave
button to quick save without triggering the save modal.Changes:
Save
button asSave as
Save
button that performs quick save actionLibrary
andCreate new
buttons from the top menuChecklist
Delete any items that are not applicable to this PR.
For maintainers