Skip to content

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

Merged
davismcphee merged 3 commits intoelastic:mainfrom
davismcphee:fix-config-row-height
Jul 21, 2025
Merged

[Discover] Fix "Body cell lines" display option handling when default value is -1#228697
davismcphee merged 3 commits intoelastic:mainfrom
davismcphee:fix-config-row-height

Conversation

@davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Jul 19, 2025

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 #228682.

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 Jul 19, 2025
@davismcphee davismcphee added release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v8.19.0 v9.2.0 v8.18.4 v9.0.5 v9.1.1 labels Jul 19, 2025
@davismcphee davismcphee force-pushed the fix-config-row-height branch from 5aaa165 to 027680f Compare July 20, 2025 05:18
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

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 555.5KB 555.8KB +317.0B
discover 1.1MB 1.1MB +327.0B
esqlDataGrid 158.1KB 158.4KB +315.0B
lens 1.5MB 1.5MB +21.0B
securitySolution 9.8MB 9.8MB +317.0B
slo 975.3KB 975.6KB +317.0B
total +1.6KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cloudSecurityPosture 19.1KB 19.2KB +71.0B
discover 22.5KB 22.6KB +71.0B
esqlDataGrid 9.1KB 9.1KB +71.0B
slo 32.6KB 32.6KB +71.0B
total +284.0B
Unknown metric groups

API count

id before after diff
@kbn/unified-data-table 117 118 +1

History

cc @davismcphee

@davismcphee davismcphee marked this pull request as ready for review July 21, 2025 03:51
@davismcphee davismcphee requested review from a team as code owners July 21, 2025 03:51
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thanks for fixing it so quickly!

@davismcphee davismcphee merged commit de5e2a6 into elastic:main Jul 21, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

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

@davismcphee davismcphee deleted the fix-config-row-height branch July 21, 2025 19:32
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 21, 2025
… 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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 228697

Questions ?

Please refer to the Backport tool documentation

@davismcphee
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

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

Questions ?

Please refer to the Backport tool documentation

davismcphee added a commit to davismcphee/kibana that referenced this pull request Jul 21, 2025
… 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
kibanamachine added a commit that referenced this pull request Jul 21, 2025
…efault value is `-1` (#228697) (#228859)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Discover] Fix "Body cell lines" display option handling when default
value is `-1` (#228697)](#228697)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T19:31:46Z","message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v8.19.0","v9.2.0","v8.18.4","v9.0.5","v9.1.1"],"title":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1`","number":228697,"url":"https://github.com/elastic/kibana/pull/228697","mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0","9.1"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228697","number":228697,"mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
davismcphee added a commit to davismcphee/kibana that referenced this pull request Jul 21, 2025
… 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
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19
8.18

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

Questions ?

Please refer to the Backport tool documentation

davismcphee added a commit to davismcphee/kibana that referenced this pull request Jul 21, 2025
… 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 added a commit that referenced this pull request Jul 22, 2025
…default value is `-1` (#228697) (#228879)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Discover] Fix "Body cell lines" display option handling when default
value is `-1` (#228697)](#228697)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T19:31:46Z","message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v8.19.0","v9.2.0","v8.18.4","v9.0.5","v9.1.1"],"title":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1`","number":228697,"url":"https://github.com/elastic/kibana/pull/228697","mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228697","number":228697,"mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228878","number":228878,"state":"OPEN"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228859","number":228859,"state":"OPEN"}]}]
BACKPORT-->
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
… 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.
maxcold pushed a commit that referenced this pull request Jul 22, 2025
… value is `-1` (#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 #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.
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 22, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @davismcphee

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @davismcphee

davismcphee added a commit that referenced this pull request Jul 24, 2025
…efault value is `-1` (#228697) (#228878)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Discover] Fix "Body cell lines" display option handling when default
value is `-1` (#228697)](#228697)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T19:31:46Z","message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v8.19.0","v9.2.0","v8.18.4","v9.0.5","v9.1.1"],"title":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1`","number":228697,"url":"https://github.com/elastic/kibana/pull/228697","mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228697","number":228697,"mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228859","number":228859,"state":"OPEN"}]}]
BACKPORT-->
davismcphee added a commit that referenced this pull request Jul 24, 2025
…default value is `-1` (#228697) (#228880)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Discover] Fix "Body cell lines" display option handling when default
value is `-1` (#228697)](#228697)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T19:31:46Z","message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v8.19.0","v9.2.0","v8.18.4","v9.0.5","v9.1.1"],"title":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1`","number":228697,"url":"https://github.com/elastic/kibana/pull/228697","mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228697","number":228697,"mergeCommit":{"message":"[Discover]
Fix \"Body cell lines\" display option handling when default value is
`-1` (#228697)\n\n## Summary\n\nThis PR fixes the handling of the \"Body
cell lines\" display option in\nDiscover when the default value is set
to `-1` in Advanced Settings. It\nwill now set the cell lines input to a
default value instead of `-1` in\nthis case, and will not prevent users
from switching from \"Auto\" to\n\"Custom\" mode. Additionally, some
changes were made to the validation to\naddress some bugs and improve
the UX:\n- Manually setting a value of `-1` does not automatically
switch to\n\"Auto\" mode and cause the user to get stuck again.\n- The
last valid input value will be restored when switching from\n\"Custom\"
to \"Auto\" with an invalid value.\n- Deleting the current value allows
users to actually clear the input\nand enter a new value instead of it
automatically being reset to `1` or\n`0`.\n\nFixes #228682.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"de5e2a6771636a2de7e9deff7930299427f20c5a"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228878","number":228878,"state":"OPEN"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228859","number":228859,"state":"OPEN"}]}]
BACKPORT-->
@kibanamachine kibanamachine added v8.18.5 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Jul 24, 2025
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
… 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.
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Jul 25, 2025
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.18.4 v8.18.5 v8.19.0 v9.0.5 v9.1.0 v9.1.1 v9.2.0

4 participants