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

[APM] Refactor link helpers #83196

Closed
smith opened this issue Nov 11, 2020 · 2 comments
Closed

[APM] Refactor link helpers #83196

smith opened this issue Nov 11, 2020 · 2 comments
Labels
Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture

Comments

@smith
Copy link
Contributor

smith commented Nov 11, 2020

As mentioned in the discussion on #82870, some of the link components in shared/Links/apm/ are no longer being used, but hooks that call useAPMHref now being used and are contained in those files in order to keep logic for constructing links located together.

In general, having components that render wrapped EuiLink components can be less useful, as demonstrated by the PR mentioned above: Using an EuiLink inside of an EuiTab causes problems with keyboard focus. EuiTab takes an href prop, which is the only thing we need.

The links and hooks are differentiated by which filters need to be persisted between navigation, so it still makes sense to have different hooks for different locations.

We could possibly make one hooks file that exports multiple hooks and replace the use of the link components.

@smith smith added Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture labels Nov 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv
Copy link
Member

I agree we should clean this up. I believe this is mostly covered in #105914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

4 participants