Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Datatable: Do not apply truncation in value popover #132005

Merged
merged 6 commits into from
May 17, 2022

Conversation

flash1293
Copy link
Contributor

Fixes #131937

This PR makes sure the truncation mixin is only applied to the actual cell in the data grid, not the popover. This makes sure a value that's too large for the cell can be viewed in its entirety in the popover:

Before
Screenshot 2022-05-11 at 10 44 34

After
Screenshot 2022-05-11 at 10 44 17

@flash1293 flash1293 added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens backport:skip This commit does not require backporting v8.3.0 labels May 11, 2022
@flash1293 flash1293 marked this pull request as ready for review May 11, 2022 09:53
@flash1293 flash1293 requested a review from a team as a code owner May 11, 2022 09:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293 flash1293 added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label May 11, 2022
Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Thanks, @flash1293. Leaving one question below for your review.

@@ -2,7 +2,8 @@
height: 100%;
}

.lnsTableCell {
// only apply truncation inside of a table cell (not within popover)
[data-test-subj='dataGridRowCell'] .lnsTableCell {
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we shouldn't be using the data-test-subj attribute as a selector for styles. Would it be possible to apply a new class instead?

@flash1293
Copy link
Contributor Author

Thanks for the review @MichaelMarcialis , fixed

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Thanks for making that change, @flash1293.

Forgive me, but I have one follow-up question. I was under the impression that EuiDataGrid handled the truncation of data grid cell contents natively, and (to my knowledge) does not carry forward that truncation to the cell popovers. If that is true, why are we running with our own truncation implementation here rather than using the native data grid truncation?

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Contributor Author

@MichaelMarcialis AFAIK this is happening because we are breaking out of the default handling for the cell contents because a bunch of custom things are happening for the Lens table (alignment, coloring, ...):

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
lens 1.1MB 1.1MB +46.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:fix Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand button truncating text on Lens Table
5 participants