-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Badge: Add max-width for text truncation #72653
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
|
Note that this issue is occurring in WP 6.9, so this pull request needs to be backported. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -45 B (0%) Total Size: 2.27 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 69c5205. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18775879352
|
tyxla
left a comment
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.
Looks like we missed the max-width when adding the wrapper.
Thanks for the fix @t-hamano 👍
|
@tyxla Thanks for the review! |
|
There was a conflict while trying to cherry-pick the commit to the wp/6.9 branch. Please resolve the conflict manually and create a PR to the wp/6.9 branch. PRs to wp/6.9 are similar to PRs to trunk, but you should base your PR on the wp/6.9 branch instead of trunk. |
Unfortunately, this is a common problem with component packages and dataviews packages. (Example of a similar error: #72656 (comment)) I will submit a backport PR later. |
* Badge: Add max-width for text truncation * Update changelog Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: juanfra <juanfra@git.wordpress.org>
* Badge: Add max-width for text truncation * Update changelog Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: juanfra <juanfra@git.wordpress.org>
|
This pull request was manually backported to the |
Fixes: #72651
Related: #72097
What?
I noticed that the text truncation of the Badge component doesn't work properly after #72097 is merged.
Why? How?
For text truncation to work correctly, we need to set the width not only on the inner wrapper element but also on the component itself. Otherwise, the text will not be able to reference the width that serves as the overflow threshold.
Testing Instructions
List View
Storybook
childrenprop and apply the "WP Sidebar" width.Screenshots or screencast
List View
Storybook