-
Notifications
You must be signed in to change notification settings - Fork 1k
PageHeader allow title to wrap instead of overflow #6296
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'm wondering if we should always have a wrap. Is there ever a rationale to not break at all? Could we default to |
I having a hard time coming up with a rationale, and definitely not one that wouldn't be an edge case. If there were one, the caller would have
I would be okay with defaulting to |
This seems infrequent enough to me to not need to formalize it as a property.
I was envisioning comparing offset width and scroll width in some manner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for fixing the calendar one.
What does this PR do?
Closes #6295 by:
overflowWrap
prop to Heading which accepts any validoverflow-wrap
CSS.Also, for backwards compatibility, ensures Calendar Header overflows instead of wrapping which is its current behavior.
Where should the reviewer start?
Heading.js
What testing has been done on this PR?
Jest suite, Storybook, plus added snapshot test.
How should this be manually tested?
Lengthy word(s) within Heading and PageHeader.
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
#6295
Screenshots (if appropriate)
Do the grommet docs need to be updated?
No. Proposing the
overflowWrap
be internal only and undocumented for now unless others feel like it would be valuable to document.Should this PR be mentioned in the release notes?
Yes.
Is this change backwards compatible or is it a breaking change?
Backwards compatible.