[Discover] Fix truncation for longer text in table#241440
Merged
akowalska622 merged 10 commits intomainfrom Nov 11, 2025
Merged
[Discover] Fix truncation for longer text in table#241440akowalska622 merged 10 commits intomainfrom
akowalska622 merged 10 commits intomainfrom
Conversation
Contributor
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
…/kibana into discover-fix-one-line-truncation
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
davismcphee
reviewed
Nov 6, 2025
src/platform/packages/shared/kbn-unified-data-table/src/components/data_table.tsx
Outdated
Show resolved
Hide resolved
NicholasPeretti
approved these changes
Nov 10, 2025
Contributor
|
Starting backport for target branches: 8.19, 9.1, 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 11, 2025
(cherry picked from commit b947916)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 11, 2025
(cherry picked from commit b947916)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 11, 2025
(cherry picked from commit b947916)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Nov 11, 2025
…242499) # Backport This will backport the following commits from `main` to `9.1`: - [[Discover] Fix truncation for longer text in table (#241440)](#241440) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"63072419+akowalska622@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-11T08:39:22Z","message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.3.0","v8.19.7","v9.1.7","v9.2.1"],"title":"[Discover] Fix truncation for longer text in table","number":241440,"url":"https://github.com/elastic/kibana/pull/241440","mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241440","number":241440,"mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},{"branch":"8.19","label":"v8.19.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ania Kowalska <63072419+akowalska622@users.noreply.github.com>
kibanamachine
added a commit
that referenced
this pull request
Nov 11, 2025
…242500) # Backport This will backport the following commits from `main` to `9.2`: - [[Discover] Fix truncation for longer text in table (#241440)](#241440) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"63072419+akowalska622@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-11T08:39:22Z","message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.3.0","v8.19.7","v9.1.7","v9.2.1"],"title":"[Discover] Fix truncation for longer text in table","number":241440,"url":"https://github.com/elastic/kibana/pull/241440","mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241440","number":241440,"mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},{"branch":"8.19","label":"v8.19.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ania Kowalska <63072419+akowalska622@users.noreply.github.com>
kibanamachine
added a commit
that referenced
this pull request
Nov 11, 2025
…242498) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover] Fix truncation for longer text in table (#241440)](#241440) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"63072419+akowalska622@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-11T08:39:22Z","message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.3.0","v8.19.7","v9.1.7","v9.2.1"],"title":"[Discover] Fix truncation for longer text in table","number":241440,"url":"https://github.com/elastic/kibana/pull/241440","mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241440","number":241440,"mergeCommit":{"message":"[Discover] Fix truncation for longer text in table (#241440)","sha":"b947916eba486d340b61214a429f2cf32a0ea4c2"}},{"branch":"8.19","label":"v8.19.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ania Kowalska <63072419+akowalska622@users.noreply.github.com>
eokoneyo
pushed a commit
to eokoneyo/kibana
that referenced
this pull request
Dec 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #238831
After wrapping cell into a
divin purpose of in-table-search (we need arefthere) we lost cell content truncation, because styles applied by EUI are not inherited further.Note
Targeting div via class and applying EUI styles is obsolete. Eventually replacing
divwith aspanwas sufficient to inherit styles successfully. Leaving the screenshots (UI wise solution is the same) and old description below for clear changes history.UI before in-table-search

UI after in-table-search

EUI docs

As a solution, I firstly added a
.eui-textTruncateclass directly to that new div, however it was then applied to multilines as well and the class forced one-line text render, no matter of body cell lines count.Eventually I've targeted
.euiDataGridRowCell__content--defaultHeight > div(targeting --defaultHeight is already a workaround for one line summary truncation) and applied truncation styles manually. Another possibility would be applyingeuiTextTruncate()helper, however it doesn't work in an object syntax we use here (following to Emotion standards).I'm open to refactor to css`` syntax, which accepts
euiTextTruncate()if we prefer to use EUI helper, instead of keeping Emotion syntax aligned.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.