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
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]}>

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.

This is not really the culprit PR of #44639.
However if we don't add limit width here and with the flex1 style of Badge wrapper View, it will cause #44639.
More detail in this proposal RCA:
#44639 (comment)

{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 @@ -234,7 +231,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 @@ -3317,6 +3317,12 @@ const styles = (theme: ThemeColors) =>
marginTop: 6,
},

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

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