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 First] Lens Originating App Breadcrumb #75470

Merged

Conversation

ThomThomson
Copy link
Contributor

Summary

This PR uses the app title fetch method from #75457 to create a clickable breadcrumb in lens that will return the user to the originating app. This will work for every container!

Canvas

Breadcrumb From Canvas

Dashboard

Dashboard

How to test this:

The new breadcrumb should show up any time you have created or edited a lens visualization from a container.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@ThomThomson ThomThomson added release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Lens v7.10.0 labels Aug 19, 2020
@ThomThomson ThomThomson marked this pull request as ready for review August 19, 2020 19:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@ThomThomson ThomThomson requested a review from a team August 19, 2020 19:58
@ThomThomson ThomThomson requested review from a team as code owners August 19, 2020 19:58
@ThomThomson ThomThomson marked this pull request as draft August 19, 2020 20:03
@ThomThomson ThomThomson marked this pull request as ready for review August 20, 2020 20:25
@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
lens 25.4KB +228.0B 25.2KB

History

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

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested and works as expected, LGTM. That's a nice feature, thanks for adding it. I wonder whether we can even replace the Visualize breadcrumb with the current app instead of prepending.

Leaving that up to you though, I'm fine with both ways.

core.application.navigateToApp(originatingApp);
},
text: getAppNameFromId(originatingApp),
} as EuiBreadcrumb,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This type cast doesn't seem necessary:

            {
              onClick: () => {
                core.application.navigateToApp(originatingApp);
              },
              text: getAppNameFromId(originatingApp),
            }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix this in the lens by value PR

@ThomThomson
Copy link
Contributor Author

ThomThomson commented Aug 21, 2020

That's a really good point, Joe. It could reinforce the 'dashboard first' project by not even providing a link to Visualize.

I am considering changing it to:

Dashboard / Visualize / {savedObjectTItle} in by reference mode and
Dashboard / Edit Visualization in by value mode. 'Visualize By Value' would not be a link.

in the Lens by Value PR

@ThomThomson ThomThomson merged commit 6b3ce3f into elastic:master Aug 21, 2020
ThomThomson added a commit to ThomThomson/kibana that referenced this pull request Aug 21, 2020
Changed lens breadcrumbs to reflect the Originating App
ThomThomson added a commit that referenced this pull request Aug 21, 2020
Changed lens breadcrumbs to reflect the Originating App
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 21, 2020
* master: (71 commits)
  [Lens] Show 'No data for this field' for empty field in accordion (elastic#73772)
  Skip failing lens test
  Configure ScopedHistory consistenty regardless of URL used to mount app (elastic#75074)
  Fix returned payload by "search" usage collector (elastic#75340)
  [Security Solution] Fix missing key error (elastic#75576)
  Upgrade EUI to v27.4.1 (elastic#75240)
  Update datasets UI copy to data streams (elastic#75618)
  [Lens] Register saved object references (elastic#74523)
  [DOCS] Update links to Beats documentation (elastic#70380)
  [Enterprise Search] Convert our `public_url` route to `config_data` and collect initialAppData (elastic#75616)
  [Usage Collection Schemas] Remove Legacy entries (elastic#75652)
  [Dashboard First] Lens Originating App Breadcrumb (elastic#75470)
  Improve login UI error message. (elastic#75642)
  [Security Solution] modify circular deps checker to output images of circular deps graphs (elastic#75579)
  [Data Telemetry] Add index pattern to identify "meow" attacks (elastic#75163)
  Migrate CSP usage collector to `kibana_usage_collection` plugin (elastic#75536)
  [Console] Get ES Config from core (elastic#75406)
  [Uptime] Add delay in telemetry test (elastic#75162)
  [Lens] Use index pattern service instead saved object client (elastic#74654)
  Embeddable input (elastic#73033)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants