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] Remember tab choice between Logs Explorer and Discover #193321

Open
Kerry350 opened this issue Sep 18, 2024 · 1 comment
Open

[Logs] Remember tab choice between Logs Explorer and Discover #193321

Kerry350 opened this issue Sep 18, 2024 · 1 comment
Labels
Team:obs-ux-logs Observability Logs User Experience Team

Comments

@Kerry350
Copy link
Contributor

Kerry350 commented Sep 18, 2024

Summary

For tabbed Logs Explorer / Discover (in serverless), the choice of the tab should be remembered per user and made automatically the next time the user clicks the “Discover” nav item. Initially, the Logs Explorer tab will be rendered.

Acceptance Criteria

  • The user's last clicked tab should be stored in local storage.
  • When navigating using the navigation item the value should be read from local storage, and the correct tab used.
  • The Logs Explorer tab should be used as the default.

Technical concerns and approach

There is no direct platform functionality to assist here.

The navigationTree that renders the navigation items only accepts a string (technically an app id or deep link id) for link, therefore we cannot perform any logic (reading local storage etc) for the navigation tree itself, href can also only be a string. There is an onClick prop which takes precedence, but we wouldn't have access here to the resources we need (locators, local storage utils etc).

Therefore I would propose that we add a new route (either under Discover or Logs Explorer) which acts purely as a redirection route. It would perform the logic we need, and then navigate to the correct tab. This then gives us a link that we can actually provide to the navigation tree. We should just be careful of redundant history entries.

@Kerry350 Kerry350 added the Team:obs-ux-logs Observability Logs User Experience Team label Sep 18, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

No branches or pull requests

2 participants