Opened 4 years ago
Closed 4 years ago
#52184 closed defect (bug) (fixed)
Generalize the use of CSS hyphenation on WP Admin list tables
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch has-screenshots commit |
Focuses: | ui, css | Cc: |
Description
In #50838, we fixed some WP Admin list table headings issue by adding hyphens: auto
to .fixed .column-posts
CSS selector. It fixed the issue pretty well, but only for <th>
cells. However, this is also needed for all table cells.
Use case: In WP 5.6, the French translation team made some translation changes to user roles so I think it would be nice to use the same CSS rule for all cells (th
, td
) of all WordPress Admin Tables.
For reference, see: #50838
Attachments (4)
Change History (13)
#1
@
4 years ago
- Keywords has-patch added
Here is a diff patch proposal for this ticket.
The auto hyphenation apply to all WP admin list tables (users, posts, pages, plugins, comments...).
#2
@
4 years ago
- Keywords commit has-screenshots added
Thanks @Chaton666, just tested your patch: it applies cleanly and fixes the issue. I wasn't sure about using a universal selector *
, but it looks like it doesn't introduce any bad behavior. Since it only adds a correct hyphenation to all texts, I think it's safe to use it here.
Marking this for commit
.
#3
@
4 years ago
In the Swedish locale at least I have started to use ­
for longer words in places where I know the space is to narrow for a long word. With it I can control where the hyphenation happens, a CSS-solutions breaks the word at random.
E.g. Permalänks­inställningar
(Permalink settings). The heading looks ok on the page, and the Help tab handle is hyphenated due to narrow space.
I think that the approach with CSS could be used in combination with the use of ­
and ​
for even better hyphenation. :-)
#4
@
4 years ago
Thanks @kebbet for this idea :-).
We can try to use ­
too in the French locale. We will discuss it.
Although I'm afraid it may be a bit complicated to use and understand for "non-technical" people.
#5
@
4 years ago
Thanks @kebbet for this feedback.
Indeed, it should be used in coordination with correct hyphenation CSS rules :)
#6
@
4 years ago
Looking at french-users-admin-table-using-proper-hyphenation.png it's not quite clear whether the hyphen is a part of the email address or not, which makes me think this might not be appropriate for all columns, as we don't know in advance what kind of data would be presented there.
If the current issue is about longer translations in the Role column, I would prefer to limit this to just that column for now, pretty much like [49317] / #50838 was limited to the Posts column. If we do need to expand this in the future, let's do that on a case-by-case basis as necessary.
See 52184.2.diff.
#7
@
4 years ago
- Keywords needs-refresh added; commit removed
Reading your comment I agree with you that is probably better to handle that on a case-by-case basis @SergeyBiryukov. The email column is a good example. Let's start with the role column, then 👍
Removing commit
keyword and marking this as needs-refresh
.
showing issues with long words