-
Notifications
You must be signed in to change notification settings - Fork 4.5k
MediaReplaceFlow: Correctly truncate long URL #71062
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
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: 1.91 MB
ℹ️ View Unchanged
|
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.
Thanks for catching this, @t-hamano!
The fix works as expected ✅
@Mamaduka thanks for the review! |
Fixes #59807
Follow-up #57775
What?
Truncates a long media URL in the
MediaReplaceFlow
component.Why?
This URL is expected to be truncated by the
Truncate
component, but I noticed that the three dots were not displayed, and the buttons were pushed slightly to the right.How?
It seems that the
white-space: nowrap
style of the parent element was affecting it, so I removed it. Furthermore,max-width
should also be unnecessary. The innerTruncate
component should properly process text for both elements by default:gutenberg/packages/block-editor/src/components/link-control/link-preview.js
Lines 132 to 146 in 8470c8b
These two CSS elements should probably have been removed when the
Truncate
component was added in #57775.Testing Instructions
Use the following HTML to check the URL without an extension to be truncated correctly:
Screenshots or screencast
Before
After