Coder Social home page Coder Social logo

Comments (8)

potch avatar potch commented on September 1, 2024

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!

from brick.

fwenzel avatar fwenzel commented on September 1, 2024

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.

from brick.

potch avatar potch commented on September 1, 2024

@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.

from brick.

fwenzel avatar fwenzel commented on September 1, 2024

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

from brick.

arasbm avatar arasbm commented on September 1, 2024

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?

from brick.

precz avatar precz commented on September 1, 2024

+1

from brick.

potch avatar potch commented on September 1, 2024

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.

from brick.

potch avatar potch commented on September 1, 2024

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

from brick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.