[Discover] Fix "Body cell lines" display option handling when default value is -1#228697
Conversation
… -1 in advanced settings
5aaa165 to
027680f
Compare
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
cc @davismcphee |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
jughosta
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for fixing it so quickly!
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 |
… 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)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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
…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>
… 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
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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
…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-->
… 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.
… 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.
|
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. |
|
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. |
…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-->
…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-->
… 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.
… 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.
Summary
This PR fixes the handling of the "Body cell lines" display option in Discover when the default value is set to
-1in Advanced Settings. It will now set the cell lines input to a default value instead of-1in 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:-1does not automatically switch to "Auto" mode and cause the user to get stuck again.1or0.Fixes #228682.
Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.