Skip to content

[8.x] [Unified Data Table] Stop passing data grid density as `key` (#202390)#202563

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-202390
Dec 2, 2024
Merged

[8.x] [Unified Data Table] Stop passing data grid density as `key` (#202390)#202563
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-202390

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…#202390)

## Summary

When the data grid density setting was added, an issue was found with
resetting the density state:
elastic#188495 (comment). It
was caused by an EUI bug: elastic/eui#7962.
The EUI bug has been fixed and this is no longer an issue, so we can
remove the workaround we were using by passing the data grid density in
the `key` prop to the data grid to force a re-render. Besides removing a
small piece of tech debt, this change improves performance when
switching densities, and no longer closes the popover when changing the
density (like other settings).

### Checklist

- [ ] 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/packages/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)

(cherry picked from commit 281269f)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Dec 2, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) December 2, 2024 18:28
@kibanamachine kibanamachine merged commit 7e3b70e into elastic:8.x Dec 2, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 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
cloudSecurityPosture 502.4KB 502.4KB -7.0B
discover 811.3KB 811.3KB -7.0B
esqlDataGrid 153.6KB 153.6KB -7.0B
securitySolution 13.4MB 13.4MB -35.0B
slo 829.7KB 829.7KB -7.0B
total -63.0B

cc @davismcphee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants