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

[Unified Data Table] Stop passing data grid density as key #202390

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Dec 1, 2024

Summary

When the data grid density setting was added, an issue was found with resetting the density state: #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, 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

@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:UnifiedDataTable labels Dec 1, 2024
@davismcphee davismcphee self-assigned this Dec 1, 2024
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #75 / discover/context_awareness extension getAdditionalCellActions data view mode should not render incompatible cell action for message column

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.6KB 502.6KB -7.0B
discover 812.8KB 812.8KB -7.0B
esqlDataGrid 153.6KB 153.6KB -7.0B
securitySolution 14.6MB 14.6MB -42.0B
slo 842.6KB 842.6KB -7.0B
total -70.0B

History

cc @davismcphee

@davismcphee davismcphee marked this pull request as ready for review December 2, 2024 04:38
@davismcphee davismcphee requested review from a team as code owners December 2, 2024 04:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

nice cleanup 👍 , tested it and works as expected

@davismcphee davismcphee merged commit 281269f into elastic:main Dec 2, 2024
8 checks passed
@davismcphee davismcphee deleted the remove-grid-density-key branch December 2, 2024 18:22
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12125538942

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
…#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
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
…y` (#202390) (#202563)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Unified Data Table] Stop passing data grid density as
`key`
(#202390)](#202390)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T18:22:53Z","message":"[Unified
Data Table] Stop passing data grid density as `key` (#202390)\n\n##
Summary\r\n\r\nWhen the data grid density setting was added, an issue
was found with\r\nresetting the density
state:\r\nhttps://github.com//pull/188495#discussion_r1712510252.
It\r\nwas caused by an EUI bug:
https://github.com/elastic/eui/issues/7962.\r\nThe EUI bug has been
fixed and this is no longer an issue, so we can\r\nremove the workaround
we were using by passing the data grid density in\r\nthe `key` prop to
the data grid to force a re-render. Besides removing a\r\nsmall piece of
tech debt, this change improves performance when\r\nswitching densities,
and no longer closes the popover when changing the\r\ndensity (like
other settings).\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"281269f6a050458532b17235df1536984ee0d394","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","Feature:UnifiedDataTable"],"title":"[Unified
Data Table] Stop passing data grid density as
`key`","number":202390,"url":"https://github.com/elastic/kibana/pull/202390","mergeCommit":{"message":"[Unified
Data Table] Stop passing data grid density as `key` (#202390)\n\n##
Summary\r\n\r\nWhen the data grid density setting was added, an issue
was found with\r\nresetting the density
state:\r\nhttps://github.com//pull/188495#discussion_r1712510252.
It\r\nwas caused by an EUI bug:
https://github.com/elastic/eui/issues/7962.\r\nThe EUI bug has been
fixed and this is no longer an issue, so we can\r\nremove the workaround
we were using by passing the data grid density in\r\nthe `key` prop to
the data grid to force a re-render. Besides removing a\r\nsmall piece of
tech debt, this change improves performance when\r\nswitching densities,
and no longer closes the popover when changing the\r\ndensity (like
other settings).\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"281269f6a050458532b17235df1536984ee0d394"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202390","number":202390,"mergeCommit":{"message":"[Unified
Data Table] Stop passing data grid density as `key` (#202390)\n\n##
Summary\r\n\r\nWhen the data grid density setting was added, an issue
was found with\r\nresetting the density
state:\r\nhttps://github.com//pull/188495#discussion_r1712510252.
It\r\nwas caused by an EUI bug:
https://github.com/elastic/eui/issues/7962.\r\nThe EUI bug has been
fixed and this is no longer an issue, so we can\r\nremove the workaround
we were using by passing the data grid density in\r\nthe `key` prop to
the data grid to force a re-render. Besides removing a\r\nsmall piece of
tech debt, this change improves performance when\r\nswitching densities,
and no longer closes the popover when changing the\r\ndensity (like
other settings).\r\n\r\n### Checklist\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"281269f6a050458532b17235df1536984ee0d394"}}]}]
BACKPORT-->

Co-authored-by: Davis McPhee <[email protected]>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
…#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)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…#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)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…#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)
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) Feature:UnifiedDataTable release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants