Fix: Badge Alignment on workspace members page#79491
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
| role={policyEmployee.role} | ||
| owner={policy?.owner} | ||
| login={details.login} | ||
| badgeStyles={[styles.alignSelfEnd]} |
There was a problem hiding this comment.
Oh yeah, after rechecking, I don’t think we need to pass the badgeStyles prop here. The component is rendered directly without a wrapping View, so it already aligns to the right in the narrow layout
PR updated
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb Chrome |
| return ( | ||
| <Badge | ||
| text={translate(badgeText)} | ||
| badgeStyles={badgeStyles} |
There was a problem hiding this comment.
shouldn't we define that style directly here?
styles.alignSelfEnd
that way, badges on all pages will be aligned
There was a problem hiding this comment.
That's ok too but need to test all affected pages.
Wanted to limit the scope of fix as issue happens only in one place.
There was a problem hiding this comment.
It also happened on the DomainAdminsPage with the Primary contact badge (there are no other badges there but Jon noticed that the distance from the right icon is different from the workspace members page)
(both solutions are fine for me, we can set the style manually on the admins page too)
There was a problem hiding this comment.
Sure, btw direct Badge (not MemberRightIcon) is used in DomainAdminsPage.
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.3-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.3.3-8 🚀
|



Explanation of Change
Add a
badgeStylesprop toMemberRightIconand passstyles.alignSelfEndfromWorkspaceMembersPageto override the defaultalignSelfCenteron workspace members pageFixed Issues
$ #79341
PROPOSAL: #79341 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari