Skip to content

[6.x] Stop the Set Alt badge covering asset filenames - #16171

Merged
jaygeorge merged 3 commits into
6.xfrom
16171-assets-row-alt-badge
Dec 3, 2026
Merged

jaygeorge merged 3 commits into
6.xfrom
16171-assets-row-alt-badge

Conversation

@jaygeorge

@jaygeorge jaygeorge commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description of the Problem

Closes #16168

In list view, the cell with the Set Alt badge, file size and remove button is positioned over the right of the row. In narrow assets fields (1/3, 1/4) it's wider than the space left, so it covers the filename, and with longer translations it covers the thumbnail too and gets cut off on the left. Even without a badge, its fade cuts filenames off mid-word.

image

What this PR Does

  • Lays the row out with flex, so the actions take their own space and the filename truncates with an ellipsis instead of being covered.
  • Puts the badge beside the filename, and wraps it underneath when the filename would get narrower than 96px. That depends on the content rather than a breakpoint, so long translations wrap earlier on their own.
  • Uses the small badge in fields under 320px, like grid view, and keeps the default size in wider fields.
  • Clips the badge label sideways only, so a very long translation truncates in a tiny field without cutting off the tops of the capitals (truncate does, because of the label's text-box trim).

This also drops the Safari position: relative workaround and the left-to-right fade, which only existed for the overlaid cell.

Before / After

image

How to Reproduce

  1. Add two assets fields set to list view at 1/4 width, with Show Set Alt on.
  2. Add an image without alt text and one with a long filename.
  3. On 6.x the actions cover the filenames; on this branch the filename truncates and the badge sits beside it, or under it when there isn't room.

- Lay the row out with flex, so the actions sit beside the filename instead of over it
- Put the badge beside the filename, wrapping below it when the filename would get too narrow
- Use the small badge in narrow fields, like grid view
- Clip the badge label sideways only, so long translations truncate without cutting off capitals
@jaygeorge jaygeorge changed the title [6.x] Stop the Set Alt badge covering filenames in narrow asset fields [6.x] Stop the Set Alt badge covering asset filenames Dec 3, 2026
@jaygeorge
jaygeorge merged commit 927258e into 6.x Dec 3, 2026
66 checks passed
@jaygeorge
jaygeorge deleted the 16171-assets-row-alt-badge branch December 3, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assets fieldtype: "Set Alt" badge covers the file in narrow list view

1 participant