Skip to content
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] Add Reset Function to View Mode #132457

Closed
Tracked by #144752
seanbirdsell opened this issue May 18, 2022 · 7 comments · Fixed by #154872
Closed
Tracked by #144752

[Dashboard] Add Reset Function to View Mode #132457

seanbirdsell opened this issue May 18, 2022 · 7 comments · Fixed by #154872
Assignees
Labels
enhancement New value added to drive a business result Feature:Dashboard Dashboard related features Feature:Filters impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Dashboard Usability Related to the Dashboard Usability initiative Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@seanbirdsell
Copy link

Kibana version: 7.15.1

Elasticsearch version: 7.15.1

Server OS version: unknown

Browser version: Chrome Version 101.0.4951.64 (Official Build) (x86_64)

Browser OS version: MacOS 12.3.1

Original install method (e.g. download page, yum, from source, etc.): unknown

Describe the bug: After opening a saved query in a dashboard, the default filters for the board never return, even after re-loading it.

Steps to reproduce:

  1. Open dashboard with existing filters
  2. Select a saved query; filters change (expected)
  3. Select "Clear" from save query; query removed, filters don't re-appear (expected)
  4. Back out to Dashboard selection screen
  5. Select dashboard I started with (it should re-load from saved); filters still missing, though saved date range restored (unexpected)
  6. Edit dashboard
  7. Select "Switch to view mode"; asked to "Discard Changes?" even though no changes were made. Press "Discard Changes" button, filter re-appear
  8. Enter query in query bar; filters again disappear

Expected behavior: When a dashboard is re-loaded from the dashboard selection screen, it should open in it's saved state.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context: This error has been reproduced on two different 7.15.1 Kibana servers.

@seanbirdsell seanbirdsell added the bug Fixes for quality problems that affect the customer experience label May 18, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label May 18, 2022
@stratoula stratoula added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label May 23, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 23, 2022
@stratoula
Copy link
Contributor

The dashboard has a mechanism to remember the users' changes unless they discard them
image

If you discard them from the dashboard listing page (see my screenshot above) then you will have your dashboard as it was.
I don't think that this is a bug but I think the @elastic/kibana-presentation team can keep me honest here.

@seanbirdsell
Copy link
Author

Unfortunately, @stratoula , that message isn't showing up.

@stratoula
Copy link
Contributor

I see, maybe this is a 7.15 presentation behavior. We probably added this to a newer kibana version.

@ThomThomson ThomThomson added Feature:Dashboard Dashboard related features Feature:Filters loe:needs-research This issue requires some research before it can be worked on or estimated impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels May 24, 2022
@ThomThomson ThomThomson changed the title Filters disappears on change in page state [Dashboard] No way to reset to last saved Filters May 24, 2022
@ThomThomson
Copy link
Contributor

This message actually only shows up in the dashboard when the dashboard is in edit mode. This is a fairly impactful UX issue, and we're working on ways to allow the user to reset their filter state to the last saved mode.

The filtering behaviour between Dashboards, filters from the user's explorations, and Dashboard Controls is a very complicated web at the moment which we need to straighten out.

@stratoula, I'm glad you answered this question, as it's something we'll need to think through with the Unified Search X Controls project.

@seanbirdsell, I will leave this issue open because it's an important thing to track, but there are two ways to work around this issue.

  1. Discard changes
    a) Enter Edit mode on the dashboard
    b) hit Switch to View mode and discard changes

  2. Close and reopen the tab
    a) Copy the dashboard URL from the top bar of your browser
    b) Close the tab and open a new tab
    c) Paste the URL back in to return to the dashboard

Neither of these workarounds are very good from a UX standpoint, but hopefully this is good enough for the time being, until we can straighten out all of the subtleties surrounding filtering on a dashboard.

@seanbirdsell
Copy link
Author

Thanks. This is all great. Appreciate the work.

@ThomThomson ThomThomson added enhancement New value added to drive a business result loe:medium Medium Level of Effort and removed bug Fixes for quality problems that affect the customer experience loe:needs-research This issue requires some research before it can be worked on or estimated labels Oct 18, 2022
@ThomThomson
Copy link
Contributor

I've just re-estimated the LOE, with a new idea from an implementation standpoint. We could add a reset function to the dashboard API, which works the same way as edit -> discard changes. Then potentially add a reset button to the top nav in view mode. This would allow users to reset any changes that they have made in view mode to the filters, or the Controls.

@ThomThomson ThomThomson changed the title [Dashboard] No way to reset to last saved Filters [Dashboard] Add Reset Function to View Mode Oct 18, 2022
@ThomThomson ThomThomson added the Project:Dashboard Usability Related to the Dashboard Usability initiative label Nov 3, 2022
@Heenawter Heenawter self-assigned this Mar 30, 2023
Heenawter added a commit that referenced this issue Apr 21, 2023
Closes #132457

## Summary

This PR adds a reset button to the dashboard top navigation in both edit
and view mode - when clicked, if the dashboard has unsaved changes, it
will revert the dashboard to the last saved state:



https://user-images.githubusercontent.com/8698078/232918433-97bac4b0-7472-49e9-9eb3-2cb7c9e6edf6.mov

> **Note**
> The above video contains some old copy for the modals. Please refer to
"All copy changes" below to see the updated copy.

Note that, by adding more buttons to the top nav bar, we are increasing
the risk of someone hitting [this accessibility
issue](#154414) (where the
breadcrumbs get completely overlapped before the browser is small enough
for the navigation to collapse) - this will either be addressed on the
Shared UX side or will be addressed as part of our [nav bar
redesign](#154945) 👍


### All Copy Changes

- **Listing Page** 

  | Before | After |
  |--------|-------|
| ![Screenshot 2023-04-18 at 4 29 10
PM](https://user-images.githubusercontent.com/8698078/232919138-7be86e97-ebb4-48a9-b8b1-0b970131aa37.png)
|
![image](https://user-images.githubusercontent.com/8698078/232919166-b7bc7b55-5074-485d-ad0a-2fb695367538.png)
|
|
![image](https://user-images.githubusercontent.com/8698078/232920038-6c8c463e-0c7d-49e7-99c8-86b2ae611844.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412233-a785d99d-9d07-4ee5-a121-646bbd839f7c.png)
|

- **Dashboard - _Edit Mode_** 

  | Before | After |
  |--------|-------|
|
![image](https://user-images.githubusercontent.com/8698078/232920992-2d1b61f4-dff2-4bdd-854b-9cd6fcae07ce.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412732-254a9503-5526-44bc-a2e0-067f8800ad26.png)
|





- **Dashboard - _View Mode_** 

  | Before | After |
  |--------|-------|
| N/A since you couldn't discard changes from view mode previously |
![image](https://user-images.githubusercontent.com/8698078/233413029-9a6b4256-3002-48c5-8620-7596d8f08153.png)
|


###  Flaky Test Runner
- `test/functional/apps/dashboard/group1/dashboard_unsaved_state.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2144"><img
src="https://user-images.githubusercontent.com/8698078/232622312-8532bc7e-a699-45ee-862d-739d116c5dba.png"></a>
-
`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_interaction.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2143"><img
src="https://user-images.githubusercontent.com/8698078/232615061-f01439e8-3a69-4190-8b6f-1926e1fa776a.png"></a>


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
(Refer above)
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kpatticha pushed a commit to kpatticha/kibana that referenced this issue Apr 25, 2023
Closes elastic#132457

## Summary

This PR adds a reset button to the dashboard top navigation in both edit
and view mode - when clicked, if the dashboard has unsaved changes, it
will revert the dashboard to the last saved state:



https://user-images.githubusercontent.com/8698078/232918433-97bac4b0-7472-49e9-9eb3-2cb7c9e6edf6.mov

> **Note**
> The above video contains some old copy for the modals. Please refer to
"All copy changes" below to see the updated copy.

Note that, by adding more buttons to the top nav bar, we are increasing
the risk of someone hitting [this accessibility
issue](elastic#154414) (where the
breadcrumbs get completely overlapped before the browser is small enough
for the navigation to collapse) - this will either be addressed on the
Shared UX side or will be addressed as part of our [nav bar
redesign](elastic#154945) 👍


### All Copy Changes

- **Listing Page** 

  | Before | After |
  |--------|-------|
| ![Screenshot 2023-04-18 at 4 29 10
PM](https://user-images.githubusercontent.com/8698078/232919138-7be86e97-ebb4-48a9-b8b1-0b970131aa37.png)
|
![image](https://user-images.githubusercontent.com/8698078/232919166-b7bc7b55-5074-485d-ad0a-2fb695367538.png)
|
|
![image](https://user-images.githubusercontent.com/8698078/232920038-6c8c463e-0c7d-49e7-99c8-86b2ae611844.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412233-a785d99d-9d07-4ee5-a121-646bbd839f7c.png)
|

- **Dashboard - _Edit Mode_** 

  | Before | After |
  |--------|-------|
|
![image](https://user-images.githubusercontent.com/8698078/232920992-2d1b61f4-dff2-4bdd-854b-9cd6fcae07ce.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412732-254a9503-5526-44bc-a2e0-067f8800ad26.png)
|





- **Dashboard - _View Mode_** 

  | Before | After |
  |--------|-------|
| N/A since you couldn't discard changes from view mode previously |
![image](https://user-images.githubusercontent.com/8698078/233413029-9a6b4256-3002-48c5-8620-7596d8f08153.png)
|


###  Flaky Test Runner
- `test/functional/apps/dashboard/group1/dashboard_unsaved_state.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2144"><img
src="https://user-images.githubusercontent.com/8698078/232622312-8532bc7e-a699-45ee-862d-739d116c5dba.png"></a>
-
`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_interaction.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2143"><img
src="https://user-images.githubusercontent.com/8698078/232615061-f01439e8-3a69-4190-8b6f-1926e1fa776a.png"></a>


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
(Refer above)
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Dashboard Dashboard related features Feature:Filters impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Dashboard Usability Related to the Dashboard Usability initiative Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants