Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

x-deck and x-slide should respond to swipe gesture #51

Closed
arasbm opened this issue Sep 4, 2013 · 8 comments
Closed

x-deck and x-slide should respond to swipe gesture #51

arasbm opened this issue Sep 4, 2013 · 8 comments
Milestone

Comments

@arasbm
Copy link

arasbm commented Sep 4, 2013

First let me tell you, I think brick is a very cool project. In order to learn more about brick, I started developing a simple Firefox OS app using it. I used x-slide, and then pushed to the phone -- thinking to myself: it is all going to work out of the box. Little did I know, it seems that brick currently does not handle swipe gestures at all.

When someone uses a slide deck, they expect to be able to naturally swipe left and right -- when the app runs on a touch device.

Here are two questions for you:

  • what are your current plans for adding swipe gestures, to the x-slide and x-deck
  • how do you envision this kind of event handling be added to brick elements in general?

And last, I like to express my interest in helping to find a solution and implement it. So, please let me know what your thoughts are, and if you are open to community contributions. Thanks!

@potch
Copy link
Member

potch commented Sep 4, 2013

I completely agree! The x-tag library which brick is built upon has support for these gestures, and we should ensure these components do the "right" (expected) thing in regards to them. We're very open to community contributions :) but are also happy to implement this functionality on the way to stable 1.0

Thanks!

@fwenzel
Copy link

fwenzel commented Sep 4, 2013

Swipe gestures make sense to me, though keep in mind that the strength of "x-deck" currently is the ability to pull up any card you want, by calling its show function. Going to the "next" slide (whatever that currently means) by default when I swipe would definitely not be expected behavior for me.

That said, I can see the usecase.

@potch
Copy link
Member

potch commented Sep 4, 2013

@fwenzel My gut reaction is that deck would have gesture support that is disabled by default, whereas slidebox would have support enabled by default. Either way, both should definitely support the gestures in some capacity.

@fwenzel
Copy link

fwenzel commented Sep 4, 2013

I like this suggestion, sounds like sane defaults. Plus they can share code ;)

@arasbm
Copy link
Author

arasbm commented Sep 4, 2013

how about this proposal:

  • x-deck would act like a deck of cards if you slide your finger you remove the top card and expose the one under it (the card under does not move)
  • x-slide when you swipe, the current card starts to move and a new one starts to slide into the frame (as if they are attached to each other instead of being stacked

But anyway, regardless of what we choose as default behaviour, I think everyone agrees that the functionality should be available for both deck and slide.

One thing I want to add is that we really need "natural swipe" as opposed to just an animation triggered after gesture is detected. There is currently a serious lack of this type of interaction, and I can see it is lacking when developing Firefox OS apps. What I mean by natural swipe is one that has immediate feedback as you are performing the action.

I am still wondering what the next steps are. Have you guys discussed how to add this feature? Is it possible to break down the implementation into smaller task, so people like me can take pick a piece?

@ghost ghost assigned pennyfx Dec 6, 2013
@precz
Copy link

precz commented Jan 28, 2014

+1

@potch potch modified the milestones: 1.1, 1.0 stable Mar 3, 2014
@potch
Copy link
Member

potch commented Mar 3, 2014

I've moved this issue to our 1.1 timeframe.
A lot of developers use the 'card' UI pattern, but want control over the way in which various cards are displayed. Even though they all live in a flat stack, only clicking the 'settings' button should show the 'settings' card, for example. I want to enable devs to opt-in to gesture based card movement, but it would break too many existing based UIs to have it on by default.

@potch
Copy link
Member

potch commented Jul 16, 2014

This is now being tracked in mozbrick/brick-deck#5.

@potch potch closed this as completed Jul 16, 2014
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

5 participants