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

[Search] Introduce search navigation plugin #200314

Merged

Conversation

TattdCodeMonkey
Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey commented Nov 15, 2024

Summary

This PR introduces the search_navigation plugin which will be used as a dependency for other search plugins to render the 'classic' page side nav when their UIs are used in Stack. This work is a pre-requisite for the Search team to refactor pages out of the enterprise_search plugin and instead use the search_____ plugins to render pages and routes for both Serverless and Stack.

Additionally this new plugin is nested in the x-pack/search_solution/ folder which is where we will want to start migrating search specific plugins to for better organization and separation.

@TattdCodeMonkey TattdCodeMonkey added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Search backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.18.0 labels Nov 15, 2024
@TattdCodeMonkey TattdCodeMonkey requested review from a team as code owners November 15, 2024 21:52
Copy link
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@TattdCodeMonkey TattdCodeMonkey requested a review from a team as a code owner November 16, 2024 04:24
@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

@@ -1552,6 +1552,8 @@
"@kbn/search-indices/*": ["x-pack/plugins/search_indices/*"],
"@kbn/search-inference-endpoints": ["x-pack/plugins/search_inference_endpoints"],
"@kbn/search-inference-endpoints/*": ["x-pack/plugins/search_inference_endpoints/*"],
"@kbn/search-navigation": ["x-pack/plugins/search_solution/search_navigation"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we name this search instead of search_solution and keep name consistency with the one for packages? x-pack/packages/search

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I was using observability_solution & observability_solution as the examples for this and search seemed too generic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats fair. security is the other one. I dont mind either but would be good we keep consistency and rename the other folder in packages (whilst theres only one package)

x-pack/.i18nrc.json Outdated Show resolved Hide resolved
@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

{
"type": "plugin",
"id": "@kbn/search-navigation",
"owner": "@elastic/search-kibana",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to define a group and visibility for the new plugin.
If it's only used from Search solution I suggest

  "group": "search",
  "visibility": "private",

Is this a follow-up of this discussion?

Copy link
Contributor Author

@TattdCodeMonkey TattdCodeMonkey Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a follow-up of this discussion?

Not exactly, this is more architectural work to make it easier for Search team to develop plugins with UIs that are shared between stack and Serverless Elasticsearch.

But this PR does enable us to remove search playground from enterprise_search plugin. Once this merges I will have that PR up which will also introduce a KibanaFeature for searchPlayground that allows it to be disabled independently of the enterprise_search plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsoldevila I added the group & visibility keys.

@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
searchNavigation - 6 +6

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
searchNavigation - 21 +21

Async chunks

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

id before after diff
enterpriseSearch 2.6MB 2.6MB +3.4KB
searchNavigation - 1.5KB +1.5KB
total +4.8KB

Page load bundle

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

id before after diff
enterpriseSearch 53.9KB 54.3KB +445.0B
searchNavigation - 4.1KB +4.1KB
total +4.5KB
Unknown metric groups

API count

id before after diff
searchNavigation - 21 +21

async chunk count

id before after diff
enterpriseSearch 19 20 +1
searchNavigation - 1 +1
total +2

ESLint disabled line counts

id before after diff
searchNavigation - 1 +1

Total ESLint disabled count

id before after diff
searchNavigation - 1 +1

History

Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@TattdCodeMonkey TattdCodeMonkey merged commit a84122c into elastic:main Nov 22, 2024
38 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11974607898

@joemcelroy
Copy link
Member

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

joemcelroy pushed a commit to joemcelroy/kibana that referenced this pull request Nov 25, 2024
(cherry picked from commit a84122c)

# Conflicts:
#	.github/CODEOWNERS
joemcelroy added a commit that referenced this pull request Nov 25, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search] Introduce search navigation plugin
(#200314)](#200314)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"rodney.norris@elastic.co"},"sourceCommit":{"committedDate":"2024-11-22T14:35:49Z","message":"[Search]
Introduce search navigation plugin
(#200314)","sha":"a84122c4cab5a61002d91631078056ee5d9cdd08","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor","v8.18.0"],"number":200314,"url":"https://github.com/elastic/kibana/pull/200314","mergeCommit":{"message":"[Search]
Introduce search navigation plugin
(#200314)","sha":"a84122c4cab5a61002d91631078056ee5d9cdd08"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200314","number":200314,"mergeCommit":{"message":"[Search]
Introduce search navigation plugin
(#200314)","sha":"a84122c4cab5a61002d91631078056ee5d9cdd08"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Rodney Norris <rodney.norris@elastic.co>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Nov 26, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants