From e4048d63aebfb933e6a74a960b53d3b68a46ecdf Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Wed, 20 Dec 2023 14:50:15 +0100 Subject: [PATCH 1/2] Remove borderRadius from LHP --- src/styles/index.ts | 20 ++++++++++---------- src/styles/variables.ts | 2 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/styles/index.ts b/src/styles/index.ts index aececf93beb9..fcc78779136d 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -122,6 +122,13 @@ const headlineFont = { fontWeight: '500', } satisfies TextStyle; +const modalNavigatorContainer = (isSmallScreenWidth: boolean) => + ({ + position: 'absolute', + width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, + height: '100%', + } satisfies ViewStyle); + const webViewStyles = (theme: ThemeColors) => ({ // As of react-native-render-html v6, don't declare distinct styles for @@ -1406,21 +1413,14 @@ const styles = (theme: ThemeColors) => LHPNavigatorContainer: (isSmallScreenWidth: boolean) => ({ - width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, - position: 'absolute', + ...modalNavigatorContainer(isSmallScreenWidth), left: 0, - height: '100%', - borderTopRightRadius: isSmallScreenWidth ? 0 : variables.lhpBorderRadius, - borderBottomRightRadius: isSmallScreenWidth ? 0 : variables.lhpBorderRadius, - overflow: 'hidden', } satisfies ViewStyle), RHPNavigatorContainer: (isSmallScreenWidth: boolean) => ({ - width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, - position: 'absolute', + ...modalNavigatorContainer(isSmallScreenWidth), right: 0, - height: '100%', } satisfies ViewStyle), onlyEmojisText: { @@ -1641,7 +1641,7 @@ const styles = (theme: ThemeColors) => ...positioning.pFixed, // We need to stretch the overlay to cover the sidebar and the translate animation distance. // The overlay must also cover borderRadius of the LHP component - left: isModalOnTheLeft ? -variables.lhpBorderRadius : -2 * variables.sideBarWidth, + left: isModalOnTheLeft ? 0 : -2 * variables.sideBarWidth, top: 0, bottom: 0, right: isModalOnTheLeft ? -2 * variables.sideBarWidth : 0, diff --git a/src/styles/variables.ts b/src/styles/variables.ts index 4904a224327a..3bf83545bc4a 100644 --- a/src/styles/variables.ts +++ b/src/styles/variables.ts @@ -193,6 +193,4 @@ export default { cardPreviewHeight: 148, cardPreviewWidth: 235, cardNameWidth: 156, - - lhpBorderRadius: 24, } as const; From 808a1e11fe9fc08a9ee921fabb7975750680cd89 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Wed, 20 Dec 2023 17:29:38 +0100 Subject: [PATCH 2/2] Add optional chaining to topRouteName in linkTo --- src/libs/Navigation/linkTo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.ts b/src/libs/Navigation/linkTo.ts index 6468670fce99..86558765a6e6 100644 --- a/src/libs/Navigation/linkTo.ts +++ b/src/libs/Navigation/linkTo.ts @@ -80,7 +80,7 @@ export default function linkTo(navigation: NavigationContainerRef