Skip to content

Commit

Permalink
fix: Janky scroll in sheet on some devices
Browse files Browse the repository at this point in the history
- Disable overscroll mode on sheet lists
- The janky scroll might have been due to the combination of not disabling overscroll and our patch change
  - Note: we applied our patch and it worked without the overscroll mode change
  • Loading branch information
cyanChill committed Dec 13, 2024
1 parent 58c39eb commit 00f1411
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
20 changes: 19 additions & 1 deletion mobile/patches/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/src/index.js b/dist/src/index.js
index 0e124da4da841bfb16fd7379ba77e8e8fc9abbe7..3062317a6e8a98827ca971cace2967cdfc08c632 100644
index 0e124da4da841bfb16fd7379ba77e8e8fc9abbe7..66f5e0e2f4e5aad54eb2fe8294008d8a98839960 100644
--- a/dist/src/index.js
+++ b/dist/src/index.js
@@ -288,10 +288,19 @@ export default forwardRef(function ActionSheet(_a, ref) {
Expand Down Expand Up @@ -32,3 +32,21 @@ index 0e124da4da841bfb16fd7379ba77e8e8fc9abbe7..3062317a6e8a98827ca971cace2967cd
var height = rootViewHeight - safeMarginFromTop;
var width = rootViewWidth;
dimensionsRef.current = {
@@ -575,9 +585,14 @@ export default forwardRef(function ActionSheet(_a, ref) {
? { enabled: false }
: {
onBegan: function () {
- if (Platform.OS === 'android') {
- scrollable(false);
- }
+ // FIXME: This was causing scrolling on lists to be a bit
+ // janky. From my tests so far, there doesn't seem to be
+ // any issues with removing this.
+ // - There's no notes in the v0.9.0 PR that added this in
+ // on why this is here.
+ // if (Platform.OS === 'android') {
+ // scrollable(false);
+ // }
},
onGestureEvent: function (event) {
var _a, _b;
6 changes: 3 additions & 3 deletions mobile/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mobile/src/screens/Sheets/Language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function LanguageSheet(props: SheetProps<"language-sheet">) {
<StyledText>{item.name}</StyledText>
</Radio>
)}
overScrollMode="never"
showsVerticalScrollIndicator={false}
contentContainerClassName="gap-1 pb-4"
/>
Expand Down
1 change: 1 addition & 0 deletions mobile/src/screens/Sheets/ScanFilterList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default function ScanFilterListSheet(
ListEmptyComponent={
<StyledText center>{t("response.noFilters")}</StyledText>
}
overScrollMode="never"
showsVerticalScrollIndicator={false}
contentContainerClassName="pb-4"
/>
Expand Down
1 change: 1 addition & 0 deletions mobile/src/screens/Sheets/TrackToPlaylist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function TrackToPlaylistSheet(
<StyledText center>{t("response.noPlaylists")}</StyledText>
)
}
overScrollMode="never"
showsVerticalScrollIndicator={false}
contentContainerClassName="pb-4"
/>
Expand Down
1 change: 1 addition & 0 deletions mobile/src/screens/Sheets/TrackUpcoming.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default function TrackUpcomingSheet(
</View>
);
}}
overScrollMode="never"
showsVerticalScrollIndicator={false}
contentContainerClassName="pb-4"
/>
Expand Down

0 comments on commit 00f1411

Please sign in to comment.