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(progress-stepper): fix width and long words wrap #5077

Merged

Conversation

srambach
Copy link
Member

@srambach srambach commented Sep 6, 2022

Fixes #5024

This sets min-width:0 so that the steps will maintain even widths, and allows wrapping of long words without spaces.

Screen shots of all examples with long text for convenience:
image

@patternfly-build
Copy link

patternfly-build commented Sep 6, 2022

Comment on lines 128 to 129
--pf-c-progress-stepper--m-center__step-title--TextAlign: auto;
--pf-c-progress-stepper--m-center__step-description--TextAlign: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

since the progress stepper is beta, I don't know that we need to keep the vars for title and description assuming they aren't needed/not used. you could always leave the var in the declaration with the default, and just remove these at the top level component selector scope.

@@ -413,6 +419,7 @@ $pf-c-progress-stepper--breakpoint-map: build-breakpoint-map();
font-size: var(--pf-c-progress-stepper__step-description--FontSize);
color: var(--pf-c-progress-stepper__step-description--Color);
text-align: var(--pf-c-progress-stepper__step-description--TextAlign);
overflow-wrap: anywhere;
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need this? or could it inherit overflow-wrap from __main? also assuming break-word will work, but I think anywhere was only needed on the title because the button is finicky. Or we could update __main to use anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 overflow-wrap:anywhere seems to play nicely with soft breaks so I'm putting it on __main. I updated the screen shots and included a hyphen to show wrapping.

@srambach srambach requested a review from mcoker September 7, 2022 20:41
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

awesome! 🤩

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.

LGTM. We've used overflow-wrap: break-word; in our other components, but this seems to work just as well 👍

@mcoker mcoker merged commit b6fdfb5 into patternfly:main Sep 7, 2022
@patternfly-build
Copy link

🎉 This PR is included in version 4.214.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@srambach
Copy link
Member Author

srambach commented Sep 8, 2022

LGTM. We've used overflow-wrap: break-word; in our other components, but this seems to work just as well 👍

@mattnolting overflow-wrap: anywhere was needed in order for the helper text buttons to wrap.

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.

Progress stepper - long strings in title/description don't wrap
4 participants