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

Add point to point panning API #154

Closed
LeoNatan opened this issue Jun 6, 2017 · 13 comments
Closed

Add point to point panning API #154

LeoNatan opened this issue Jun 6, 2017 · 13 comments

Comments

@LeoNatan
Copy link
Contributor

LeoNatan commented Jun 6, 2017

For various controls, we need an API that will allow the users to specify two points, and let the system perform a pan/scroll from one point to the other. For instance, a picker needs this to perform selection.

@LeoNatan LeoNatan changed the title Add point to point pan gesture API Add point to point panning API Jun 6, 2017
@LeoNatan LeoNatan closed this as completed Jun 6, 2017
@LeoNatan LeoNatan reopened this Jun 6, 2017
@LeoNatan
Copy link
Contributor Author

LeoNatan commented Jun 6, 2017

Perhaps API should provide two variants; one in point units and one in percentage units.

@DanielMSchmidt
Copy link
Contributor

DanielMSchmidt commented Jun 25, 2017

EarlGrey provides a swipeSlowInDirectionWithStartPoint function. Could this be an option for us?

I mean it is not optimal, but could be well enough

@DanielMSchmidt
Copy link
Contributor

Did a bit more research, this EarlGrey utility looks exactly like the thing we need: GREYPathGestureUtils, it is used e.g. in the Swipe Action, which is used by scrollInDirectionWithStartPoint.

My idea would be to internally extend EarlGrey to support "swipe from here to there in x seconds". Does this sound like a good idea to you? Would be willing to try a PR ;)

@LeoNatan
Copy link
Contributor Author

Sounds good. If you can expose that method to the JS world, it would be lovely.

@DanielMSchmidt
Copy link
Contributor

I will have a look at this next weekend ;) Would really help me to test my drawer library.

@rotemmiz
Copy link
Member

rotemmiz commented Jul 13, 2017

This PR by @DanielMSchmidt will solve it.

@jsierles
Copy link

Is this supported now?

@LeoNatan
Copy link
Contributor Author

Sorry, not yet.

@jsierles
Copy link

OK, thanks. Is there a workaround for testing a Picker?

@LeoNatan
Copy link
Contributor Author

Pickers are looked at right now for a proper fix, but I don't have a timeline currently. We also found another issue which may need this point-to-point API, so this may come soon too. Again, cannot say when.

@jsierles
Copy link

OK, thanks for the update. Can you recommend a way to simulate the behavior of the picker directly? Just so one can move forward within the app.

@LeoNatan
Copy link
Contributor Author

You can try mocking the screen or functionality for the tests. Not optimal but I can't think of something else right now. Maybe @rotemmiz may have an idea?

@LeoNatan
Copy link
Contributor Author

LeoNatan commented Mar 7, 2018

This is being discussed seriously in #589. Closing this issue in favor of that one.

@LeoNatan LeoNatan closed this as completed Mar 7, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants