helpscout / hsds-react

Help Scout Design System (HSDS) — React Component Library
MIT License
86 stars 17 forks source link

Show ellipsis for long Message variable values #1023

Closed jakubjanczyk closed 2 years ago

jakubjanczyk commented 2 years ago

Problem/Feature

There was an issue with long variable value inserted into MessageCard - it was going out of the right edge of a card, like here:

Screenshot 2022-01-28 at 20 17 32

The solution is to limit the width of the variable pill to up to 50% of the available width within a card and to show ellipsis is there are more characters than displayed: Screenshot from 2022-02-03 12-46-44

Use MessageCard -> With variables story to see example

Guidelines

Make sure the pull request:

cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5f2a31
Status: ✅  Deploy successful!
Preview URL: https://c3df296f.hsds-react.pages.dev

View logs