about summary refs log tree commit diff
path: root/src/view/com/composer/Composer.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-10-05 22:42:52 -0700
committerGitHub <noreply@github.com>2024-10-06 14:42:52 +0900
commitb52f8ced56476163ed07edeed2a416cc02aa2b48 (patch)
tree8d0b028b258e9ee949c85758c05107563548f3e7 /src/view/com/composer/Composer.tsx
parent25e3c93e1e9f5ab84d56ccbab7d63be219a590ac (diff)
downloadvoidsky-b52f8ced56476163ed07edeed2a416cc02aa2b48.tar.zst
Fix composer char progress layout (#5620)
* fix composer

* more fixes
Diffstat (limited to 'src/view/com/composer/Composer.tsx')
-rw-r--r--src/view/com/composer/Composer.tsx98
1 files changed, 50 insertions, 48 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index e03c64a42..94c02767e 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -867,48 +867,59 @@ export const ComposePost = ({
           )}
           <View
             style={[
+              a.flex_row,
+              a.py_xs,
+              {paddingLeft: 7, paddingRight: 16},
+              a.align_center,
+              a.border_t,
               t.atoms.bg,
               t.atoms.border_contrast_medium,
-              styles.bottomBar,
+              a.justify_between,
             ]}>
-            {videoState.status !== 'idle' && videoState.status !== 'done' ? (
-              <VideoUploadToolbar state={videoState} />
-            ) : (
-              <ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
-                <SelectPhotoBtn
-                  size={images.length}
-                  disabled={!canSelectImages}
-                  onAdd={onImageAdd}
-                />
-                <SelectVideoBtn
-                  onSelectVideo={selectVideo}
-                  disabled={!canSelectImages || images?.length > 0}
-                  setError={setError}
-                />
-                <OpenCameraBtn disabled={!canSelectImages} onAdd={onImageAdd} />
-                <SelectGifBtn
-                  onClose={focusTextInput}
-                  onSelectGif={onSelectGif}
-                  disabled={hasMedia}
-                  Portal={Portal.Portal}
-                />
-                {!isMobile ? (
-                  <Button
-                    onPress={onEmojiButtonPress}
-                    style={a.p_sm}
-                    label={_(msg`Open emoji picker`)}
-                    accessibilityHint={_(msg`Open emoji picker`)}
-                    variant="ghost"
-                    shape="round"
-                    color="primary">
-                    <EmojiSmile size="lg" />
-                  </Button>
-                ) : null}
-              </ToolbarWrapper>
-            )}
-            <View style={a.flex_1} />
-            <SelectLangBtn />
-            <CharProgress count={graphemeLength} />
+            <View style={[a.flex_row, a.align_center]}>
+              {videoState.status !== 'idle' && videoState.status !== 'done' ? (
+                <VideoUploadToolbar state={videoState} />
+              ) : (
+                <ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
+                  <SelectPhotoBtn
+                    size={images.length}
+                    disabled={!canSelectImages}
+                    onAdd={onImageAdd}
+                  />
+                  <SelectVideoBtn
+                    onSelectVideo={selectVideo}
+                    disabled={!canSelectImages || images?.length > 0}
+                    setError={setError}
+                  />
+                  <OpenCameraBtn
+                    disabled={!canSelectImages}
+                    onAdd={onImageAdd}
+                  />
+                  <SelectGifBtn
+                    onClose={focusTextInput}
+                    onSelectGif={onSelectGif}
+                    disabled={hasMedia}
+                    Portal={Portal.Portal}
+                  />
+                  {!isMobile ? (
+                    <Button
+                      onPress={onEmojiButtonPress}
+                      style={a.p_sm}
+                      label={_(msg`Open emoji picker`)}
+                      accessibilityHint={_(msg`Open emoji picker`)}
+                      variant="ghost"
+                      shape="round"
+                      color="primary">
+                      <EmojiSmile size="lg" />
+                    </Button>
+                  ) : null}
+                </ToolbarWrapper>
+              )}
+            </View>
+            <View style={[a.flex_row, a.align_center, a.justify_between]}>
+              <SelectLangBtn />
+              <CharProgress count={graphemeLength} style={{width: 65}} />
+            </View>
           </View>
         </View>
         <Prompt.Basic
@@ -1128,15 +1139,6 @@ const styles = StyleSheet.create({
     marginHorizontal: 10,
     marginBottom: 4,
   },
-  bottomBar: {
-    flexDirection: 'row',
-    paddingVertical: 4,
-    // should be 8 but due to visual alignment we have to fudge it
-    paddingLeft: 7,
-    paddingRight: 16,
-    alignItems: 'center',
-    borderTopWidth: StyleSheet.hairlineWidth,
-  },
 })
 
 function ErrorBanner({