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

Media Replace: Long media url is overlapping edit icon and cause potential horizontal scrollbar #59807

Closed
DamChtlv opened this issue Mar 13, 2024 · 7 comments
Labels
[Feature] Media Anything that impacts the experience of managing media [Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Comments

@DamChtlv
Copy link

Description

Issue

It's difficult to edit media url that are too long (because the url overlap the edit icon)

Code

It seems to be caused by:

.block-editor-link-control__search-item-title,
.block-editor-link-control__search-item-info {
max-width: 200px;
white-space: nowrap;
}

Fix

I propose as a fix to use text overflow ellipsis:

image

Step-by-step reproduction instructions

  1. Go in the editor (in any context: page edition, template edition...)
  2. Add any media block (ex: image, video...)
  3. Click on the media block
  4. Click on "Insert a url" inside this block
  5. Add a long url and save
  6. Click on the video block and click on "Replace" in the toolbar
  7. Edit link icon is overlapped by the media url, and it can also cause really long horizontal scroll

Screenshots, screen recording, code snippet

Screenshots

image
image

Environment info

WordPress version 6.4.3

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@DamChtlv DamChtlv added the [Type] Bug An existing feature does not function as intended label Mar 13, 2024
@DamChtlv
Copy link
Author

Added fix in PR: #59808

@t-hamano
Copy link
Contributor

Thanks for the report.

What URL did you enter? Normally, the URL should be shortened as shown below.

image

@t-hamano t-hamano added [Feature] Media Anything that impacts the experience of managing media [Status] Needs More Info Follow-up required in order to be actionable. labels Mar 13, 2024
@ramonjd
Copy link
Member

ramonjd commented Mar 14, 2024

Maybe it's been fixed since #57775 ?

@DamChtlv
Copy link
Author

@t-hamano I have used url without file extension at the end (some CDN or other services have that kind of urls)

@torounit
Copy link
Member

torounit commented Mar 22, 2024

@DamChtlv

I was able to reproduce this issue in WordPress 6.4.3, but it appears to have been fixed by #57775.

Tested URL: https://picsum.photos/id/870/200/300?grayscale&blur=2

Copy link

github-actions bot commented Apr 7, 2024

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Apr 7, 2024
@DamChtlv
Copy link
Author

DamChtlv commented Apr 18, 2024

Can confirm it has been fixed as of WP 6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants