-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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][Embeddable] Pass embeddable filters to Surrounding Docs page #197190
[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page #197190
Conversation
query: savedSearchQuery, | ||
filters: savedSearchFilters, |
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.
I think I kept this as it was before. We might want to consider including the current Dashboard filters for cell actions too.
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.
Yeah it's hard to say which behaviour is best for this. It's something worth discussing at least.
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
It seems to be working as expected, just one question about the implementation.
api.fetchContext$, | ||
stateManager.rows, | ||
stateManager.totalHitCount, | ||
stateManager.columnsMeta, | ||
stateManager.grid | ||
); | ||
|
||
// `api.query$` and `api.filters$` are the initial values from the saved search SO (as of now) |
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.
If api.query$
and api.filters$
already contain the saved search values, why are we switching to searchSource
below?
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.
It seemed less verbose to me. Okay, I am going to keep the variables but reassign them to api values 4615e64
query: savedSearchQuery, | ||
filters: savedSearchFilters, |
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.
Yeah it's hard to say which behaviour is best for this. It's something worth discussing at least.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @jughosta |
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.
Code changes look good and it works as expected, thanks 👍
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11497270994 |
…ge (elastic#197190) ## Summary This PR makes sure to pass `filters` to DocViewer from the search panel on Dashboard. And DocViewer will pass `filters` over to Surrounding Docs page. ### Checklist - [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 (cherry picked from commit 1c3705b)
…ge (elastic#197190) ## Summary This PR makes sure to pass `filters` to DocViewer from the search panel on Dashboard. And DocViewer will pass `filters` over to Surrounding Docs page. ### Checklist - [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 (cherry picked from commit 1c3705b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ocs page (#197190) (#197594) # Backport This will backport the following commits from `main` to `8.x`: - [[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)](#197190) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T10:16:21Z","message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:DataDiscovery","v8.16.0","backport:version","v8.17.0"],"title":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page","number":197190,"url":"https://github.com/elastic/kibana/pull/197190","mergeCommit":{"message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197190","number":197190,"mergeCommit":{"message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
…Docs page (#197190) (#197593) # Backport This will backport the following commits from `main` to `8.16`: - [[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)](#197190) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T10:16:21Z","message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:DataDiscovery","v8.16.0","backport:version","v8.17.0"],"title":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page","number":197190,"url":"https://github.com/elastic/kibana/pull/197190","mergeCommit":{"message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197190","number":197190,"mergeCommit":{"message":"[Discover][Embeddable] Pass embeddable filters to Surrounding Docs page (#197190)\n\n## Summary\r\n\r\nThis PR makes sure to pass `filters` to DocViewer from the search panel\r\non Dashboard. And DocViewer will pass `filters` over to Surrounding Docs\r\npage.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1c3705ba5b5aa60ea451a7d0ff7f95f2d21a1b80"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Summary
This PR makes sure to pass
filters
to DocViewer from the search panel on Dashboard. And DocViewer will passfilters
over to Surrounding Docs page.Checklist