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(title): enabled long strings to wrap #2662

Merged
merged 1 commit into from Feb 7, 2020

Conversation

mcoker
Copy link
Contributor

@mcoker mcoker commented Feb 1, 2020

fixes #2661

@patternfly-build
Copy link

PatternFly-Next preview: https://patternfly-next-pr-2662.surge.sh

Copy link
Member

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

Seems to fix the problem in most of the cases but if the description has a long URL it will overflow. Maybe using "anywhere"?

@mcoker
Copy link
Contributor Author

mcoker commented Feb 4, 2020

@boaz0 can you give me an example? I tried this in both FF and chrome, doesn't overflow.

Screen Shot 2020-02-04 at 3 17 08 PM

@boaz0
Copy link
Member

boaz0 commented Feb 5, 2020

Uhh... you'e right! I forgot to mention that if it's inside a flex layout it doesn't work.

  <div style={{display: 'flex'}}>
  <Title headingLevel="h1" style={{overflowWrap: "break-word"}} size="4xl">
    SuperDuperlooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongTitle
  </Title>

image

@mcoker
Copy link
Contributor Author

mcoker commented Feb 5, 2020

@boaz0 ahh good find, that's due to a flex child's default min-width being the width of its contents. We can use word-break: break-word; there instead, which is similar and will allow the string to break in a flex child. Updated.

Copy link
Member

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

LPTM

Copy link
Member

@christiemolloy christiemolloy left a comment

Choose a reason for hiding this comment

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

lptm!!!

@christiemolloy christiemolloy merged commit d6e0211 into patternfly:master Feb 7, 2020
@redallen
Copy link
Contributor

redallen commented Feb 7, 2020

🎉 This PR is included in version 2.58.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

6 participants