From 115041f4bfa537579deb4b8aa92ddb200de4d48e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 17 May 2024 20:17:59 +0100 Subject: [🐴] Reduce header size (#4078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make text input container smaller * make header much smaller * improve web styling --- src/screens/Messages/Conversation/index.tsx | 85 ++++++++++++++++------------- 1 file changed, 48 insertions(+), 37 deletions(-) (limited to 'src/screens/Messages/Conversation/index.tsx') diff --git a/src/screens/Messages/Conversation/index.tsx b/src/screens/Messages/Conversation/index.tsx index 3ab00bca1..2c42ed16d 100644 --- a/src/screens/Messages/Conversation/index.tsx +++ b/src/screens/Messages/Conversation/index.tsx @@ -7,6 +7,7 @@ import {useLingui} from '@lingui/react' import {useFocusEffect, useNavigation} from '@react-navigation/native' import {NativeStackScreenProps} from '@react-navigation/native-stack' +import {makeProfileLink} from '#/lib/routes/links' import {CommonNavigatorParams, NavigationProp} from '#/lib/routes/types' import {useGate} from '#/lib/statsig/statsig' import {useProfileShadow} from '#/state/cache/profile-shadow' @@ -22,9 +23,10 @@ import {useSetMinimalShellMode} from 'state/shell' import {PreviewableUserAvatar} from 'view/com/util/UserAvatar' import {CenteredView} from 'view/com/util/Views' import {MessagesList} from '#/screens/Messages/Conversation/MessagesList' -import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' import {ConvoMenu} from '#/components/dms/ConvoMenu' import {Error} from '#/components/Error' +import {Link} from '#/components/Link' import {ListMaybePlaceholder} from '#/components/Lists' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' @@ -130,6 +132,8 @@ function Inner() { ) } +const PFP_SIZE = isWeb ? 40 : 34 + let Header = ({ profile: initialProfile, }: { @@ -157,14 +161,13 @@ let Header = ({ t.atoms.border_contrast_low, a.border_b, a.flex_row, - a.justify_between, - a.align_start, - a.gap_lg, - a.pl_xl, + a.align_center, + a.gap_sm, + gtTablet ? a.pl_lg : a.pl_xl, a.pr_lg, - a.py_md, + a.py_sm, ]}> - {!gtTablet ? ( + {!gtTablet && ( - ) : ( - )} {profile && moderationOpts ? ( ) : ( <> - + - - + + + + @@ -248,26 +251,34 @@ function HeaderReady({ return ( <> - - - + + + {displayName} {!isDeletedAccount && ( - + @{profile.handle} )} - + {isConvoActive(convoState) && (