Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid awkward overlaps of group cards with lots of members, long project names, and small cards #7915

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Aug 19, 2024

This PR updates the styling of the group cards to better handle edge cases where you have a lot of assigned projects, long project names, lots of members, etc.

In particular, it does the following things:

  • aligns the avatars along the bottom of the card, so that even if there's a lot of projects, the avatars stay close to the bottom edge
  • adds word breaks for the project names, so that long names can break when they need to
  • adds some spacing between the two columns in the bottom row, so that even when you they get close, they never quite touch.

Note: there is one more thing I'd like to address in a follow up: as shown in the top row of the after image, there's some extra wrapping of the first "This group has no users", even though it has the room to grow. I'll keep looking into this and make a follow-up.

Before:
image

After:

image

Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 0:56am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 0:56am

Copy link
Contributor

github-actions bot commented Aug 19, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@thomasheartman thomasheartman changed the title [wip] fix: add placeholder comment fix: avoid awkward overlaps of group cards with lots of members, long project names, and small cards Aug 19, 2024
@@ -85,6 +87,10 @@ const InfoBadgeDescription = styled('span')(({ theme }) => ({
fontSize: theme.fontSizes.smallBody,
}));

const ProjectNameBadge = styled(Badge)({
wordwrap: 'anywhere',
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't seen this anywhere else in our codebase. How would it work with 'break-word'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like styled has some issues with the word-wrap property (wordWrap would render correctly as word-wrap, but linter told me the property was invalid; wordwrap was accepted by the linter, but rendered as wordwrap so it didn't work), so I'll go with word-break: break-word instead.

@kwasniew kwasniew self-requested a review August 19, 2024 12:13
@thomasheartman thomasheartman enabled auto-merge (squash) August 19, 2024 12:54
@thomasheartman thomasheartman merged commit cf3379d into main Aug 19, 2024
8 of 11 checks passed
@thomasheartman thomasheartman deleted the fix/1-2635-group-card-avatars-cover-up-project-names-when-names-are branch August 19, 2024 12:58
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.

2 participants