Skip to content

Commit

Permalink
Merge pull request #42017 from Krishna2323/krishna2323/issue/41609
Browse files Browse the repository at this point in the history
fix: Workspace - RBR is aligned to top of WS bar.
  • Loading branch information
MonilBhavsar authored May 29, 2024
2 parents 361b21c + 04016a4 commit e5ec7be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/pages/workspace/WorkspacesListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ function WorkspacesListRow({
const isDeleted = style && Array.isArray(style) ? style.includes(styles.offlineFeedback.deleted) : false;

const ThreeDotMenuOrPendingIcon = (
<View style={[isNarrow && styles.mr5]}>
<View style={[styles.flexRow]}>
{isJoinRequestPending && (
<View style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, styles.flex1, styles.justifyContentEnd, !isNarrow && styles.pr4, isNarrow && styles.workspaceListBadge]}>
<View style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, styles.flex1, styles.justifyContentEnd, isNarrow && styles.workspaceListBadge]}>
<Badge
text={translate('workspace.common.requested')}
textStyles={styles.textStrong}
Expand All @@ -154,14 +154,11 @@ function WorkspacesListRow({
</View>
)}
{!isJoinRequestPending && (
<>
<View style={[styles.flexRow, styles.flex0, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<View style={[styles.flexRow, styles.ml2, styles.gap1, !isSmallScreenWidth && styles.workspaceThreeDotMenu]}>
<View style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, isNarrow && styles.workspaceListRBR]}>
<BrickRoadIndicatorIcon brickRoadIndicator={brickRoadIndicator} />
</View>
<View
ref={threeDotsMenuContainerRef}
style={[!isSmallScreenWidth && styles.workspaceThreeDotMenu]}
>
<View ref={threeDotsMenuContainerRef}>
<ThreeDotsMenu
onIconPress={() => {
if (isSmallScreenWidth) {
Expand All @@ -181,13 +178,13 @@ function WorkspacesListRow({
disabled={shouldDisableThreeDotsMenu}
/>
</View>
</>
</View>
)}
</View>
);

return (
<View style={[styles.flexRow, styles.highlightBG, rowStyles, style, isWide && styles.gap5, styles.br3, styles.pv5, styles.pl5]}>
<View style={[styles.flexRow, styles.highlightBG, rowStyles, style, isWide && styles.gap5, styles.br3, styles.p5]}>
<View style={[isWide ? styles.flexRow : styles.flexColumn, styles.flex1, isWide && styles.gap5]}>
<View style={[styles.flexRow, styles.justifyContentBetween, styles.flex1, isNarrow && styles.mb3, styles.alignItemsCenter]}>
<View style={[styles.flexRow, styles.gap3, styles.flex1, styles.alignItemsCenter]}>
Expand All @@ -209,7 +206,7 @@ function WorkspacesListRow({
</View>
{isSmallScreenWidth && ThreeDotMenuOrPendingIcon}
</View>
<View style={[styles.flexRow, isWide && styles.flex1, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<View style={[styles.flexRow, isWide && styles.flex1, styles.gap2, styles.alignItemsCenter]}>
{!!ownerDetails && (
<>
<Avatar
Expand All @@ -235,7 +232,7 @@ function WorkspacesListRow({
</>
)}
</View>
<View style={[styles.flexRow, isWide && styles.flex1, styles.gap2, isNarrow && styles.mr5, styles.alignItemsCenter]}>
<View style={[styles.flexRow, isWide && styles.flex1, styles.gap2, styles.alignItemsCenter]}>
<Icon
src={workspaceTypeIcon(workspaceType)}
width={variables.workspaceTypeIconWidth}
Expand Down
6 changes: 6 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3319,6 +3319,12 @@ const styles = (theme: ThemeColors) =>
marginTop: 6,
},

workspaceListRBR: {
flexDirection: 'column',
justifyContent: 'flex-start',
marginTop: 10,
},

peopleRow: {
width: '100%',
flexDirection: 'row',
Expand Down

0 comments on commit e5ec7be

Please sign in to comment.