Skip to content

[8.x] [Security Solution] Use static declaration for navigation hierarchy (#215969)#217248

Merged
tsullivan merged 4 commits intoelastic:8.xfrom
tsullivan:backport/8.x/pr-215969
Apr 8, 2025
Merged

[8.x] [Security Solution] Use static declaration for navigation hierarchy (#215969)#217248
tsullivan merged 4 commits intoelastic:8.xfrom
tsullivan:backport/8.x/pr-215969

Conversation

@tsullivan
Copy link
Member

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…lastic#215969)

## Summary

Part of Epic: elastic/kibana-team#1439
Addresses elastic#212903, but does not
remove the landing page access. The landing page access will be removed
in elastic#210893

**Changes**
1. Converts the declaration of the Security Solution side navigation for
serverless and stateful projects into a static declaration, rather than
algorithmically parsing registered links to dynamically build the
declaration.
2. Updates the contents of the "Assets" panel to prepare for removal of
that landing page.
3. Eliminates the top-level nesting of the nav items, which removes the
extra space between the project title and the first nav items. See
elastic@45454bd

**Known issue**: Clicking the "Browse integrations" button does not
close the secondary nav panel. Doing that will be a relatively simple
chore, but will require some changes in the SharedUX chrome-navigation
package, as well as the `LinkButton` component in the Security Solution
navigation-links package.

### Screenshots
Serverless

![static-nav-declaration-security-serverless-3iorteikghiskhgkseh](https://github.com/user-attachments/assets/47bcbea9-7e3c-481e-b1b8-4b13bb5d63b1)

Stateful/ECH

![static-nav-declaration-security-stateful-3iorteikghiskhgkseh](https://github.com/user-attachments/assets/3d3c8a0e-95d1-4da7-a657-c824577b6ec1)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ef907a3)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution_serverless/public/navigation/ai_soc/ai_soc_navigation.ts
#	x-pack/solutions/security/plugins/security_solution_serverless/public/navigation/side_navigation.ts
#	x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts
#	x-pack/test/security_solution_cypress/cypress/screens/serverless_security_header.ts
@tsullivan tsullivan requested a review from kibanamachine as a code owner April 4, 2025 18:36
@tsullivan tsullivan added the backport This PR is a backport of another PR label Apr 4, 2025
@tsullivan tsullivan enabled auto-merge (squash) April 4, 2025 18:36
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7143 7138 -5
securitySolutionEss 117 119 +2
securitySolutionServerless 149 152 +3
total -0

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
securitySolution 123 122 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.1MB 9.1MB -10.9KB
securitySolutionEss 46.4KB 45.4KB -1.1KB
total -11.9KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
securitySolution 33 32 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 86.2KB 86.1KB -57.0B
securitySolutionEss 15.3KB 34.2KB +18.9KB
securitySolutionServerless 31.9KB 46.0KB +14.1KB
total +33.0KB
Unknown metric groups

API count

id before after diff
securitySolution 191 190 -1

async chunk count

id before after diff
securitySolution 122 120 -2

History

@tsullivan tsullivan merged commit a331e45 into elastic:8.x Apr 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants