Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Popup: transition direction reverse #4743

Closed
jaspermdegroot opened this issue Jul 25, 2012 · 8 comments
Closed

Popup: transition direction reverse #4743

jaspermdegroot opened this issue Jul 25, 2012 · 8 comments

Comments

@jaspermdegroot
Copy link
Contributor

Make it possible to set option direction "reverse" for the transition.

@gabrielschulhof
Copy link

Some transitions cannot be used in reverse. For example, fade and pop would leave the popup in an unusable final state if they were applied in reverse. flip could probably be reversed. slide has variants slideup, slidedown, and, AFAIK slideout to deal with reverse directions.

In summary, I don't believe this necessitates code changes to popup.

@jaspermdegroot
Copy link
Contributor Author

I will add a note to the docs that direction="reverse" can not be used for popup transitions (only pages/dialogs).

@jaspermdegroot
Copy link
Contributor Author

Fixed by commit 3941c00

@chromepenguin
Copy link

There are several transitions that require data-direction="reverse" in order to use them from the other direction: slide, flow, slidefade, and pop (which does not leave it in an unusable state) all support being played in reverse and are incomplete without this ability.

The main issue is that there is no "slideout" transition, so this issue prevents popups from being able to slide in from left to right.

This is important functionality and there's no good reason it should be absent.

chromepenguin pushed a commit to chromepenguin/jquery-mobile that referenced this issue Aug 28, 2012
Fixes jquery-archive#4743 - Popup transition direction reverse by adding support for
data-direction="reverse" on popup widget links.
@jaspermdegroot
Copy link
Contributor Author

@chromepenguin

I agree that it should be possible to have a left to right slide transition. That was the reason I opened this issue.
Because the reverse transition is used for closing the popup, supporting the option data-direction="reverse" is probably not the right solution. I suggest we add a "slideout" transition.

@toddparker - What's your opinion on this?

@chromepenguin
Copy link

In my PR I handle the transition used for closing the popup by only adding the "reverse" class if the initial transition was not reversed. This is perhaps a little counter-intuitive but the user never sees it. If data-direction is only meant to specify the direction of the transition, then I think this would be acceptable as it also allows other transition sets (namely flow and slidefade) to be used in reverse with no additional work.

However, if data-direction is meant to specify the direction of navigation then I agree that it would not make much sense in this case. If you think it would be cleaner in the long run to add aliases to reversible transition sets then I would accept this as well, provided reverse aliases are also available for flow and slidefade.

@jaspermdegroot
Copy link
Contributor Author

@chromepenguin

I should have looked better at your PR. I missed the part that the reverse direction is only used for closing the popup if it hasn't been used already to open it. Going to discuss this with the team.

@jaspermdegroot
Copy link
Contributor Author

Removing feature request label and milestone. Using ticket #5134 for this issue.

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

3 participants