Skip to content

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

Merged
davismcphee merged 3 commits intoelastic:8.18from
davismcphee:backport/8.18/pr-228697
Jul 24, 2025
Merged

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

Conversation

@davismcphee
Copy link
Contributor

Backport

This will backport the following commits from main to 8.18:

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:43
@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 758 760 +2
discover 1088 1089 +1
esqlDataGrid 499 501 +2
securitySolution 7067 7068 +1
slo 978 980 +2
total +8

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 108 109 +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 484.3KB 484.9KB +566.0B
discover 796.1KB 796.5KB +459.0B
esqlDataGrid 155.1KB 155.6KB +566.0B
lens 1.5MB 1.5MB +21.0B
securitySolution 9.1MB 9.1MB +437.0B
slo 759.1KB 759.6KB +567.0B
total +2.6KB
Unknown metric groups

API count

id before after diff
@kbn/unified-data-table 186 187 +1

History

cc @davismcphee

@davismcphee davismcphee merged commit a98eb7f into elastic:8.18 Jul 24, 2025
8 checks passed
@davismcphee davismcphee deleted the backport/8.18/pr-228697 branch July 24, 2025 19:00
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