Improve computation logic for sticky header#260611
Conversation
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Historycc @eokoneyo |
|
@elasticmachine merge upstream |
|
Starting backport for target branches: 9.3 https://github.com/elastic/kibana/actions/runs/23844272056 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
## Summary This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a `useMemo` and this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true. #### Visuals https://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4 <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a `useMemo` and this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true. #### Visuals https://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4 <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a `useMemo` and this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true. #### Visuals https://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4 <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
6 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
## Summary This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a `useMemo` and this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true. #### Visuals https://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4 <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit a92949d) # Conflicts: # src/platform/packages/shared/shared-ux/document_data_cascade/impl/src/components/data_cascade_impl/data_cascade_impl.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a `useMemo` and this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true. https://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4 <!-- Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit a92949d) h
# Backport This will backport the following commits from `main` to `9.3`: - [Improve computation logic for sticky header (#260611)](#260611) <!--- Backport version: 11.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Eyo O. Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-01T10:31:49Z","message":"Improve computation logic for sticky header (#260611)\n\n## Summary\n\nThis PR improves the computation logic that determines wether a row\nshould become sticky or not, particularly addressing the reason why the\nfirst row wouldn't become sticky, it was previously within a `useMemo`\nand this meant we wouldn't recompute because the record for user\ninteraction (virtualizer's scrollOffset) doesn't cause a re-evaluation\nso it's not till the user has the second row expanded that the logic\nevaluates as true.\n\n#### Visuals\n\n\nhttps://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4\n\n\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a92949d0ce0c227a7a03d33b771e8c524dfbf31f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","Team:SharedUX","backport:version","v9.4.0","v9.3.3"],"title":"Improve computation logic for sticky header","number":260611,"url":"https://github.com/elastic/kibana/pull/260611","mergeCommit":{"message":"Improve computation logic for sticky header (#260611)\n\n## Summary\n\nThis PR improves the computation logic that determines wether a row\nshould become sticky or not, particularly addressing the reason why the\nfirst row wouldn't become sticky, it was previously within a `useMemo`\nand this meant we wouldn't recompute because the record for user\ninteraction (virtualizer's scrollOffset) doesn't cause a re-evaluation\nso it's not till the user has the second row expanded that the logic\nevaluates as true.\n\n#### Visuals\n\n\nhttps://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4\n\n\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a92949d0ce0c227a7a03d33b771e8c524dfbf31f"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/260611","number":260611,"mergeCommit":{"message":"Improve computation logic for sticky header (#260611)\n\n## Summary\n\nThis PR improves the computation logic that determines wether a row\nshould become sticky or not, particularly addressing the reason why the\nfirst row wouldn't become sticky, it was previously within a `useMemo`\nand this meant we wouldn't recompute because the record for user\ninteraction (virtualizer's scrollOffset) doesn't cause a re-evaluation\nso it's not till the user has the second row expanded that the logic\nevaluates as true.\n\n#### Visuals\n\n\nhttps://github.com/user-attachments/assets/02b333c9-143c-4d99-948f-2c59d64581a4\n\n\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a92949d0ce0c227a7a03d33b771e8c524dfbf31f"}},{"branch":"9.3","label":"v9.3.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Summary
This PR improves the computation logic that determines wether a row should become sticky or not, particularly addressing the reason why the first row wouldn't become sticky, it was previously within a
useMemoand this meant we wouldn't recompute because the record for user interaction (virtualizer's scrollOffset) doesn't cause a re-evaluation so it's not till the user has the second row expanded that the logic evaluates as true.Visuals
Untitled_sticky_header.mov