From ad7822759d2e5cfbedb383c659b468e413db4afa Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 13 Sep 2023 01:14:11 +0200 Subject: [PATCH 1/4] Fix bug with toggle attribution button is not placed on the right position for android --- src/components/MapView/MapView.tsx | 3 +++ src/styles/utilities/positioning.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index aebd63edf559..bfe042f2e217 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -2,6 +2,7 @@ import {View} from 'react-native'; import {useFocusEffect} from '@react-navigation/native'; import Mapbox, {MapState, MarkerView, setAccessToken} from '@rnmapbox/maps'; import {forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; +import styles from '../../styles/styles'; import responder from './responder'; import utils from './utils'; @@ -64,6 +65,8 @@ const MapView = forwardRef(({accessToken, style, ma styleURL={styleURL} onMapIdle={setMapIdle} pitchEnabled={pitchEnabled} + attributionPosition={{ ...styles.r2, ...styles.b2 }} + logoPosition={{ ...styles.l2, ...styles.b2 }} // eslint-disable-next-line {...responder.panHandlers} > diff --git a/src/styles/utilities/positioning.ts b/src/styles/utilities/positioning.ts index fc505e4cb608..dfecfcc12a78 100644 --- a/src/styles/utilities/positioning.ts +++ b/src/styles/utilities/positioning.ts @@ -47,4 +47,7 @@ export default { b0: { bottom: 0, }, + b2:{ + bottom: 8, + } } satisfies Record; From faec65c047bdce0deae422a16fbf18d3058dd476 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 13 Sep 2023 01:24:23 +0200 Subject: [PATCH 2/4] Fix spaces --- src/components/MapView/MapView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index bfe042f2e217..c04f1e839258 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -65,8 +65,8 @@ const MapView = forwardRef(({accessToken, style, ma styleURL={styleURL} onMapIdle={setMapIdle} pitchEnabled={pitchEnabled} - attributionPosition={{ ...styles.r2, ...styles.b2 }} - logoPosition={{ ...styles.l2, ...styles.b2 }} + attributionPosition={{ ...styles.r2, ...styles.b2 }} + logoPosition={{ ...styles.l2, ...styles.b2 }} // eslint-disable-next-line {...responder.panHandlers} > From 350f082402b61befc936821d0096a2e61fe3c8cc Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 13 Sep 2023 01:24:56 +0200 Subject: [PATCH 3/4] Fix spaces x2 --- src/styles/utilities/positioning.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/utilities/positioning.ts b/src/styles/utilities/positioning.ts index dfecfcc12a78..adba1f37a9e8 100644 --- a/src/styles/utilities/positioning.ts +++ b/src/styles/utilities/positioning.ts @@ -47,7 +47,7 @@ export default { b0: { bottom: 0, }, - b2:{ + b2: { bottom: 8, } } satisfies Record; From 43467f77da905ab292117ae10703a01eaa197e97 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 13 Sep 2023 09:58:30 +0200 Subject: [PATCH 4/4] Fix prettier issues --- src/components/MapView/MapView.tsx | 4 ++-- src/styles/utilities/positioning.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index c04f1e839258..0431a02695ec 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -65,8 +65,8 @@ const MapView = forwardRef(({accessToken, style, ma styleURL={styleURL} onMapIdle={setMapIdle} pitchEnabled={pitchEnabled} - attributionPosition={{ ...styles.r2, ...styles.b2 }} - logoPosition={{ ...styles.l2, ...styles.b2 }} + attributionPosition={{...styles.r2, ...styles.b2}} + logoPosition={{...styles.l2, ...styles.b2}} // eslint-disable-next-line {...responder.panHandlers} > diff --git a/src/styles/utilities/positioning.ts b/src/styles/utilities/positioning.ts index adba1f37a9e8..651d2a12f2ea 100644 --- a/src/styles/utilities/positioning.ts +++ b/src/styles/utilities/positioning.ts @@ -49,5 +49,5 @@ export default { }, b2: { bottom: 8, - } + }, } satisfies Record;