Skip to content

fix(toast): Prevent actions text from wrapping to multiple lines

Paul Gascou-Vaillancourt requested to merge toast-actions-nowrap into master

While working on https://gitlab.com/gitlab-org/gitlab-ee/issues/9102, which requires a toast message to be displayed with an Undo dismiss action, it appeared that an action's text might wrap to multiple lines when:

  • the action's text contains multiple words
  • the toast message is long enough for the toast to reach its max width
Current toast
Screen_Shot_2019-09-12_at_4.12.43_PM

To prevent this, white-space: nowrap; has been applied to toast actions, and a story has been added to demonstrate and test this fix.

Fixed toast
Screen_Shot_2019-09-12_at_4.16.51_PM
Edited by Paul Gascou-Vaillancourt

Merge request reports