Skip to content

[Discover] [Group by] Support restoring UI state when switching tabs#252888

Closed
davismcphee wants to merge 23 commits into
elastic:mainfrom
davismcphee:discover-group-by-ui-state
Closed

[Discover] [Group by] Support restoring UI state when switching tabs#252888
davismcphee wants to merge 23 commits into
elastic:mainfrom
davismcphee:discover-group-by-ui-state

Conversation

@davismcphee
Copy link
Copy Markdown
Contributor

Summary

WIP.

Resolves #249456.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 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
  • Review the backport guidelines and apply applicable backport:* labels.

@davismcphee davismcphee self-assigned this Feb 12, 2026
@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Feb 12, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@eokoneyo eokoneyo force-pushed the discover-group-by-ui-state branch from 2cf63d5 to b6b0033 Compare February 16, 2026 13:14
@eokoneyo eokoneyo force-pushed the discover-group-by-ui-state branch from 6a1b128 to 615aced Compare February 16, 2026 15:17
Comment on lines -136 to -155
useEffect(
() => () => {
// ensure that for a row that's been scrolled,
// if said row is technically still in view because it's cell is being rendered,
// when we are unmounting because the expand action from the cell's row was clicked,
// we want to ensure said row is the top most item in our list
if (
virtualRow?.index &&
!rootVirtualizer.isScrolling &&
getScrollOffset() > getScrollMargin()
) {
rootVirtualizer.scrollToVirtualizedIndex(virtualRow.index, {
align: 'start',
behavior: 'auto',
});
}
},
[rootVirtualizer, virtualRow?.index, getScrollOffset, getScrollMargin]
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this as it would cause the scrollOffset to be reset when a state persistence happens and undo the initial scrollOffset passed along

@davismcphee
Copy link
Copy Markdown
Contributor Author

Closing in favour of #253608.

@davismcphee davismcphee deleted the discover-group-by-ui-state branch February 18, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover] [Group By] Restore group by UI state when switching between Discover tabs

3 participants