Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add an array of middle points to intercept gesture navigation #395

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mateuspontes
Copy link

@mateuspontes mateuspontes commented Mar 1, 2022

This is a Work in Progress to try to address #213, #356 and #297 with an array of snapPoints instead of a single value.

This code is not tested yet, it's just an initial "try and error" solution before we move on with a better and optimized code as well.

How should you test it?

Clone the branch, yarn install and yarn build to update your dependencies, link the repo in your base code, and take a moment do comment this PR with your thoughts and improvements

Update your code removing snapPoint and adding the new prop with your middle points, something like this;snapPoints=[150, 300, ....]

@mateuspontes mateuspontes marked this pull request as draft March 1, 2022 16:50
@Marcuspo
Copy link

Marcuspo commented Mar 1, 2022

Error in test:

the package /Users/developerriderize/Documents/client-mobile/node_modules/react-native-modalize/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/developerriderize/Documents/client-mobile/node_modules/react-native-modalize/lib/index.js. Indeed, none of these files exist:

@mateuspontes
Copy link
Author

@Marcuspo please, try to enter into the package folder and run yarn build, the original repo doesn't have any script to build tsc after installation.

@jeremybarbet
Copy link
Owner

@mateuspontes This is great, well done! Let me know when it's ready for review, you can check against/create more examples with new usage based on this https://github.com/jeremybarbet/react-native-modalize/blob/master/examples/react-native-navigation/src/screens/SnappingList.js

I would suggest to just remove snapPoint and only keep snapPoints moving forward.

Regarding building phase, it happens when running npm publish (https://docs.npmjs.com/cli/v8/using-npm/scripts#npm-publish)

@jeremybarbet jeremybarbet force-pushed the master branch 7 times, most recently from 7896a78 to 693e323 Compare May 27, 2022 16:03
@zelongc
Copy link

zelongc commented May 16, 2024

Any update on this feature? would love to see this merged in!

@mateuspontes
Copy link
Author

@zelongc I'm sorry, I didn't work on that to solve the issues and evolve the solution, and also I don't know the status of the project to know if it's still a good idea to have 'snapPoints'.

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

Successfully merging this pull request may close these issues.

None yet

4 participants