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 tour to Dashboard #131960

Closed
wants to merge 20 commits into from

Conversation

Heenawter
Copy link
Contributor

@Heenawter Heenawter commented May 10, 2022

Closes #131961
Waiting on #133275

Summary

This PR as a finalization + formalization of the dashboard tour that was added as part of this Spacetime project.

View mode tour

In user testing, it was found that users often didn't know that they had to hit the Edit button in order to start making changes. This is what we consider to be our single-step view mode tour, and it will be started automatically when the user first opens any dashboard in View mode:

2022-05-16_ViewModeTour.mp4

Note that there are two ways that this tour can be dismissed:

  1. The user hits the "Close tour" button at the bottom of the callout or
  2. The user enters Edit mode from View mode - this is the scenario that is shown in the video above. Note that, if the user's first time opening a dashboard is in Edit mode, then they switch to View mode for the first time, they should still see the view mode tour.

Edit mode tour

The second thing we wanted to do was highlight some of the most useful features in Edit mode - this is a multi-step tour that will start automatically when the user first opens any dashboard in Edit mode:

2022-04-29_DashboardEditTour.mp4

Flaky Test Runner

image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@Heenawter Heenawter added release_note:enhancement Team:Docs Feature:Dashboard Dashboard related features loe:large Large Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. ui-copy Review of UI copy with docs team is recommended v8.3.0 labels May 10, 2022
@Heenawter Heenawter self-assigned this May 10, 2022
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from 7662c68 to 0266868 Compare May 10, 2022 22:01
@@ -589,6 +603,7 @@ export function DashboardTopNav({

return (
<>
{dashboardState.viewMode === ViewMode.VIEW && <DashboardViewTour />}
Copy link
Contributor Author

@Heenawter Heenawter May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to put the view mode tour in dashboard_top_nav.tsx so that I could have direct access to the onClick action of switching to edit mode - that way, either by directly dismissing it or by switching from view mode to edit mode, the view mode tour will be dismissed permanently.

Since it would have made the code much cleaner, I originally tried to do this by injecting the view mode tour alongside the edit mode tour in the Dashboard viewport and listening for changes to the view mode to trigger the ending of the view mode tour - unfortunately this happened too late and I would get the following error:

image

which was caused by the EuiTourStep being anchored to the edit button, which is dynamically hidden and replaced with the View mode button when switching from view mode to edit mode.

Very much interested in seeing if there is a better way of handling this, since I'm not a huge fan of the view mode tour code being in dashboard_top_nav.tsx while the edit mode tour is in dashboard_viewport.tsx (a much more reasonable place) 👍

@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from 0266868 to d91f060 Compare May 11, 2022 23:42
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch 2 times, most recently from 7a28794 to b515e41 Compare May 16, 2022 22:03
@Heenawter Heenawter added the backport:skip This commit does not require backporting label May 16, 2022
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch 9 times, most recently from 633a74f to 25094ba Compare May 19, 2022 14:50
Comment on lines +284 to +290
if (appName === 'dashboard') {
const disableTour = JSON.stringify({
isTourActive: false,
});
await this.browser.setLocalStorageItem('dashboard.edit.tourState', disableTour);
await this.browser.setLocalStorageItem('dashboard.view.tourState', disableTour);
}
Copy link
Contributor Author

@Heenawter Heenawter May 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't have access to the dashboard_page from inside common_page, so I had to duplicate the forceSkipTour code here... Not sure if there is a better way to do this? Because I don't feel like moving the forceSkipTour code to common_page is the right move either... 🤷

@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch 4 times, most recently from dd8202d to e2c14eb Compare May 20, 2022 16:41
@elasticmachine
Copy link
Contributor

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

@@ -370,6 +383,7 @@ export class DashboardPageObject extends FtrService {
}

public async clickCreateDashboardPrompt() {
await this.forceSkipTour();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually, we should probably go through and clean up all the different ways the other test suites are accessing dashboard... This would really help to clean up all the places where I had to put forceSkipTour() to get CI to pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There has been some discussion (@timductive @kertal) around adding a uiSetting flag that would way clean up all of these tests - basically, there would be a flag that would disable all tours/notifications/callouts from appearing for users who are already comfortable with Kibana, and we could use this in our testing by defaulting it to off for all functional tests unless that specific feature is required.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an issue #133275

Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Heenawter, @KOTungseth and I reviewed the text this morning. Here are our comments.

The Discover tour ( PR 131125) does not use the title "Discover tour". To be consistent, we should remove "Dashboard tour".

Step 1

Ready to create beautiful visualizations?
Open your dashboard in Edit mode here.

Step 2

Get creative
Create charts, maps, and other visualizations that best display your data.

Step 3

Add your style
Customize your visualization to add a personal touch.

Side note: The menu that opens from the panel menu has this item: Edit lens. It should be Edit Lens.

Step 4

Adjust the time range
View data for a particular day, the last year, or whatever time range you want.

Step 5

Refine your data
Filter for only the data you want to explore.

Step 6

Make it interactive
Add Controls, or custom filters, for a more engaging experience.

@ryankeairns ryankeairns requested a review from andreadelrio May 23, 2022 19:57
Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good I just want to go over a few scenarios and see how we can handle them better.

Scenario 1: The tour takes the user to a different screen in Kibana
This happens in Step 1 where the user is taken to Lens. If the user does go to Lens upon returning to Dashboard we should automatically show them the next step.

Scenario 2: We show them a popover inside Dashboard
This can be found, for example, in Step 3 (global time filter). Showing the content of the popover above the content of the tour doesn't look super clean. In this case, we should hide the tour step while the user interacts with the global time filter. As soon as the user is done interacting with the target UI element (global time filter) we can show them the next tour step.

image

Currently the tour step overlaps the Create control flyout.
image

Also, nit visual design feedback. In view mode, we're showing one step which to me looks a bit too wide and with too much white space. I think we could give it a width similar to the tour step for the new data view menu (which is around 300px wide).
Letter - 1

@Heenawter Heenawter requested a review from a team as a code owner May 25, 2022 22:30
@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label May 25, 2022
@Heenawter Heenawter requested a review from a team as a code owner June 2, 2022 17:15
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from 280d5c2 to 67f23dd Compare June 2, 2022 17:29
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from 67f23dd to 7e4d19b Compare June 2, 2022 17:32
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from 8f346b8 to 434231c Compare June 2, 2022 19:18
@Heenawter
Copy link
Contributor Author

Heenawter commented Jun 2, 2022

In order to reliably get CI to pass, this PR is dependent on #133275 being added.

Basically, because these tours are automatically triggered the first time a user opens a dashboard in view/edit mode, all functional tests that rely on Dashboard are failing. While I initially went through and force disabled the tour in various locations to get CI to pass, this is a not great solution because of all the ways different functional tests access the Dashboard app - this solution has also been the source of a lot of flakiness.

A much better solution, once the above issue is closed, would be to simply disable this flag for all tests by default, and only turn it on for the dashboard tour-specific tests. In the mean time, CI will simply fail unless we decide to trigger the start of the tour via a button or some other action from the user (such as how the Discover tour is triggered).

I will continue improving the behaviour of the tour based on @andreadelrio's feedback as well as my own testing - however, this cannot be merged until the above is addressed 👍

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice intro for new users! 👍

Noticed one issue: although I finished the tour it keeps appearing again next time I open Edit page
Jun-03-2022 12-02-33

@Heenawter
Copy link
Contributor Author

Heenawter commented Jun 3, 2022

@jughosta Thanks for pointing that out! Switched over to using React context based on how you did the Discover tour so I could achieve some of what @andreadelrio was asking for, and broke some things as a consequence - still working on fixing everything, haha :)

Edit: Should be fixed in c969976

@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from f8ae394 to cebb207 Compare June 3, 2022 15:30
@Heenawter Heenawter force-pushed the add-dashboard-tour_2022-05-10 branch from cebb207 to c969976 Compare June 3, 2022 15:34
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jun 6, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #7 / a11y tests using flights sample data Dashboard Open add panel
  • [job] [logs] FTR Configs #7 / a11y tests using flights sample data Dashboard Open add panel
  • [job] [logs] FTR Configs #38 / context app context link in discover navigates to doc view from embeddable
  • [job] [logs] FTR Configs #38 / context app context link in discover navigates to doc view from embeddable
  • [job] [logs] FTR Configs #32 / dashboard app - group 1 empty dashboard should open add panel when add button is clicked
  • [job] [logs] FTR Configs #37 / dashboard app - group 1 empty dashboard should open add panel when add button is clicked
  • [job] [logs] FTR Configs #32 / dashboard app - group 1 empty dashboard should open add panel when add button is clicked
  • [job] [logs] FTR Configs #37 / dashboard app - group 1 empty dashboard should open add panel when add button is clicked
  • [job] [logs] FTR Configs #9 / dashboard app - group 2 dashboard filter bar Add a filter bar should continue to show for visualizations with no search source
  • [job] [logs] FTR Configs #9 / dashboard app - group 2 dashboard filter bar Add a filter bar should continue to show for visualizations with no search source
  • [job] [logs] FTR Configs #8 / dashboard app - group 3 dashboard time picker Visualization updated when time picker changes
  • [job] [logs] FTR Configs #35 / dashboard app - group 3 dashboard time picker Visualization updated when time picker changes
  • [job] [logs] FTR Configs #8 / dashboard app - group 3 dashboard time picker Visualization updated when time picker changes
  • [job] [logs] FTR Configs #35 / dashboard app - group 3 dashboard time picker Visualization updated when time picker changes
  • [job] [logs] FTR Configs #42 / dashboard app - group 4 dashboard save Does not show dashboard save modal when on quick save
  • [job] [logs] FTR Configs #42 / dashboard app - group 4 dashboard save Does not show dashboard save modal when on quick save
  • [job] [logs] FTR Configs #3 / dashboard app - group 5 old charts library dashboard state Overriding colors on an area chart is preserved
  • [job] [logs] FTR Configs #3 / dashboard app - group 5 old charts library dashboard state Overriding colors on an area chart is preserved
  • [job] [logs] FTR Configs #38 / Dashboard dashboard with async search multiple searches are grouped and only single error popup is shown
  • [job] [logs] FTR Configs #38 / Dashboard dashboard with async search multiple searches are grouped and only single error popup is shown
  • [job] [logs] FTR Configs #30 / dashboard elements dashboard elements Controls Controls callout callout visibility "after all" hook for "adding control hides the empty control callout"
  • [job] [logs] FTR Configs #30 / dashboard elements dashboard elements Controls Controls callout callout visibility "after all" hook for "adding control hides the empty control callout"
  • [job] [logs] FTR Configs #30 / dashboard elements dashboard elements Controls Controls callout callout visibility "before all" hook for "show the empty control callout on a dashboard with panels"
  • [job] [logs] FTR Configs #30 / dashboard elements dashboard elements Controls Controls callout callout visibility "before all" hook for "show the empty control callout on a dashboard with panels"
  • [job] [logs] FTR Configs #20 / dashboard feature controls dashboard time to visualize security visualize by value works without library save permissions can add a markdown panel by value
  • [job] [logs] FTR Configs #20 / dashboard feature controls dashboard time to visualize security visualize by value works without library save permissions can add a markdown panel by value
  • [job] [logs] FTR Configs #18 / dashboard sample data dashboard should launch sample flights data set dashboard
  • [job] [logs] FTR Configs #18 / dashboard sample data dashboard should launch sample flights data set dashboard
  • [job] [logs] FTR Configs #12 / dashboard save Does not show dashboard save modal when on quick save
  • [job] [logs] FTR Configs #12 / dashboard save Does not show dashboard save modal when on quick save
  • [job] [logs] FTR Configs #29 / discover app discover data grid context tests navigates to context view from embeddable
  • [job] [logs] FTR Configs #29 / discover app discover data grid context tests navigates to context view from embeddable
  • [job] [logs] FTR Configs #41 / discover Discover Saved Searches Customize time range should be possible to customize time range for saved searches on dashboards
  • [job] [logs] FTR Configs #41 / discover Discover Saved Searches Customize time range should be possible to customize time range for saved searches on dashboards
  • [job] [logs] FTR Configs #39 / embedded Lens examples show and save should save to dashboard
  • [job] [logs] FTR Configs #39 / embedded Lens examples show and save should save to dashboard
  • [job] [logs] FTR Configs #7 / lens app - group 2 lens add-to-dashboards tests should allow new lens be added by value to an existing dashboard
  • [job] [logs] FTR Configs #7 / lens app - group 2 lens add-to-dashboards tests should allow new lens be added by value to an existing dashboard
  • [job] [logs] FTR Configs #5 / lens app - group 3 TSVB to Lens Dashboard to TSVB to Lens should convert a by reference TSVB viz to a Lens viz
  • [job] [logs] FTR Configs #5 / lens app - group 3 TSVB to Lens Dashboard to TSVB to Lens should convert a by reference TSVB viz to a Lens viz
  • [job] [logs] FTR Configs #28 / machine learning - data visualizer field statistics in Dashboard with lucene saved search and filter displays Field statistics table in Dashboard when enabled
  • [job] [logs] FTR Configs #28 / machine learning - data visualizer field statistics in Dashboard with lucene saved search and filter displays Field statistics table in Dashboard when enabled
  • [job] [logs] FTR Configs #30 / machine learning - short tests embeddables anomaly charts in dashboard with multi metric job can open job selection flyout
  • [job] [logs] FTR Configs #30 / machine learning - short tests embeddables anomaly charts in dashboard with multi metric job can open job selection flyout
  • [job] [logs] FTR Configs #26 / machine learning embeddables anomaly charts Accessibility with multi metric job can open job selection flyout
  • [job] [logs] FTR Configs #26 / machine learning embeddables anomaly charts Accessibility with multi metric job can open job selection flyout
  • [job] [logs] FTR Configs #43 / management kibana settings state:storeInSessionStorage when false, dashboard state is unhashed
  • [job] [logs] FTR Configs #43 / management kibana settings state:storeInSessionStorage when false, dashboard state is unhashed
  • [job] [logs] FTR Configs #40 / maps app embeddable save and return work flow new map "before each" hook for "should return to dashboard and add new panel"
  • [job] [logs] FTR Configs #40 / maps app embeddable save and return work flow new map "before each" hook for "should return to dashboard and add new panel"
  • [job] [logs] FTR Configs #2 / New Visualize Flow Dashboard Embedding adding a metric visualization
  • [job] [logs] FTR Configs #2 / New Visualize Flow Dashboard Embedding adding a metric visualization
  • [job] [logs] FTR Configs #23 / Saved objects management Export import saved objects between versions should be able to import 7.13 saved objects into 8.0.0 and verfiy the rendering of two dashboards
  • [job] [logs] FTR Configs #23 / Saved objects management Export import saved objects between versions should be able to import 7.13 saved objects into 8.0.0 and verfiy the rendering of two dashboards
  • [job] [logs] FTR Configs #33 / visualize app - group1 data table with index without time filter filters should add to dashboard and allow filtering
  • [job] [logs] FTR Configs #33 / visualize app - group1 data table with index without time filter filters should add to dashboard and allow filtering
  • [job] [logs] FTR Configs #13 / visualize app Add to Dashboard adding a new metric to an existing dashboard by value
  • [job] [logs] FTR Configs #13 / visualize app Add to Dashboard adding a new metric to an existing dashboard by value

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 375 381 +6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
controls 199 203 +4
embeddable 396 397 +1
total +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 426.4KB 426.7KB +249.0B
dashboard 425.4KB 431.4KB +6.0KB
total +6.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
embeddable 66.2KB 66.3KB +51.0B
Unknown metric groups

API count

id before after diff
controls 205 209 +4
embeddable 486 487 +1
total +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Heenawter

@Heenawter Heenawter marked this pull request as draft June 7, 2022 16:44
@Heenawter
Copy link
Contributor Author

The PR that allows the tour to be hidden through an advanced setting has officially been merged in, which means I should now be able to get CI to pass reliably - the presentation team doesn't have the resources to prioritize the tour at this point, but hopefully I'll be able to get back to this soon 👍

@Heenawter Heenawter closed this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort release_note:enhancement Team:Docs Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas ui-copy Review of UI copy with docs team is recommended v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Finalize dashboard tour
8 participants