helpscout / hsds-react

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

Fix long variable preview #1024

Closed plbabin closed 2 years ago

plbabin commented 2 years ago

Problem

When the variable preview is too long, it stays on the same line, making it impossible to read the fallback content

Fix

We remove the white-space:nowrap;and set a min-height. that way it can span on multiple line if needed. Not the prettiest render since it's an inline node within a paragraph, but we are shooting for usability here

CleanShot 2022-02-03 at 09 54 20@2x

Write to your heart's content, include:

Guidelines

Make sure the pull request:

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

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d995e7
Status: âœ…  Deploy successful!
Preview URL: https://95065468.hsds-react.pages.dev

View logs

jakubjanczyk commented 2 years ago

@plbabin I actually have a fix for that here: https://github.com/helpscout/hsds-react/pull/1023 :smile: (the solution has been agreed on with Alex)

plbabin commented 2 years ago

@plbabin I actually have a fix for that here: #1023 😄 (the solution has been agreed on with Alex)

that's perfect then 😃 , I'll close this PR