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

[Watcher] Fix sorting on JSX headers #170085

Merged

Conversation

Ikuni17
Copy link
Contributor

@Ikuni17 Ikuni17 commented Oct 28, 2023

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.

Untitled

Release Note

Fixed issue where certain columns in the Watcher table were not sorting properly.

@Ikuni17 Ikuni17 added release_note:fix backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.12.0 labels Oct 28, 2023
@Ikuni17 Ikuni17 self-assigned this Oct 28, 2023
@Ikuni17 Ikuni17 requested a review from a team as a code owner October 28, 2023 03:40
@elastic elastic deleted a comment from kibana-ci Oct 30, 2023
Copy link
Contributor

@ElenaStoeva ElenaStoeva left a 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! 🚀

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
watcher 163.3KB 163.4KB +24.0B

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

cc @Ikuni17

@Ikuni17 Ikuni17 merged commit 540e6c0 into elastic:main Oct 30, 2023
@Ikuni17 Ikuni17 deleted the feature/164126/watcher-ui-column-sorting branch October 30, 2023 15:34
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 30, 2023
## 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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.11

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

Questions ?

Please refer to the Backport tool documentation

Ikuni17 added a commit that referenced this pull request Nov 9, 2023
# 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]>
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:fix v8.11.1 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watcher UI - allow sorting options for State, Condition last met, Last checked and Comment columns
4 participants