Skip to content

Commit

Permalink
Merge pull request #40599 from dragnoir/40524-fix
Browse files Browse the repository at this point in the history
[CP Staging] Fix: align badge in workspace list

(cherry picked from commit 0f30b3d)
  • Loading branch information
mountiny authored and OSBotify committed Apr 22, 2024
1 parent afbacfd commit b3a2817
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspacesListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function WorkspacesListPage({policies, reimbursementAccount, reports, session}:
{translate('workspace.common.workspaceType')}
</Text>
</View>
<View style={[styles.ml10, styles.mr2]} />
<View style={[styles.workspaceRightColumn, styles.mr2]} />
</View>
);
}, [isLessThanMediumScreen, styles, translate]);
Expand Down
11 changes: 8 additions & 3 deletions src/pages/workspace/WorkspacesListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function WorkspacesListRow({
</>
)}
</View>
<View style={[styles.flexRow, isWide && !isJoinRequestPending && styles.flex1, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<View style={[styles.flexRow, isWide && styles.flex1, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<Icon
src={workspaceTypeIcon(workspaceType)}
width={variables.workspaceTypeIconWidth}
Expand All @@ -206,7 +206,9 @@ function WorkspacesListRow({
</View>
<View style={[isNarrow && styles.mr5]}>
{isJoinRequestPending && (
<View style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, styles.flex1, styles.justifyContentEnd, styles.mln6, styles.pr4]}>
<View
style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, styles.flex1, styles.justifyContentEnd, !isNarrow && styles.pr4, isNarrow && styles.workspaceListBadge]}
>
<Badge
text={translate('workspace.common.requested')}
textStyles={styles.textStrong}
Expand All @@ -220,7 +222,10 @@ function WorkspacesListRow({
<View style={[styles.flexRow, styles.flex0, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<BrickRoadIndicatorIcon brickRoadIndicator={brickRoadIndicator} />
</View>
<View ref={threeDotsMenuContainerRef}>
<View
ref={threeDotsMenuContainerRef}
style={[styles.workspaceThreeDotMenu]}
>
<ThreeDotsMenu
onIconPress={() => {
if (isSmallScreenWidth) {
Expand Down
14 changes: 14 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,20 @@ const styles = (theme: ThemeColors) =>
marginLeft: 3,
},

workspaceRightColumn: {
marginLeft: 124,
},

workspaceThreeDotMenu: {
marginLeft: 84,
},

workspaceListBadge: {
flexDirection: 'column',
justifyContent: 'flex-start',
marginTop: 6,
},

autoGrowHeightMultilineInput: {
maxHeight: 115,
},
Expand Down

0 comments on commit b3a2817

Please sign in to comment.