fix(admin): stop the users list clipping its role badges #419
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-421-admin-panel-clipping"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The identity cell in the admin users list put Tailwind's
truncateon the same element that was alsoflex:p class="font-medium truncate flex items-center gap-2".truncateexpands tooverflow:hidden+text-overflow:ellipsis+white-space:nowrap, but the ellipsis and nowrap parts do nothing on a flex container - they apply to inline text layout, not to flex items. So the email took its full max-content width, pushed the "Admin" / "Suspended" badges past the row's content box, and theoverflow:hiddenpainted none of them. The badge was in the DOM and completely invisible on screen, and the email itself was hard-clipped mid-glyph with no ellipsis. Reproduced in headless Chrome against the real rendered page: at 1024px and below the Admin badge overflowed the row by 195px and was clipped away entirely.Move
truncateonto aspanaround the text and give the rowmin-w-0so it can still shrink inside the grid cell. The email now ellipsises and the badges stay visible.The sessions list in the user dashboard had the identical shape (
This devicebadge behind a long user-agent string), so it gets the same treatment. A shared test-only helper,assert_no_truncating_flex_container, fails on any rendered class attribute carrying bothtruncateand a flex/grid display class, and both call sites are covered by a test that renders a row with an over-long label and asserts the badge survives. Reverting either markup change makes those tests fail.#BUNYIP-421