[ 5 posts ]

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile

Playing with App Framework transitions - slideRight?

Post Posted: Tue May 15, 2012 4:44 am
+0-
Hi All,

I have a fiddle that tests the slideLeft and slideRight view transitions of the app framework (3.5.0): http://jsfiddle.net/simongilligan/bWaSK/

If you select (in sequence) page 2 and then page 3, the transition is slideLeft. From page 3 if you select page 2 and then 1, the transition is slideRight.

slideLeft works as I expect, slideRight doesn't.

slideRight swaps the 2 views at the beginning of the transition, completes the slideRight, and then swaps the 2 views back. I've slowed down the transition so the behaviour is easy to spot.

My question - is this intended behaviour? Am I using slideRight in a context it's not mean to be used?

PS. this also shows problems with chrome (ver 19, osx) handling the transitions.

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile

Re: Playing with App Framework transitions - slideRight?

Post Posted: Wed May 16, 2012 6:06 am
+0-
Have filed this as a ticket: http://yuilibrary.com/projects/yui3/ticket/2532325

Eric Ferraiuolo

YUI Developer

  • Username: ericf
  • Joined: Mon Jan 12, 2009 8:26 pm
  • Posts: 380
  • Location: Boston, MA
  • Twitter: ericf
  • GitHub: ericf
  • Gists: ericf
  • IRC: eric_f
  • YUI Developer
  • Offline
  • Profile

Re: Playing with App Framework transitions - slideRight?

Post Posted: Wed May 16, 2012 10:58 am
+0-
Simon,

I made two changes to your Fiddle to make it work:
http://jsfiddle.net/ericf/RcX6h/

1) `render: true` is not supported in the Y.App constructor, so I'm explicitly calling `app.render()` before the first call to `showView()`.

2) The sliding transition are tricky and I'm not 100% satisfied with how they're implemented :-/ The `slideRight` transition depends on the new view being prepended to the `viewContainer` node instead of appended. So I set the `prepend: true` option, more on that here:
http://yuilibrary.com/yui/docs/app/#und ... ew-options

I hope that helps, and I want to make the transition easier to use and smoother in future releases. I anticipate it being a process that involves continuous tweaking.

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile

Re: Playing with App Framework transitions - slideRight?

Post Posted: Wed May 16, 2012 1:34 pm
+0-
aha!

Many thanks Eric, I figured there must have been something I missed. Sorry to bug you with the ticket. The transitions are great; the whole framework is of course very powerful - I look forward to seeing it all evolve.

Cheers

Eric Ferraiuolo

YUI Developer

  • Username: ericf
  • Joined: Mon Jan 12, 2009 8:26 pm
  • Posts: 380
  • Location: Boston, MA
  • Twitter: ericf
  • GitHub: ericf
  • Gists: ericf
  • IRC: eric_f
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Playing with App Framework transitions - slideRight?

Post Posted: Wed May 16, 2012 1:40 pm
+0-
No worries. I hope to eventually make it so you don't have to specify the `prepend: true` option.
  [ 5 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum