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 horizontal edge gestures #5179

Merged
merged 1 commit into from Aug 4, 2019

Conversation

@robert00s
Copy link
Contributor

commented Aug 4, 2019

Add top/bottom edge swipe gesture like in #5156
obraz

@Frenzie Frenzie added the UX label Aug 4, 2019

@Frenzie Frenzie added this to the 2019.08 milestone Aug 4, 2019

@Frenzie Frenzie merged commit 5245bc8 into koreader:master Aug 4, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
local zone_bottom_edge = {
ratio_x = 1/8, ratio_y = 7/8,
ratio_w = 7/8, ratio_h = 1/8,
}

This comment has been minimized.

Copy link
@poire-z

poire-z Aug 4, 2019

Contributor

I guess these 1/8 and 7/8 are to exclude the zone_top_left_corner (and friends) which are themselves all 1/8 rectangles at corners.
So, I guess this 7/8 must be 6/8, to leave 1/8 on each side.
Or may be it doesn't matter as there is no conflict with tap/hold on corners, as it is swipe.
And there may be no conflict with each other edge swipes because of different directions.
In which case there is no reason to not use the full width.
So, either an offset of 1/8 and a lenght of 6/8 - or an offset of 0 and a length of 1 (8/8).

(I thought that for consistency, these could also be defined in defaults.lua like the corners' ones are, eg. DTAP_ZONE_TOP_LEFT, but I guess there's no reason to override them, so no need to bother.)

This comment has been minimized.

Copy link
@Frenzie

Frenzie Aug 4, 2019

Member

Or may be it doesn't matter as there is no conflict with tap/hold on corners, as it is swipe.

You can imagine swipe from corner though. Not sure if it's worth it. :-)

I guess there's no reason to override them, so no need to bother.)

I don't know, it's kind of cool to hack touch zones to do whatever you want.

This comment has been minimized.

Copy link
@robert00s

robert00s Aug 5, 2019

Author Contributor

Zones was simply taken from kobolight plugin :)
c6c8c5a#diff-9cf37ee7352547f3ecc054072ae290d6L20

There is no conflict with tap/hold on corners but I don't think that swipe from one corner to another is useful :)

This comment has been minimized.

Copy link
@poire-z

poire-z Aug 5, 2019

Contributor

OK, but if they were messy there in the plugin, we could fix them now that they are in the core :)

I don't think that swipe from one corner to another is useful

If I read them right, they set the following zones:
image
and if I remember correctly, it's the swipe starting position that matters for checking the zone.

So, a right handed person holding the device with his single right hand could bottom swipe left with his thumb (starting in the bottom right corner) with no issue.
While a left handed person holding the device with his single left hand will have a hard time as it can't start in the bottom left corner, and will have to extend his thumb far right to reach the green zone.
So, I guess for consistency and the various aerodynamics of hands and fingers, they should all be 8/8 (=1) long :) (if that cause no other issues I have not foreseen.)

This comment has been minimized.

Copy link
@robert00s

robert00s Aug 5, 2019

Author Contributor

I'm absolutely convinced :)
I prepare patch for it.

@robert00s robert00s referenced this pull request Aug 5, 2019

Frenzie added a commit that referenced this pull request Aug 5, 2019

@robert00s robert00s deleted the robert00s:swipe_edge_top_bottom branch Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.