Skip to content

fix: truncate long usernames on map user cards#4629

Merged
mariojsnunes merged 5 commits intoONEARMY:masterfrom
GMetaxakis:fix/map-username-overflow
Mar 1, 2026
Merged

fix: truncate long usernames on map user cards#4629
mariojsnunes merged 5 commits intoONEARMY:masterfrom
GMetaxakis:fix/map-username-overflow

Conversation

@GMetaxakis
Copy link
Copy Markdown
Contributor

PR Checklist

  • - Unit and/or e2e tests for the changes that have been added (for bug fixes / features)

CSS-only fix (adding minWidth: 0 and flexShrink: 0 to existing flex containers). Existing tests pass. Verified visually.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring (no functional changes)
  • Documentation
  • Other:

What is the new behavior?

Long usernames on map user cards are now properly truncated with ... and the PRO badge always remains visible.

The <Text> element already had text-overflow: ellipsis but flex parent containers had the default min-width: auto, preventing them from shrinking below content size. Fixed by:

  • Adding minWidth: 0 to the Username flex container and its InternalLink wrapper
  • Adding minWidth: 0 to CardDetailsMemberProfile and CardDetailsSpaceProfile parent containers
  • Adding flexShrink: 0 to UserBadge so badge icons are never compressed

Does this PR introduce a DB Schema Change or Migration?

  • Yes
  • No

Git Issues

Closes #4598

Long usernames overflow the card and hide the PRO badge. The Text
element already had text-overflow: ellipsis but flex parents prevented
shrinking due to the default min-width: auto.

- Add minWidth: 0 to Username flex container and InternalLink wrapper
- Add minWidth: 0 to CardDetailsMemberProfile and CardDetailsSpaceProfile
- Add flexShrink: 0 to UserBadge so badges are never compressed
@cypress
Copy link
Copy Markdown

cypress Bot commented Feb 27, 2026

onearmy-community-platform    Run #8707

Run Properties:  status check passed Passed #8707  •  git commit 7106f2ec66: Merge branch 'master' into fix/map-username-overflow
Project onearmy-community-platform
Branch Review pull/4629
Run status status check passed Passed #8707
Run duration 06m 30s
Commit git commit 7106f2ec66: Merge branch 'master' into fix/map-username-overflow
Committer Mário Nunes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 88
View all changes introduced in this branch ↗︎

@benfurber benfurber added the Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview label Feb 28, 2026
@mariojsnunes mariojsnunes merged commit ff4c7d1 into ONEARMY:master Mar 1, 2026
10 checks passed
@mariojsnunes
Copy link
Copy Markdown
Contributor

@all-contributors add @GMetaxakis for code

@allcontributors
Copy link
Copy Markdown
Contributor

@mariojsnunes

I've put up a pull request to add @GMetaxakis! 🎉

@GMetaxakis GMetaxakis deleted the fix/map-username-overflow branch March 1, 2026 17:54
@dalibormrska
Copy link
Copy Markdown
Member

@GMetaxakis Legend! Thank you! 🎊

@onearmy-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.113.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[bug] Usernames on user cards in Map module are overflowing

5 participants