Skip to content

[8.19] [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)#228879

Merged
davismcphee merged 2 commits intoelastic:8.19from
davismcphee:backport/8.19/pr-228697
Jul 22, 2025
Merged

[8.19] [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)#228879
davismcphee merged 2 commits intoelastic:8.19from
davismcphee:backport/8.19/pr-228697

Conversation

@davismcphee
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

… value is `-1` (elastic#228697)

## Summary

This PR fixes the handling of the "Body cell lines" display option in
Discover when the default value is set to `-1` in Advanced Settings. It
will now set the cell lines input to a default value instead of `-1` in
this case, and will not prevent users from switching from "Auto" to
"Custom" mode. Additionally, some changes were made to the validation to
address some bugs and improve the UX:
- Manually setting a value of `-1` does not automatically switch to
"Auto" mode and cause the user to get stuck again.
- The last valid input value will be restored when switching from
"Custom" to "Auto" with an invalid value.
- Deleting the current value allows users to actually clear the input
and enter a new value instead of it automatically being reset to `1` or
`0`.

Fixes elastic#228682.

### 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/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
- [x] [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
- [x] 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)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit de5e2a6)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-data-table/src/components/data_table_additional_display_settings.tsx
@davismcphee davismcphee added the backport This PR is a backport of another PR label Jul 21, 2025
@davismcphee davismcphee enabled auto-merge (squash) July 21, 2025 21:37
@davismcphee davismcphee self-assigned this Jul 21, 2025
@davismcphee davismcphee added the Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// label Jul 21, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cloudSecurityPosture 727 728 +1
discover 1474 1475 +1
esqlDataGrid 457 458 +1
slo 1339 1340 +1
total +4

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/unified-data-table 112 113 +1

Async chunks

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

id before after diff
cloudSecurityPosture 501.9KB 502.4KB +456.0B
discover 1.1MB 1.1MB +459.0B
esqlDataGrid 160.4KB 160.9KB +454.0B
lens 1.5MB 1.5MB +21.0B
securitySolution 9.4MB 9.4MB +322.0B
slo 1011.0KB 1011.5KB +456.0B
total +2.1KB
Unknown metric groups

API count

id before after diff
@kbn/unified-data-table 191 192 +1

History

cc @davismcphee

@davismcphee davismcphee merged commit 2938152 into elastic:8.19 Jul 22, 2025
8 checks passed
@davismcphee davismcphee deleted the backport/8.19/pr-228697 branch July 24, 2025 19:01
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 Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//

3 participants