Skip to content

Improve cross-app linking in Platform #58751

@joshdover

Description

@joshdover

Follow up issue from discussion in #58217

Currently, the Platform only supports SPA navigation between applications via the navigateToApp API. One problem with this API is that in order for applications to support both regular clicks and "open in new tab" (either via ctrl-click or right click -> open in new tab), each app has to implement a component similar to react-router-dom's <Link /> component.

We could improve this quite a bit, and we have at least two options:

  • Provide a <CrossAppLink /> component in kibana_react that can call the navigateToApp and getUrlForApp APIs to create a valid href that handles both in-app navigations and open in new tab navigations.
  • Provide a global DOM event listener that detects clicks on anchor tags to hrefs that reference cross-app links and overrides their behavior to automatically do SPA navigation.
    • There may be some issues with detecting intra-Kibana links vs. links to external services. Some tracking pixels installed by 3rd party plugins may be affected as well. @lizozom could you provide more details or an example of this?

Metadata

Metadata

Assignees

Labels

Feature:New PlatformTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//discuss

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions