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

Kibana displays save and return to dashboard listing page when users click on discover->visualize->lens->save and return #141858

Closed
bhavyarm opened this issue Sep 26, 2022 · 4 comments · Fixed by #141969
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

Kibana version: 8.5.0 BC1

Elasticsearch version: 8.5.0 BC1

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

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

Describe the bug: When users navigate to visualize in lens from discover - Kibana displays an active save and return button.
When user clicks on it - kibana takes him to dashboard listing page which is very confusing.

Steps to reproduce:

  1. Click on visualize on a field which can be visualized in discover side bar
  2. Kibana takes you to lens
  3. Click on save and return
  4. Kibana drops you to dashboard landing page
save_return.mp4
@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Sep 26, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@stratoula
Copy link
Contributor

@bhavyarm I can't replicate it 🤔 Can you give us more details in order to be able to reproduce it? Thanx!

@flash1293
Copy link
Contributor

flash1293 commented Sep 27, 2022

I can reproduce the issue when doing this:

  • Go to dashboard
  • Start editing
  • Add Lens vis to dashboard
  • Leave dashboard
  • Go to discover
  • Do what the recording in the description shows

The problem is that the EmbeddableStateTransfer is not removed and picked up on the next load of Lens:

const embeddableEditorIncomingState = stateTransfer?.getIncomingEditorState(APP_ID);

@ThomThomson I'm not 100% sure how it's supposed to work - should we clear the embeddable state transfer for Lens when the user is navigating away?

@flash1293 flash1293 added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed feedback_needed labels Sep 27, 2022
@ThomThomson
Copy link
Contributor

@flash1293, yes most apps clear the embeddable state transfer on navigating away, or navigating to their listing pages. This state can be cleared with stateTransfer.clearEditorState?.(APP_ID);

you can see an example x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx line 320

EmbeddableStateTransfer is actually currently using session storage, which is why it needs to be explicitly cleared. The reason we did it that way was due to conflicts that caused the router state to be cleared intermittently.

I think those problems with router state have been fixed now. I wonder if it's time to move the state transfer service back to router state? @elastic/kibana-app-services

That said, looking at some of the problems that moving it to session storage solved I'm not so sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants