-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Side navigation package #152924
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
I can review in depth, but outright I would recommend scoping this side nav component to security, for now: You can also place it in a scoped directory: The biggest reason is it is fairly specific to security, at least at the moment. It will prevent confusion with components like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/dev/storybook/aliases.ts LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving this to a package 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments on general structure... I can demonstrate with this with a pull, if you like.
I would just be sure to replace solutionSideNav
with securitySolutionSideNav
wherever necessary.
@@ -0,0 +1,50 @@ | |||
## Security Solution Side Nav |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would consider packages/security_solution/side_nav
to make it easier to find/organize.
@@ -0,0 +1,9 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would consider creating a package for security storybooks - packages/security_solution/storybook
, @kbn/security-solution-storybook
.
It also makes it easier to group all of your storybook stories into a single storybook.
see: https://github.com/elastic/kibana/tree/main/packages/shared-ux/storybook/config
import { css } from '@emotion/react'; | ||
import { EuiBetaBadge, useEuiTheme } from '@elastic/eui'; | ||
|
||
export const BETA_LABEL = i18n.translate('solutionSideNav.betaBadge.label', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
export const BETA_LABEL = i18n.translate('solutionSideNav.betaBadge.label', { | |
export const BETA_LABEL = i18n.translate('securitySolutionSideNav.betaBadge.label', { |
Co-authored-by: Clint Andrew Hall <[email protected]>
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
async chunk count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @semd |
## Summary Security navigation moved to its own package. This migration is needed in order to reuse the same component for the navigation in the Serverless Security plugin [PoC](elastic#152172) previous location: `x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav` new location: `packages/kbn-security-solution-side-nav` Implementation changes: - Custom icons removed in favor of new EUI `iconType`. - Custom `SideNavItem` (for "Get Started" item) removed in favor of more configuration properties. - Generic nomenclature. - Header banner offset special case logic extracted from the navigation component, new `panelTopOffset` prop added to customize the top position of the floating panel. ### Screenshot ![Solution_side_nav](https://user-images.githubusercontent.com/17747913/224022078-2c6b6d20-8f9d-4917-bd6e-800a596ed718.png) ## Test `yarn storybook security_solution_side_nav` ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Clint Andrew Hall <[email protected]>
Summary
Security navigation moved to its own package.
This migration is needed in order to reuse the same component for the navigation in the Serverless Security plugin PoC
previous location:
x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav
new location:
packages/kbn-security-solution-side-nav
Implementation changes:
iconType
.SideNavItem
(for "Get Started" item) removed in favor of more configuration properties.panelTopOffset
prop added to customize the top position of the floating panel.Screenshot
Test
yarn storybook security_solution_side_nav
Checklist
Delete any items that are not applicable to this PR.