Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: make bottom padding optional in sheet

ammarahm-ed7fc58a3fa557
diff --git a/apps/mobile/app/components/properties/index.js b/apps/mobile/app/components/properties/index.js
index 1ce7acad1..62a66e07e 100644
--- a/apps/mobile/app/components/properties/index.js
+++ b/apps/mobile/app/components/properties/index.js
@@ -212,7 +212,6 @@ Properties.present = (item, buttons = [], isSheet) => {
if (!props[0]) return;
presentSheet({
context: isSheet ? "local" : undefined,
- enableGesturesInScrollView: true,
component: (ref, close) => (
<Properties
close={() => {
diff --git a/apps/mobile/app/components/properties/synced.js b/apps/mobile/app/components/properties/synced.js
index 5967e3bf1..023726ab0 100644
--- a/apps/mobile/app/components/properties/synced.js
+++ b/apps/mobile/app/components/properties/synced.js
@@ -94,7 +94,7 @@ export const Synced = ({ item, close }) => {
fontSize={SIZE.xs + 1}
title="Learn more"
height={30}
- type="transparent"
+ type="grayAccent"
/>
</View>
) : null;
diff --git a/apps/mobile/app/components/sheet-provider/index.js b/apps/mobile/app/components/sheet-provider/index.js
index 6bcfc46b2..89ab92ad3 100644
--- a/apps/mobile/app/components/sheet-provider/index.js
+++ b/apps/mobile/app/components/sheet-provider/index.js
@@ -101,6 +101,7 @@ const SheetProvider = ({ context = "global" }) => {
setVisible(false);
setData(null);
}}
+ bottomPadding={!data.noBottomPadding}
enableGesturesInScrollView={data.enableGesturesInScrollView}
>
<View
diff --git a/apps/mobile/app/components/sheets/add-to/index.js b/apps/mobile/app/components/sheets/add-to/index.js
index f568ad48e..d65a2c114 100644
--- a/apps/mobile/app/components/sheets/add-to/index.js
+++ b/apps/mobile/app/components/sheets/add-to/index.js
@@ -472,7 +472,8 @@ const MoveNoteSheet = ({ note, actionSheetRef }) => {
MoveNoteSheet.present = (note) => {
presentSheet({
component: (ref) => <MoveNoteSheet actionSheetRef={ref} note={note} />,
- enableGesturesInScrollView: false
+ enableGesturesInScrollView: false,
+ noBottomPadding: true
});
};
export default MoveNoteSheet;
diff --git a/apps/mobile/app/components/ui/sheet/index.js b/apps/mobile/app/components/ui/sheet/index.js
index d8c66a641..0bee3343a 100644
--- a/apps/mobile/app/components/ui/sheet/index.js
+++ b/apps/mobile/app/components/ui/sheet/index.js
@@ -38,7 +38,8 @@ const SheetWrapper = ({
keyboardMode,
overlay,
overlayOpacity = 0.3,
- enableGesturesInScrollView = false
+ enableGesturesInScrollView = false,
+ bottomPadding = true
}) => {
const colors = useThemeStore((state) => state.colors);
const deviceMode = useSettingStore((state) => state.deviceMode);
@@ -119,14 +120,16 @@ const SheetWrapper = ({
>
<BouncingView>
{children}
- <View
- style={{
- height:
- Platform.OS === "ios" && insets.bottom !== 0
- ? insets.bottom + 5
- : 20
- }}
- />
+ {bottomPadding ? (
+ <View
+ style={{
+ height:
+ Platform.OS === "ios" && insets.bottom !== 0
+ ? insets.bottom + 5
+ : 20
+ }}
+ />
+ ) : null}
</BouncingView>
</ActionSheet>
);
diff --git a/apps/mobile/app/services/event-manager.ts b/apps/mobile/app/services/event-manager.ts
index c769fde2e..af1782344 100644
--- a/apps/mobile/app/services/event-manager.ts
+++ b/apps/mobile/app/services/event-manager.ts
@@ -114,7 +114,8 @@ export type PresentSheetOptions = {
actionsArray: SheetAction[];
learnMore: string;
learnMorePress: () => void;
- enableGesturesInScrollView: boolean;
+ enableGesturesInScrollView?: boolean;
+ noBottomPadding?: boolean;
};
export function presentSheet(data: Partial<PresentSheetOptions>) {
diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.json
index 6f48be728..ce8342b5c 100644
--- a/apps/mobile/package-lock.json
+++ b/apps/mobile/package-lock.json
@@ -42,7 +42,7 @@
"qclone": "^1.2.0",
"react": "18.0.0",
"react-native": "0.69.7",
- "react-native-actions-sheet": "^0.9.0-alpha.12",
+ "react-native-actions-sheet": "^0.9.0-alpha.14",
"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version",
"react-native-drax": "^0.10.2",
"react-native-image-zoom-viewer": "^3.0.1",
@@ -17957,9 +17957,9 @@
}
},
"node_modules/react-native-actions-sheet": {
- "version": "0.9.0-alpha.12",
- "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.0-alpha.12.tgz",
- "integrity": "sha512-VyXsfOFkKCBWB6jn+IlKUTo0KWhItkRC8f6RMvx/RYc5WRhj4Ka5O7/BZVDs86ELJkUT08D7ufzWPjmOQ8hUKw==",
+ "version": "0.9.0-alpha.14",
+ "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.0-alpha.14.tgz",
+ "integrity": "sha512-O1fktAenv2+yv/j72Z/jKsNFMMv6pobcavokbmWY/xcOJqHgo7YNtKZ0xU1s6KTk6VitH7TQXkP22hmM7KpQbg==",
"peerDependencies": {
"react-native": "*",
"react-native-gesture-handler": "*"
@@ -24312,7 +24312,7 @@
"qclone": "^1.2.0",
"react": "18.0.0",
"react-native": "0.69.7",
- "react-native-actions-sheet": "^0.9.0-alpha.12",
+ "react-native-actions-sheet": "^0.9.0-alpha.14",
"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version",
"react-native-drax": "^0.10.2",
"react-native-image-zoom-viewer": "^3.0.1",
@@ -34856,9 +34856,9 @@
}
},
"react-native-actions-sheet": {
- "version": "0.9.0-alpha.12",
- "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.0-alpha.12.tgz",
- "integrity": "sha512-VyXsfOFkKCBWB6jn+IlKUTo0KWhItkRC8f6RMvx/RYc5WRhj4Ka5O7/BZVDs86ELJkUT08D7ufzWPjmOQ8hUKw=="
+ "version": "0.9.0-alpha.14",
+ "resolved": "https://registry.npmjs.org/react-native-actions-sheet/-/react-native-actions-sheet-0.9.0-alpha.14.tgz",
+ "integrity": "sha512-O1fktAenv2+yv/j72Z/jKsNFMMv6pobcavokbmWY/xcOJqHgo7YNtKZ0xU1s6KTk6VitH7TQXkP22hmM7KpQbg=="
},
"react-native-actions-shortcuts": {
"version": "1.0.1",