Make it possible to set option direction "reverse" for the transition.
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.
I will add a note to the docs that direction="reverse" can not be used for popup transitions (only pages/dialogs).
Fixed by commit 3941c00
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.
popup.js: Added support for reverse transitions
Fixes #4743 - Popup transition direction reverse by adding support for
data-direction="reverse" on popup widget links.
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?
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.
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.
Removing feature request label and milestone. Using ticket #5134 for this issue.