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

[PoC][Security Solution] Serverless navigation #30

Conversation

semd
Copy link

@semd semd commented Mar 2, 2023

Summary

This POC is an implementation on top of the @clintandrewhall PoC, that integrates the current Security "grouped" navigation in the global chrome navigation for serverless.

  • Security's SolutionGroupedNavigation migrated to shared-ux package component as SideNavigation.
  • New SideNavigation package navigation is shared between serverless_security and security_solution plugins (serverless & non-serverless)
  • Collapsibility implemented on the security side, using local storage.
  • The links information is retrieved from security_solution plugin navItems$ on-start observable exposed.
  • Discover link hardcoded for demo purposes
  • Router added on the chrome header to enable location updates in the navigation component

Limitations

  • Security links do not carry urlState: Navigation links have no query params. This information is stored in the security_solution plugin redux store. Which is created on security_solution plugin mount, we can expose the store to be consumed from the serverless_security plugin, even if it may not exist when we are on a non-security page. However, this is non-critical since all pages add their specific urlState to the URL (using replace) when they load, so links can still be shared after navigation. We only lose urlState information when right-clicking and using "copy link address" in the navigation links directly.

Testing

Run yarn serverless-security locally.

Screenshots

side_nav_1

side_nav_2

side_nav_3

@clintandrewhall
Copy link
Owner

This is awesome. @tsullivan, @sixstringcode, we should look at what was done here for elastic#152510.

@semd I'm not sure if we'll merge this directly to the PoC, or if we'll include it as part of the navigation component package that @tsullivan is working on. Let's discuss on Monday. At the very least, we can use the package as a security-specific package for the securitySolution nav bar.

Thank you for this, it's incredibly important context for how we'll unify nav in projects.

@semd semd changed the title [Security Solution][PoC] Serverless navigation [PoC][Security Solution] Serverless navigation Mar 6, 2023
@sixstringcode
Copy link

This looks so polished, thanks for jumping on this so quick @semd

@clintandrewhall clintandrewhall merged commit 382607f into clintandrewhall:serverless/poc/navigation Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants