Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

feat: macOS and Windows support #1188

Merged
merged 4 commits into from
Jul 30, 2021
Merged

feat: macOS and Windows support #1188

merged 4 commits into from
Jul 30, 2021

Conversation

dcangulo
Copy link
Contributor

@dcangulo dcangulo commented Jun 1, 2021

Using react-native-pager-view on macOS and Windows causes errors. Solution is to use PanResponder for these platforms (same with web).

Those platforms favors .native.tsx file over .tsx file which caused the errors. Solution is to use platform specific components for each.

macOS fixes:
Transform property is currently broken on react-native-macos. Temporary solution is to use left for indicator position. See: microsoft/react-native-macos#280

Windows fixes:
PlatformPressable is not pressable on Windows (only the label), I'm not sure why, but adding backgroundColor: 'transparent' to it makes the whole tab pressable.

Motivation

react-native-pager-view does not support macOS and Windows.

Test plan

Run on react-native-macos and react-native-windows projects.

Windows (initial):
windows

Windows (swiping):
windows2

macOS (initial):
Screen Shot 2021-06-01 at 11 18 18 AM

macOS (swiping):
Screen Shot 2021-06-01 at 11 19 32 AM

macOS (swiping): if microsoft/react-native-macos#460 is merged
Screen Shot 2021-06-01 at 12 56 17 PM

macOS (after swipe/swipe release):
Screen Shot 2021-06-01 at 11 20 11 AM

@raaannzzz
Copy link

+1

@github-actions
Copy link

Hey dcangulo! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

@dcangulo
Copy link
Contributor Author

@satya164 Any more changes I need to make? 🎌

@satya164
Copy link
Owner

I'll review it this week

@satya164 satya164 merged commit bf383d0 into satya164:main Jul 30, 2021
@satya164
Copy link
Owner

Thanks for the PR 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants