Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrapping on long words indropdowns (SDS-4649) #451 #452

Merged
merged 1 commit into from
Dec 13, 2019
Merged

Conversation

bernhard-adobe
Copy link
Contributor

@bernhard-adobe bernhard-adobe commented Dec 13, 2019

adding word-break: break-all; to dropdown label.

Description

In order to break "unbreakable words" like German connected nouns or urls / paths we need to allow break-all for words.

Fixes #451 (SDS-4649).

How and where has this been tested?

  • How this was tested: go to http://localhost:3000/docs/dropdown.html and inspect the dropdown label
  • Browser(s) and OS(s) this was tested with: Google Chrome Canary Version 81.0.3993.0 (Official Build) canary (64-bit) on macOS Mojave 0.14.5 (18F203)

Screenshots

Before:

Screen Shot 2019-12-13 at 23 15 45

After:
Screen Shot 2019-12-13 at 23 19 48

To-do list

  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • This pull request is ready to merge.

Copy link
Member

@lazd lazd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy peasy lemon squeezy.

@lazd lazd merged commit 8bb2d5b into master Dec 13, 2019
@bernhard-adobe bernhard-adobe deleted the SDS-4649 branch December 13, 2019 22:35
@dannify
Copy link
Member

dannify commented Jan 17, 2020

I don't think this is the solution we should employ. We still want it to keep whole words that fit on the line and only break if there is overflow.
So probably overflow-wrap: break-word instead of using break-word?
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
It should be tested with a string that has long words and other words with spaces in it.
The fox jumpedsdfjhsfiuhsgfilubsliubwrfliuwbfliubfiusbvoiwsdjvhbskfhubvsdkufvlsudhfvsduhv over the lazy dog.

Here is an example of the problem (it cuts off 2 letters for the word "that")
image

@dannify
Copy link
Member

dannify commented Jan 17, 2020

@lazd @bernhard-adobe ^

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.

Long words in Dropdown menu do not wrap
3 participants