Opened 10 months ago
Last modified 7 months ago
#59939 new defect (bug)
Media: "Copy URL" tooltip text may wrap
Reported by: | wildworks | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
In the media list view, clicking the "hoge" action link displays the tooltip text "Copied!".
In certain languages, perhaps non-Latin languages, this text may wrap.
Text wrapping looks unnatural. To use an English analogy, imagine that the text wraps like this:
Co pied!
This text will be very short in any language, so you might want to apply white-space: nowrap
.
Attachments (15)
Change History (21)
#1
@
10 months ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Version changed from trunk to 5.5
#2
@
9 months ago
I searched the entire code with Copied!
and took screenshots of all copy actions.
In each image, I compare how it looks in English and Japanese. Here's what I noticed in the screenshot:
- Attachment Details Dialog: That's not a problem, as the text wraps properly.
- Edit Media Sidebar: Text doesn't wrap, so it may look cramped in some languages.
- Media Library (List View): Tooltip text wraps unnaturally in Japanese
- Upload New Media: In mobile viewport, wrapped text overlaps in Japanese.
- Policy Guide Tab in the Privacy Page: Although there is no space between the copy text and the button on mobile, the text does not wrap unnaturally.
- Info Tab in the Site Health Page: Text doesn't wrap, so it may look cramped in some languages.
#3
@
9 months ago
I think multiple patches are needed to resolve all of these issues.
In my opinion, the problem can be solved by applying white-space: nowrap;
for tooltips, and by applying grid layout and flex-wrap: wrap;
for other problems.
#4
@
7 months ago
I have attached a patch to this ticket to fix the issue with tooltips. This patch applies white-space: nowrap
to the tooltip, but another approach is to use word-break: keep-all. However, WordPress core does not use "word-break: keep-all" at all, so I avoided this approach.
#6
@
7 months ago
Thanks for adding patch @wildworks I tested your patch patch.diff
Screenshots
Before Apply Patch | After Apply Patch ✅ |
Text wrapping varies by language