-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
View/edit modes for dashboard #10585
Conversation
@stacey-gammon I think this works really, really well. Let me explain why. Why this worksHere's how web apps typically present this flow to users when they're editing generic text-based documents, e.g. a blog post (see examples in #9431 (comment)): The user is usually given Save and Cancel buttons, which is what you've provided in this PR. To be explicit to the point of redundancy, here's how this UX maps to Dashboard: This is the same as what you've built but with the order of the buttons changed around. So I think this PR has established the right UX, for three reasons:
Save and Cancel UXThe Save UX looks good to me but I think we can improve the Cancel UX. When a user clicks Save, the user has the opportunity to change some metadata including the Dashboard name, confirms the save, and then gets sent back to the View mode, with a confirmation that the save action was successful: I think the way we currently handle Cancel is a little confusing, because we're actually prompting the user to save: Instead, I think we should simply confirm that canceling is what the user wants to do. This is a little clearer and is more in-line with what the user would expect: |
@cjcenizal Do we still want to call out changes made to filter/query/time picker? If so, in that case should it say:
|
@cjcenizal One more design question - Do we still want |
Yes, I think we should still let the user know that these parts of the visualization have changed. Let's use the message: "Are you sure you want to cancel and lose your changes? This includes changes made to your [filter, query, and/or timepicker]." I think we should put "Yes, lose changes" on the right side and make that a Primary Button. We should assume users are making deliberate decisions and our UI should support the fulfillment of these intentions (while still giving them the opportunity to recognize and correct mistakes). Since this is the confirmation of the user's intent, we should make it the most prominent choice. But because this is a potentially destructive action (losing valuable work) we shouldn't make this a completely frictionless experience. We should avoiding autofocusing these buttons, or if one is auto-focused, it should be the "No, keep working" button. We could also try making the "Yes, lose changes" button into a Danger Button, which will stand out to color-sighted users and let them know they should pay attention here. I wonder if this is too much though? |
a18470d
to
a0ae46f
Compare
@stacey-gammon I know we discussed adding clone back in as a separate PR. Did you end up creating one? I don't want to lose track of this. I believe it makes the re-using of a dashboard significantly more intuitive. It is also something we might want to explore for visualizations. |
I agree @alexfrancoeur. I haven't gotten around to it yet and probably won't before Elasticon. Filed an issue here to track: #10621. |
Hmmm, console test error in selenium. Can't see how this PR would have affected that:
jenkins test this |
Looks like another unrelated error:
jenkins test this |
jenkins test this |
ef314e4
to
7012de0
Compare
51e4ef8
to
93fdd03
Compare
'''
jenkins test this. Think this might be a transitory issue. Will have to keep a close eye. |
Another possible flaky test to keep an eye on:
|
@stacey-gammon We've discussed a few times, but overall the feedback for this iteration of view/edit mode has been positive. I'll be sharing the usability feedback early next week. New users had no problem understanding the concept of view edit. Experienced users sometimes did not immediately find the edit button and were looking in the legend, clicking into the visualization and then clicking edit or simply leaving the page to edit a visualization. Once the concept was understood it was mostly praised and had no problem with the workflow. I did run into a bug when attempting to check out yesterday. It looks like there is an issue merging the modal dialog boxes and the most recent build of master.
|
eb4c3a1
to
c430761
Compare
@alexfrancoeur Conflicts are all merged now. I didn't run into that bug, but added some tests that should catch it if it ever does appear. |
c430761
to
07e0029
Compare
and add tests to catch it.
and add tests.
- Merge function only used in one spot inline. Add comments
Instead, export each function individually.
9e36fe7
to
5e76980
Compare
rebased with master and all feedback should be addressed! Any more feedback @kobelb? |
@stacey-gammon my only feedback at this time is.... SHIP IT!!! LGTM |
Backports PR #10585 **Commit 1:** Start at view/edit mode 4 * Original sha: a89ce34 * Authored by Stacey Gammon <[email protected]> on 2017-02-25T17:24:02Z **Commit 2:** Revert back to save panel - Get rid of `clone` - Get rid of rename * Original sha: cfb3372 * Authored by Stacey Gammon <[email protected]> on 2017-02-25T17:35:05Z **Commit 3:** Move order of top nav component around so no chance of hitting Edit -> Cancel * Original sha: 000e857 * Authored by Stacey Gammon <[email protected]> on 2017-02-25T17:43:07Z **Commit 4:** Update "lose changes" confirmation dialog - Change the string and button text - Set default focus on the cancel button. * Original sha: 542e7bf * Authored by Stacey Gammon <[email protected]> on 2017-02-28T16:03:39Z **Commit 5:** Remove DashboardViewMode It was previously used when viewMode wasn’t stored in appState, in order to keep an unsaved dashboard, that was just saved, in Edit mode. This is unnecessary in the latest iteration. * Original sha: 39ba9e3 * Authored by Stacey Gammon <[email protected]> on 2017-03-01T21:51:09Z **Commit 6:** Pull time filter out of dashboard_state * Original sha: 7875547 * Authored by Stacey Gammon <[email protected]> on 2017-03-02T16:01:16Z **Commit 7:** Fix edit controls bug, add more tests, make other tests more stable. * Original sha: 774267c * Authored by Stacey Gammon <[email protected]> on 2017-03-03T14:26:33Z **Commit 8:** Remove unnecessary logic, unapplied query bug fix, code clean up * Original sha: 9cf402a * Authored by Stacey Gammon <[email protected]> on 2017-03-03T18:19:15Z **Commit 9:** Fix bug on filter reloading, add tests & clean up * Original sha: 97c3054 * Authored by Stacey Gammon <[email protected]> on 2017-03-03T20:30:11Z **Commit 10:** Fix issue with move and remove icons showing up in expanded panel mode and add tests to catch it. * Original sha: b8195c4 * Authored by Stacey Gammon <[email protected]> on 2017-03-17T17:30:06Z **Commit 11:** Fix issue with lose changes not resetting panel state and add tests. * Original sha: f92d8f6 * Authored by Stacey Gammon <[email protected]> on 2017-03-17T20:15:12Z **Commit 12:** General Clean Up - Merge function only used in one spot inline. Add comments * Original sha: badf336 * Authored by Stacey Gammon <[email protected]> on 2017-03-17T20:50:55Z **Commit 13:** address code review comments * Original sha: 0c61fc7 * Authored by Stacey Gammon <[email protected]> on 2017-03-21T14:11:41Z **Commit 14:** Stop using static + class to namespace functions Instead, export each function individually. * Original sha: b0745aa * Authored by Stacey Gammon <[email protected]> on 2017-03-22T13:18:27Z **Commit 15:** Show dashed border on maximized panels in edit mode. * Original sha: ec5393b * Authored by Stacey Gammon <[email protected]> on 2017-03-22T14:09:01Z **Commit 16:** Be more methodical about ensuring the modal dialog hides before continuing. * Original sha: 07a031f * Authored by Stacey Gammon <[email protected]> on 2017-03-22T14:26:56Z **Commit 17:** abide by new no unused vars rule * Original sha: 5e76980 * Authored by Stacey Gammon <[email protected]> on 2017-03-22T16:32:30Z
Nice! Can you update the PR description/title with more details about this? Copying and pasting from previous PRs is probably sufficient so long as the info is up to date. |
which kibana version will this feature be merged? |
Amazing work everyone. Testing the new build out. |
@xycloud We label the PRs with version numbers when they get merged to indicate target versions. @SnchitGrover There are some difficulties we still need to overcome with Kibana's architecture before we start bubbling up security into the UI like you describe, but that definitely seems like a good use case! |
* Start at view/edit mode 4 * Revert back to save panel - Get rid of `clone` - Get rid of rename * Move order of top nav component around so no chance of hitting Edit -> Cancel * Update "lose changes" confirmation dialog - Change the string and button text - Set default focus on the cancel button. * Remove DashboardViewMode It was previously used when viewMode wasn’t stored in appState, in order to keep an unsaved dashboard, that was just saved, in Edit mode. This is unnecessary in the latest iteration. * Pull time filter out of dashboard_state * Fix edit controls bug, add more tests, make other tests more stable. * Remove unnecessary logic, unapplied query bug fix, code clean up * Fix bug on filter reloading, add tests & clean up * Fix issue with move and remove icons showing up in expanded panel mode and add tests to catch it. * Fix issue with lose changes not resetting panel state and add tests. * General Clean Up - Merge function only used in one spot inline. Add comments * address code review comments * Stop using static + class to namespace functions Instead, export each function individually. * Show dashed border on maximized panels in edit mode. * Be more methodical about ensuring the modal dialog hides before continuing. * abide by new no unused vars rule
* Start at view/edit mode 4 * Revert back to save panel - Get rid of `clone` - Get rid of rename * Move order of top nav component around so no chance of hitting Edit -> Cancel * Update "lose changes" confirmation dialog - Change the string and button text - Set default focus on the cancel button. * Remove DashboardViewMode It was previously used when viewMode wasn’t stored in appState, in order to keep an unsaved dashboard, that was just saved, in Edit mode. This is unnecessary in the latest iteration. * Pull time filter out of dashboard_state * Fix edit controls bug, add more tests, make other tests more stable. * Remove unnecessary logic, unapplied query bug fix, code clean up * Fix bug on filter reloading, add tests & clean up * Fix issue with move and remove icons showing up in expanded panel mode and add tests to catch it. * Fix issue with lose changes not resetting panel state and add tests. * General Clean Up - Merge function only used in one spot inline. Add comments * address code review comments * Stop using static + class to namespace functions Instead, export each function individually. * Show dashed border on maximized panels in edit mode. * Be more methodical about ensuring the modal dialog hides before continuing. * abide by new no unused vars rule
In 5.4 we've introduced |
What
Create two separate modes in dashboard, "View" and "Edit", so we can optimize the user experience around each.
Why
Future benefits
What this is not
This feature and discussion is separate from optimizing the user experience around embedded or full screen mode. That feature will require further thought, but at a high level, we'll likely expose options during the share and link creation process so embedded links can be customized (e.g. show search bar, show timepicker, allow resize and move).
fixes #9431