Skip to content

Conversation

@akowalska622
Copy link
Contributor

@akowalska622 akowalska622 commented Oct 31, 2025

Summary

Closes #238831

After wrapping cell into a div in purpose of in-table-search (we need a ref there) 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 div with a span was 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
SCR-20251031-kwra

UI after in-table-search
SCR-20251031-kxhc

EUI docs
SCR-20251031-ldam

As a solution, I firstly added a .eui-textTruncate class 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.

SCR-20251031-kxqy SCR-20251031-kylo SCR-20251031-liyv

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 applying euiTextTruncate() 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.

  • 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.

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.

@akowalska622 akowalska622 self-assigned this Oct 31, 2025
@akowalska622 akowalska622 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.7 v9.1.7 labels Oct 31, 2025
@akowalska622 akowalska622 marked this pull request as ready for review October 31, 2025 11:17
@akowalska622 akowalska622 requested a review from a team as a code owner October 31, 2025 11:17
@elasticmachine
Copy link
Contributor

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

@akowalska622 akowalska622 marked this pull request as draft October 31, 2025 11:23
@akowalska622 akowalska622 marked this pull request as ready for review October 31, 2025 13:39
@akowalska622 akowalska622 requested a review from a team as a code owner October 31, 2025 13:39
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #74 / cases security and spaces enabled: trial Common analytics indexes backfill task should backfill the cases attachments index
  • [job] [logs] FTR Configs #31 / dashboard app - group 4 dashboard time dashboard with stored timed sets time on open
  • [job] [logs] FTR Configs #65 / discover - group 1 Discover CSV Export Generate CSV: new search generates a large export

Metrics [docs]

Async chunks

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

id before after diff
cloudSecurityPosture 638.1KB 638.2KB +137.0B
discover 1.2MB 1.2MB +137.0B
esql 582.4KB 582.6KB +137.0B
esqlDataGrid 148.6KB 148.8KB +137.0B
securitySolution 11.0MB 11.0MB +137.0B
slo 984.2KB 984.3KB +137.0B
total +822.0B

History

cc @akowalska622

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@akowalska622 akowalska622 merged commit b947916 into main Nov 11, 2025
12 checks passed
@akowalska622 akowalska622 deleted the discover-fix-one-line-truncation branch November 11, 2025 08:39
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 11, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 11, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 11, 2025
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1
9.2

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":"[email protected]"},"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 <[email protected]>
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":"[email protected]"},"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 <[email protected]>
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":"[email protected]"},"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 <[email protected]>
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.19.8 v9.1.7 v9.2.2 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover] Missing ellipsis in a data table with body cell lines set to 1

7 participants