Hi Alex,

how this would be with media queries? FWIK, media queries gives you the
possibility to make for example changes depending on screen size, but
screen size does not say anything about if you are on Desktop or Mobile
right? or is another approach that I'm not aware.

For what I see seems mouse will be always needed, while touch only on
concrete cases. For example Button will always need Mouse controller and
that solves mouse and touch in all devices. Drawer will need as well mouse
controller in all normal cases like button, but in touch devices will need
to handle three listeners (touchbegin, touchmove and touchend) to solve
swipe gesture to close the drawer. This will be only on mobile/tablet and
not needed on desktop, since in desktop just clicking with the mouse
outside the drawer closes it. So with this example what do you think will
be the best approach in Royale?

thanks



2018-07-05 18:06 GMT+02:00 Alex Harui <aha...@adobe.com.invalid>:

> Hi Carlos,
>
> Of course you can combine a MouseController and a TouchController into one
> bead.  Aggregations are supported throughout Royale and probably never
> prohibited.
> Aggregations are often not PAYG so that's why the current plan is to
> support runtime loading of the mouse or touch controller based on media
> query.  It isn't PAYG to be looking for mouseOver events on a touch device
> that has no ability to detect "over".  You might even load a different View
> that doesn't bring in code to display "over" states.
>
> The key point is that the controller for a component is replaceable.  I
> don't think we want a pattern where you load more than both a mouse and
> touch  controller.  What goes in the one controller can be tweaked for the
> users needs.
>
> My 2 cents,
> -Alex
>
> On 7/5/18, 1:30 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> <carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote:
>
>     Hi Alex,
>
>     as I said, maybe the solution is not turn off the actual controller
> and put
>      a touch one. Mouse controller does many things already. I must to
>     investigate more over this since I see this more like to "add"
> controllers
>     than to switch one for other. Can we configure more than 1controller
> bead
>     per component? So people can use "mouse" only or "touch" only or
> "mouse" +
>     "touch" at the same time? then mouse handle "click" and "basic" touch
> like
>     it does actually and we can have some touch controllers separated for
>     things like swipes and other touch needs?
>
>
>
>
>     2018-07-04 18:34 GMT+02:00 Alex Harui <aha...@adobe.com.invalid>:
>
>     > Harbs,
>     >
>     > Can we wrap Hammer.js into more easily reusable TouchControllers in
> Royale?
>     >
>     > IMO, it doesn't matter if it is a can of worms.  Royale hopefully
> makes it
>     > easy to replace TouchControllers.  So you can write one that mostly
> works
>     > and if someone offers a better one at some point, you can switch to
> that.
>     > We won't bake one into the components and make the user wait for a
> next
>     > release to get improvements.
>     >
>     > My 2 cents,
>     > -Alex
>     >
>     > On 7/4/18, 9:26 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>     >
>     >     Hi Carlos,
>     >
>     >     Touch support is a can of worms.
>     >
>     >     Basic touch support comes for free from Mouse Events. Anything
> more
>     > than that, gets very complex very quickly.
>     >
>     >     I use Hammer.js in my own app to handle touch, and it works very
> well.
>     >
>     >     https://na01.safelinks.protection.outlook.com/?url=
>     > https%3A%2F%2Fhammerjs.github.io%2F&data=02%7C01%7Caharui%40
> adobe.com%
>     > 7C69560100ba4747a4e52808d5e1cae3c3%7Cfa7b1b5a7b34438794aed2c178de
>     > cee1%7C0%7C0%7C636663183877387695&sdata=8By2PeXtYHtWAy9%
> 2BwBFwvW3CdtAEx%
>     > 2Fly80MJCO8oqtM%3D&reserved=0 <https://na01.safelinks.
> protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks&
> data=02%7C01%7Caharui%40adobe.com%7C050c62517e694c28fbb608d5e251a003%
> 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636663762562128231&sdata=
> tkyHPnu28qJv9uMZVl6Hr9Y7k%2BmvOP99L%2FuUQE8KdXc%3D&reserved=0.
>     > protection.outlook.com/?url=https%3A%2F%2Fhammerjs.github.
>     > io%2F&data=02%7C01%7Caharui%40adobe.com%
> 7C69560100ba4747a4e52808d5e1ca
>     > e3c3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>     > 7C636663183877387695&sdata=8By2PeXtYHtWAy9%2BwBFwvW3CdtAEx%
>     > 2Fly80MJCO8oqtM%3D&reserved=0>
>     >
>     >     Harbs
>     >
>     >     > On Jul 4, 2018, at 4:47 PM, Carlos Rovira <
> carlosrov...@apache.org>
>     > wrote:
>     >     >
>     >     > Hi,
>     >     >
>     >     > I'm looking how to provide touch support for Drawer so users
> can
>     > slide out.
>     >     > Is a default behavior in this kind of components.
>     >     >
>     >     > I'm seeing there's no TouchEvent or something similar. I think
> this
>     > is an
>     >     > important flaw, since not having this is like to say we are not
>     > prepared
>     >     > for mobile and in the end we lost users.
>     >     >
>     >     >
>     >     >
>     >     > --
>     >     > Carlos Rovira
>     >     > https://na01.safelinks.protection.outlook.com/?url=
>     > http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%
> 40adobe.com%
>     > 7C69560100ba4747a4e52808d5e1cae3c3%7Cfa7b1b5a7b34438794aed2c178de
>     > cee1%7C0%7C0%7C636663183877387695&sdata=
> 7j8FPbQ59eU0hMPOLfelshVI6DDqVC
>     > JtLrxGWpK4MVQ%3D&reserved=0
>     >
>     >
>     >
>     >
>
>
>     --
>     Carlos Rovira
>     https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%
> 7C050c62517e694c28fbb608d5e251a003%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C636663762562128231&sdata=SyJ%2FO7tu4%2Fw2a%
> 2Ba1JZv4aefMKCXhttWQ1QNSLonSmiQ%3D&reserved=0
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to