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

[Logs / Metrics UI] [NP followup] Make sure application links don't cause a page reload #58007

Closed
Kerry350 opened this issue Feb 19, 2020 · 2 comments · Fixed by #58478
Closed
Assignees
Labels
Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@Kerry350
Copy link
Contributor

Kerry350 commented Feb 19, 2020

As part of #54583 we migrated to browser based history, rather than hash based history. This produces a different behaviour now whereby standard links with a href attribute will cause a full page reload (as there's no connection to our history instance).

The solution here is to make sure that where we render links (to our own apps) we supply both an onClick and a href, the onClick handler should prevent the default behaviour, and instead push onto our history instance.

We are already doing this for the <RoutedTabs /> component. This is the behaviour we desire.

An example of where this is broken is the Node context menu, here react-router navigation hasn't been accounted for.

The desired outcome of this ticket would be to have something reusable we can just drop in wherever we want a link, that will provide a correct href attribute and correct react-router handling.

EUI provide some official guidance here.

@Kerry350 Kerry350 added Feature:Metrics UI Metrics UI feature Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Feb 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@simianhacker
Copy link
Member

Closes #58624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants