meteoric / meteor-ionic

Ionic components for Meteor. No Angular!
http://meteoric.github.io
MIT License
1.51k stars 219 forks source link

Support for nav-transition & nav-direction? #335

Closed gbhatnag closed 8 years ago

gbhatnag commented 8 years ago

I see these two items at the bottom of the main project's documentation and could really use them in a mobile app that I'm working on. Having a navigation view pull up from the bottom like a modal is a key need for 'popping up' an item to work with. The standard modal can't be used because we need more customizability over the content, header buttons and transitions.

The current left/right transitions between navs work, but do not match the distinct interaction paradigm we're trying to put into place.

Any timeline on when nav transitions and directions for up/down will be added? With a little guidance, I'd be happy to add this functionality and submit a pull request -- any pointers @nickw ?

nickw commented 8 years ago

Having a navigation view pull up from the bottom like a modal is a key need for 'popping up' an item to work with. The standard modal can't be used because we need more customizability over the content, header buttons and transitions.

You'll still want to use a "modal" as opposed to a navigation transition. "nav transitions and directions for up/down" aren't really a valid use case on mobile - transitions are always left to right - so those won't ever be added.

Instead I would suggest you either:

  1. Use the existing modal component with the customTemplate options like so:
{{#ionModal customTemplate=true}}
// Any HTML you want goes here
{{/ionModal}}
  1. Create your own component and just copy over the pieces of https://github.com/meteoric/meteor-ionic/blob/master/components/ionModal/ionModal.js and https://github.com/meteoric/meteor-ionic/blob/master/components/ionModal/ionModal.html that you need.
gbhatnag commented 8 years ago

Thanks for the quick response. I'm wondering if it's possible to have a modal that can then have navigation left/right transitions within it. On mobile, a modal is more like a total screen takeover. We have a process where we want to pull an item up, go through a workflow on it using various routes/navViews and then dismiss it.

I'll take a look at the second option for creating our own component, thanks.

nickw commented 8 years ago

I'm wondering if it's possible to have a modal that can then have navigation left/right transitions within it.

That would be a great feature to have, but I don't think that's something that can easily be done with iron:router. We'd need some kind of nested routing functionality. You could create multiple screens within a modal that just get swapped out independent of routes - just using a Session var or something to track the current screen - basically like tabs.

gbhatnag commented 8 years ago

That's what I figured. We're just using a regular route to get to a view that looks like a modal and then going from there. The direction that things sweep in/out, up/down is something we may try to tweak further down the road.