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

[Discover] Split saved searches out of discover plugin #138388

Merged
merged 7 commits into from
Aug 12, 2022

Conversation

flash1293
Copy link
Contributor

This PR splits shared saved search logic (used by discover and visualize) out of the discover plugin into a separate plugin. This will allow to implement the histogram in Discover using a Lens embeddable in a later step (otherwise it would have introduced a cyclic dependency).

This PR is mostly moving over the saved search service - react hook and conflict component are left within Discover because they are not used anywhere else.

Screenshot 2022-08-09 at 15 22 39

Screenshot 2022-08-09 at 15 23 29

@flash1293 flash1293 added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Aug 9, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 555 548 -7
savedSearch - 11 +11
total +4

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
discover 68 73 +5
savedSearch - 39 +39
total +44

Async chunks

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

id before after diff
discover 463.1KB 464.2KB +1.1KB

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
discover 7 5 -2
savedSearch - 1 +1
total -1

Page load bundle

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

id before after diff
discover 29.1KB 25.7KB -3.3KB
savedSearch - 4.7KB +4.7KB
visualizations 46.8KB 46.8KB +3.0B
total +1.4KB
Unknown metric groups

API count

id before after diff
discover 84 89 +5
savedSearch - 39 +39
total +44

ESLint disabled in files

id before after diff
discover 2 1 -1
savedSearch - 1 +1
total -0

Total ESLint disabled count

id before after diff
discover 39 38 -1
savedSearch - 1 +1
total -0

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293 flash1293 marked this pull request as ready for review August 10, 2022 14:21
@flash1293 flash1293 requested review from a team as code owners August 10, 2022 14:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

limits.yml

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

LGTM, code review, testing by merging with the lens in Discover POC, cyclic dependency resolved. thx for taking care of the heavy lifting 👍

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Tested locally 👍
Left only a tiny nitpick comment.

Comment on lines +11 to +12
import { SavedSearch } from '@kbn/saved-search-plugin/public';
import type { SortOrder } from '@kbn/saved-search-plugin/public';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can these be merged?

Copy link
Member

Choose a reason for hiding this comment

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

that's what this PR will do ... once the merge conflicts are resolved: #137488
Joe's PR went first, because I doubt he already has grey hair ... while one gray hair more for me, doesn't matter 👴

@flash1293 flash1293 merged commit fcf3b8b into elastic:main Aug 12, 2022
Mpdreamz pushed a commit to Mpdreamz/kibana that referenced this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants