-
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
[Dashboard] fix searchSessionId not updated when pinned filter changes #151390
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
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.
DataDiscovery changes LGTM
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
Changes LGTM! Code only review, but everything looks great.
expect(await getShouldRefresh.bind(dashboardContainerMock)(lastInput, input)).toBe(true); | ||
}); | ||
|
||
test('should return false when disabled filters change', async () => { |
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.
Nice test additions!
return Object.keys(inputChanges).length > 0; | ||
} | ||
|
||
async function getInputChanges( |
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.
Good call moving this to a shared function.
#151390) Fixes #151219 and #151224 PR separates shouldRefresh logic from unsavedChanges logic to account for difference in filter check. shouldRefresh filter check: * includes pinned filters * excludes disabled filters * excludes $state so pinning/unpinning a filter does not cause a refresh. --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit cd910be)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
…changes (#151390) (#151742) # Backport This will backport the following commits from `main` to `8.7`: - [[Dashboard] fix searchSessionId not updated when pinned filter changes (#151390)](#151390) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-21T16:31:06Z","message":"[Dashboard] fix searchSessionId not updated when pinned filter changes (#151390)\n\nFixes #151219 and\r\nhttps://github.com//issues/151224\r\n\r\nPR separates shouldRefresh logic from unsavedChanges logic to account\r\nfor difference in filter check.\r\n\r\nshouldRefresh filter check:\r\n* includes pinned filters\r\n* excludes disabled filters\r\n* excludes $state so pinning/unpinning a filter does not cause a\r\nrefresh.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd910bee1cb062111e094c2744f153010e6b2e2c","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Dashboard","release_note:fix","Team:Presentation","loe:hours","impact:medium","auto-backport","v8.7.0","v8.8.0"],"number":151390,"url":"https://github.com/elastic/kibana/pull/151390","mergeCommit":{"message":"[Dashboard] fix searchSessionId not updated when pinned filter changes (#151390)\n\nFixes #151219 and\r\nhttps://github.com//issues/151224\r\n\r\nPR separates shouldRefresh logic from unsavedChanges logic to account\r\nfor difference in filter check.\r\n\r\nshouldRefresh filter check:\r\n* includes pinned filters\r\n* excludes disabled filters\r\n* excludes $state so pinning/unpinning a filter does not cause a\r\nrefresh.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd910bee1cb062111e094c2744f153010e6b2e2c"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/151390","number":151390,"mergeCommit":{"message":"[Dashboard] fix searchSessionId not updated when pinned filter changes (#151390)\n\nFixes #151219 and\r\nhttps://github.com//issues/151224\r\n\r\nPR separates shouldRefresh logic from unsavedChanges logic to account\r\nfor difference in filter check.\r\n\r\nshouldRefresh filter check:\r\n* includes pinned filters\r\n* excludes disabled filters\r\n* excludes $state so pinning/unpinning a filter does not cause a\r\nrefresh.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd910bee1cb062111e094c2744f153010e6b2e2c"}}]}] BACKPORT--> Co-authored-by: Nathan Reese <[email protected]>
Fixes #151219 and #151224
PR separates shouldRefresh logic from unsavedChanges logic to account for difference in filter check.
shouldRefresh filter check: