From dea8b7458034fe52bfaa68b380edc57238853420 Mon Sep 17 00:00:00 2001 From: gitstart Date: Tue, 18 Jul 2023 07:05:57 +0000 Subject: [PATCH 1/4] fix hidden parts on modal --- src/view/shell/Composer.web.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx index 1f458472..f178df9a 100644 --- a/src/view/shell/Composer.web.tsx +++ b/src/view/shell/Composer.web.tsx @@ -64,5 +64,6 @@ const styles = StyleSheet.create({ borderRadius: isMobileWeb ? 0 : 8, marginBottom: '10vh', borderWidth: 1, + maxHeight: '85%', }, }) From 17deaaa7e71f33f82383182b47a076b8ba1a75fc Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 18 Jul 2023 15:15:02 -0500 Subject: [PATCH 2/4] use calc --- src/view/shell/Composer.web.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx index f178df9a..9b0033fe 100644 --- a/src/view/shell/Composer.web.tsx +++ b/src/view/shell/Composer.web.tsx @@ -62,8 +62,8 @@ const styles = StyleSheet.create({ paddingVertical: 0, paddingHorizontal: 2, borderRadius: isMobileWeb ? 0 : 8, - marginBottom: '10vh', + marginBottom: isMobileWeb ? '61px' : 0, borderWidth: 1, - maxHeight: '85%', + maxHeight: isMobileWeb ? 'calc(100% - 61px)' : 'calc(100% - (40px * 2))', }, }) From 1ca5792165fc690541ada3a74b42f4e64ff84da7 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 18 Jul 2023 15:18:56 -0500 Subject: [PATCH 3/4] create explicit relationship between values --- src/view/shell/Composer.web.tsx | 5 +++-- src/view/shell/bottom-bar/BottomBarStyles.tsx | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx index 9b0033fe..d1a84c8d 100644 --- a/src/view/shell/Composer.web.tsx +++ b/src/view/shell/Composer.web.tsx @@ -5,6 +5,7 @@ import {ComposePost} from '../com/composer/Composer' import {ComposerOpts} from 'state/models/ui/shell' import {usePalette} from 'lib/hooks/usePalette' import {isMobileWeb} from 'platform/detection' +import {BOTTOM_BAR_HEIGHT} from 'view/shell/bottom-bar/BottomBarStyles' export const Composer = observer( ({ @@ -62,8 +63,8 @@ const styles = StyleSheet.create({ paddingVertical: 0, paddingHorizontal: 2, borderRadius: isMobileWeb ? 0 : 8, - marginBottom: isMobileWeb ? '61px' : 0, + marginBottom: isMobileWeb ? BOTTOM_BAR_HEIGHT : 0, borderWidth: 1, - maxHeight: isMobileWeb ? 'calc(100% - 61px)' : 'calc(100% - (40px * 2))', + maxHeight: isMobileWeb ? `calc(100% - ${BOTTOM_BAR_HEIGHT}px)` : 'calc(100% - (40px * 2))', }, }) diff --git a/src/view/shell/bottom-bar/BottomBarStyles.tsx b/src/view/shell/bottom-bar/BottomBarStyles.tsx index f31ab44c..91d285e4 100644 --- a/src/view/shell/bottom-bar/BottomBarStyles.tsx +++ b/src/view/shell/bottom-bar/BottomBarStyles.tsx @@ -1,8 +1,11 @@ import {StyleSheet} from 'react-native' import {colors} from 'lib/styles' +export const BOTTOM_BAR_HEIGHT = 61 + export const styles = StyleSheet.create({ bottomBar: { + height: BOTTOM_BAR_HEIGHT, position: 'absolute', bottom: 0, left: 0, From 9ef54814f08a7a5ee840a8016c7dc37e9e96fb97 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 18 Jul 2023 15:26:04 -0500 Subject: [PATCH 4/4] fix lint --- src/view/shell/Composer.web.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx index d1a84c8d..7eb16290 100644 --- a/src/view/shell/Composer.web.tsx +++ b/src/view/shell/Composer.web.tsx @@ -65,6 +65,8 @@ const styles = StyleSheet.create({ borderRadius: isMobileWeb ? 0 : 8, marginBottom: isMobileWeb ? BOTTOM_BAR_HEIGHT : 0, borderWidth: 1, - maxHeight: isMobileWeb ? `calc(100% - ${BOTTOM_BAR_HEIGHT}px)` : 'calc(100% - (40px * 2))', + maxHeight: isMobileWeb + ? `calc(100% - ${BOTTOM_BAR_HEIGHT}px)` + : 'calc(100% - (40px * 2))', }, })