department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
40 stars 61 forks source link

Modal text overflow #3355

Open ToddWebDev opened 2 weeks ago

ToddWebDev commented 2 weeks ago

Bug Report

What happened

When a 'va-modal' displays a long word (e.g. 30 characters or more) the text overflows and/or breaks the layout.

Screenshots

Image Image

What I expected to happen

Modal text to not overflow

Reproducing

Steps to reproduce:

  1. Go to va-modal in Storybook
  2. Replace any word in the modal with an extra long word

Urgency

How urgent is this request? Please select the appropriate option below and/or provide details

Details

This can be fixed with CSS.

caw310 commented 2 weeks ago

@ToddWebDev Is this a new issue? @Mottie just implemented a fix. https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues/2492

ToddWebDev commented 2 weeks ago

I think this is a separate issue. I can replicate the overflow issue with a long word on Storybook. It can be fixed with word-break: break-word; or similar css.

caw310 commented 1 week ago

Hey team! Please add your planning poker estimate with Zenhub @Andrew565 @ataker @harshil1793 @it-harrison @jamigibbs @micahchiang @powellkerry @rsmithadhoc

ToddWebDev commented 1 week ago

Just an implementation note that the word break should only apply to the modal header and modal body content. We do not want the words to break in the modal footer buttons. Since the buttons are flexbox children, it could lead to some awkward word breaking. Thank you.