Skip to content

Fix product cards overlapping in My Products view#514

Open
DhruvN102 wants to merge 5 commits into
a11yhood:mainfrom
DhruvN102:fix/my-products-card-overlap
Open

Fix product cards overlapping in My Products view#514
DhruvN102 wants to merge 5 commits into
a11yhood:mainfrom
DhruvN102:fix/my-products-card-overlap

Conversation

@DhruvN102

Copy link
Copy Markdown

What does this PR do?
Fixes overlapping badges (e.g. "Tool", "Archive.Org") on product cards in the "My Products" section of the profile page.

Why?
Closes #500. Without min-w-0 on the title/description block, an unbreakable long title could push the row past the card's boundary which spills badges onto the next card.

The title/description block in each My Products card lacked min-w-0,
so long product names could push the flex row wider than the card,
letting the type/source badges spill past the card's own boundary and
overlap neighboring cards in the grid. Add min-w-0 + break-words to
the title block and shrink-0 to the badge container so content wraps
within its own card instead of overflowing.

Closes a11yhood#500
The title/description block in each My Products card lacked min-w-0,
so a title with no spaces to wrap on could push the flex row wider
than the card and spill past its own boundary into the neighboring
card. Add min-w-0 + break-words to the title block so it wraps
within its own card instead of overflowing.

Verified against real rendered output at multiple widths: normal
multi-word titles wrap identically before/after (no regression), and
a title with no spaces (matching the a11yhood#302 pattern) now wraps inside
its card instead of overflowing.

Closes a11yhood#500

@jmankoff jmankoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I noticed that if there is no space between words, the old problem still happens. I think that would be appropriate to address in this PR as well.

@DhruvN102

Copy link
Copy Markdown
Author

This is great! I noticed that if there is no space between words, the old problem still happens. I think that would be appropriate to address in this PR as well.

I pushed a fix for a title case with no spaces by switching to overflow-wrap: anywhere instead of break-word. Could you please let me know if everything looks good?

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.

Product cards overlap in "My Products" view

3 participants