Port custom select menus over to use popup #4329

Closed
toddparker opened this Issue May 10, 2012 · 9 comments

Comments

Projects
None yet
3 participants
@toddparker
Contributor

toddparker commented May 10, 2012

Once popup is working well, we should re-wrok custom selects to use popup and add this as a dependency.

@ghost ghost assigned gabrielschulhof May 10, 2012

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof May 11, 2012

Contributor

We need to figure out what happens when a popup contains a custom select menu - the situation pretty much precludes using mutually exclusive popups, favouring a popup stack instead.

Contributor

gabrielschulhof commented May 11, 2012

We need to figure out what happens when a popup contains a custom select menu - the situation pretty much precludes using mutually exclusive popups, favouring a popup stack instead.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker May 11, 2012

Contributor

That is a good point. If this adds a ton of code complexity, we could consider forcing all selects in popups to use the native menu. It's a constraint that may be acceptable (is to me).

Contributor

toddparker commented May 11, 2012

That is a good point. If this adds a ton of code complexity, we could consider forcing all selects in popups to use the native menu. It's a constraint that may be acceptable (is to me).

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof May 11, 2012

Contributor

Let's find out if this adds a ton of code complexity. I am beginning to develop the distinct impression that a stack is easier to manage than mutual exclusivity.

Contributor

gabrielschulhof commented May 11, 2012

Let's find out if this adds a ton of code complexity. I am beginning to develop the distinct impression that a stack is easier to manage than mutual exclusivity.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker May 16, 2012

Contributor

@gabrielschulhof - I think you had some info on this on IRC. Mind posting some notes on that here?

Contributor

toddparker commented May 16, 2012

@gabrielschulhof - I think you had some info on this on IRC. Mind posting some notes on that here?

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof May 16, 2012

Contributor

The stuff I talked about on IRC was mostly for @johnbender ... It stems from the following:

It turns out that doing a stack has almost exactly the same code as doing mutually exclusive popups. The only additional thing one needs to do is to ensure that whichever popup is the last one to have been opened ends up on top of all the other already-open popups.

This means that we need to keep track of the z-index values of each screen that is open, and each popup container. This is pretty simple, since we're already storing the already-open popups in a list. We just keep the max value of each of the two (screen and container) z-index values around, and give each new popup the max plus one.

What I was telling @johnbender was that this popup manager can be extended to handle things other than popups as well - i.e., all in-page-navigation can be handled via one of these managers.

Contributor

gabrielschulhof commented May 16, 2012

The stuff I talked about on IRC was mostly for @johnbender ... It stems from the following:

It turns out that doing a stack has almost exactly the same code as doing mutually exclusive popups. The only additional thing one needs to do is to ensure that whichever popup is the last one to have been opened ends up on top of all the other already-open popups.

This means that we need to keep track of the z-index values of each screen that is open, and each popup container. This is pretty simple, since we're already storing the already-open popups in a list. We just keep the max value of each of the two (screen and container) z-index values around, and give each new popup the max plus one.

What I was telling @johnbender was that this popup manager can be extended to handle things other than popups as well - i.e., all in-page-navigation can be handled via one of these managers.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@ladar

This comment has been minimized.

Show comment
Hide comment
@ladar

ladar May 17, 2012

The popup widget is awesome. I might use it with the project I'm working on.

What I was asking for with #4369 was an option for opening the popups as full screen dialogs. v1.1 does that with custom select menus already if they exceed a certain size. Check out the "Choose state(s)" select menu on http://jquerymobile.com/demos/1.1.0/docs/forms/selects/custom.html

ladar commented May 17, 2012

The popup widget is awesome. I might use it with the project I'm working on.

What I was asking for with #4369 was an option for opening the popups as full screen dialogs. v1.1 does that with custom select menus already if they exceed a certain size. Check out the "Choose state(s)" select menu on http://jquerymobile.com/demos/1.1.0/docs/forms/selects/custom.html

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Jun 4, 2012

Contributor

I have now moved select over to using popup.

Contributor

gabrielschulhof commented Jun 4, 2012

I have now moved select over to using popup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment