Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/pages/workspace/MemberRightIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import Badge from '@components/Badge';
import useLocalize from '@hooks/useLocalize';
import CONST from '@src/CONST';
Expand All @@ -8,9 +9,10 @@ type MemberRightIconProps = {
owner?: string;
role?: string;
login?: string;
badgeStyles?: StyleProp<ViewStyle>;
};

export default function MemberRightIcon({role, owner, login}: MemberRightIconProps) {
export default function MemberRightIcon({role, owner, login, badgeStyles}: MemberRightIconProps) {
const {translate} = useLocalize();

let badgeText: TranslationPaths | undefined;
Expand All @@ -22,7 +24,12 @@ export default function MemberRightIcon({role, owner, login}: MemberRightIconPro
badgeText = 'common.auditor';
}
if (badgeText) {
return <Badge text={translate(badgeText)} />;
return (
<Badge
text={translate(badgeText)}
badgeStyles={badgeStyles}

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.

shouldn't we define that style directly here?

styles.alignSelfEnd

that way, badges on all pages will be aligned

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.

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.

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.

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)

@situchan situchan Jan 13, 2026 •

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.

Sure, btw direct Badge (not MemberRightIcon) is used in DomainAdminsPage.

/>
);
}
return null;
}
2 changes: 2 additions & 0 deletions src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ function WorkspaceMembersPage({personalDetails, route, policy}: WorkspaceMembers
role={policyEmployee.role}
owner={policy?.owner}
login={details.login}
badgeStyles={[styles.alignSelfEnd]}
/>
</View>
</>
Expand Down Expand Up @@ -473,6 +474,7 @@ function WorkspaceMembersPage({personalDetails, route, policy}: WorkspaceMembers
styles.flex1,
styles.pr3,
styles.alignSelfStart,
styles.alignSelfEnd,
isControlPolicyWithWideLayout,
StyleUtils,
formatPhoneNumber,
Expand Down
Loading