Skip to content

Provide sideModal prop to truncate differently in side modals#3037

Merged
david-crespo merged 7 commits intomainfrom
truncate_side_modal_properties_table
Feb 6, 2026
Merged

Provide sideModal prop to truncate differently in side modals#3037
david-crespo merged 7 commits intomainfrom
truncate_side_modal_properties_table

Conversation

@charliepark
Copy link
Contributor

@charliepark charliepark commented Feb 5, 2026

This adds a sideModal prop to the DescriptionRow that drops the truncation limit from 48 characters to 20, so we better handle the narrower context of a sideModal pane.

Broken:
image

Fixed:
Screenshot 2026-02-05 at 3 49 32 PM

Closes #3034

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Feb 6, 2026 1:28am

Request Review

@charliepark
Copy link
Contributor Author

charliepark commented Feb 6, 2026

20 Ms:
Screenshot 2026-02-05 at 4 44 43 PM
22 Ms:
Screenshot 2026-02-05 at 4 44 57 PM

A shorter cutoff for normal text isn't ideal, but I think it's better than losing cut-off content that overruns the boundary.
Screenshot 2026-02-05 at 4 51 13 PM
Though that does look pretty ugly.

@david-crespo
Copy link
Collaborator

Kind of a silly idea, not for this PR: instead of truncating by character, do a CSS truncate with ellipsis so it’s always truncating at the right length, and then use the length as a heuristic to decide whether to show the tooltip on hover. You get some false positives in that you get a tooltip on hover sometimes when you don’t need it, but you never truncate too early.

(All of this is moot if there’s a good way to measure the rendered length in JS.)

@david-crespo david-crespo enabled auto-merge (squash) February 6, 2026 00:54
@david-crespo david-crespo merged commit 986e6df into main Feb 6, 2026
11 of 12 checks passed
@david-crespo david-crespo deleted the truncate_side_modal_properties_table branch February 6, 2026 01:53
@benjaminleonard
Copy link
Contributor

Surprised there aren't more side modals with one of these in them.

In other places we're using the form inputs. I want to refactor this anyway. To be honest I'd expect this to be updatable as a user alongside name.

(All of this is moot if there’s a good way to measure the rendered length in JS.)

It gets pretty janky, at least last time I checked. Since you need the font statistics to measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve handling of long text in side modal table cells

3 participants