-
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
[Watcher] Fix sorting on JSX headers #170085
[Watcher] Fix sorting on JSX headers #170085
Conversation
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 catch of the issue with preserving the JSX elements! Tested locally and the sorting works now. Thanks for fixing this! 🚀
💚 Build Succeeded
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: cc @Ikuni17 |
## Summary Closes elastic#164126 EUI in memory tables need to have stable headers between renders to sort properly when the header is a JSX element ([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)). This PR stabilizes the headers for `WatchListPage` only. I noticed there were some other columns which likely have the same issue in Watcher, but I'm unsure how far reaching these changes need to be. Reading through the issue @ElenaStoeva mentions changing the sorting anyways, so a quick fix seems more appropriate. ![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19) ## Release Note Fixed issue where certain columns in the Watcher table were not sorting properly. (cherry picked from commit 540e6c0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.11`: - [[Watcher] Fix sorting on JSX headers (#170085)](#170085) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Brad White","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-30T15:34:43Z","message":"[Watcher] Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses #164126\r\n\r\nEUI in memory tables need to have stable headers between renders to sort\r\nproperly when the header is a JSX element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis PR stabilizes the headers for `WatchListPage` only. I noticed there\r\nwere some other columns which likely have the same issue in Watcher, but\r\nI'm unsure how far reaching these changes need to be. Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting anyways, so a quick\r\nfix seems more appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n## Release Note\r\nFixed issue where certain columns in the Watcher table were not sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","v8.12.0"],"number":170085,"url":"https://github.com/elastic/kibana/pull/170085","mergeCommit":{"message":"[Watcher] Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses #164126\r\n\r\nEUI in memory tables need to have stable headers between renders to sort\r\nproperly when the header is a JSX element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis PR stabilizes the headers for `WatchListPage` only. I noticed there\r\nwere some other columns which likely have the same issue in Watcher, but\r\nI'm unsure how far reaching these changes need to be. Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting anyways, so a quick\r\nfix seems more appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n## Release Note\r\nFixed issue where certain columns in the Watcher table were not sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170085","number":170085,"mergeCommit":{"message":"[Watcher] Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses #164126\r\n\r\nEUI in memory tables need to have stable headers between renders to sort\r\nproperly when the header is a JSX element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis PR stabilizes the headers for `WatchListPage` only. I noticed there\r\nwere some other columns which likely have the same issue in Watcher, but\r\nI'm unsure how far reaching these changes need to be. Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting anyways, so a quick\r\nfix seems more appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n## Release Note\r\nFixed issue where certain columns in the Watcher table were not sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0"}}]}] BACKPORT--> Co-authored-by: Brad White <[email protected]>
Summary
Closes #164126
EUI in memory tables need to have stable headers between renders to sort properly when the header is a JSX element (Docs). This PR stabilizes the headers for
WatchListPage
only. I noticed there were some other columns which likely have the same issue in Watcher, but I'm unsure how far reaching these changes need to be. Reading through the issue @ElenaStoeva mentions changing the sorting anyways, so a quick fix seems more appropriate.Release Note
Fixed issue where certain columns in the Watcher table were not sorting properly.