New article on Piper’s Pages:
Something was bothering me with my fancy-shmancy AJAX/DHTML popups in the Home Audio interface.
It manifested itself mostly when adjusting track BPMs for a new album. Basically, one has the ability to browse on an album’s tracks, then get the track popup for any particular track and – using forward/back navigation in the popup – move around the browse entries via the track popup.
This is cool in practice. You can see more detailed deets for browse entries (as well as options like track suggestions) and quickly compare between tracks by clicking prev/next. No need to display the popup, close it, then display the popup for another track in the results. Same goes for albums, of course.
So when BPM’ing an album, I had two options: 1) use the quick-edit links so that I could get the edit popup straight from the browse results, or (2) display track details and use the edit link from the popup which then loaded the edit popup.
It was kinda nice using the second option, because sometimes you don’t need to edit the BPM and you can just next-next-next through the entire list – no need to scroll the list, figure out which track you’re working on, then click to get the details popup or the edit popup.
BUT… sometimes you’re not sure if the BPM that’s in the DBMS is correct, you want to use the edit popup so that you can tap out the beats and see if it’s a match. If it’s a match, you close the edit popup – but the entry doesn’t highlight since you didn’t change anything, so you lose visual reference as to where you are in the list.
You could use the details popup, then go to the edit popup, but same problem – once you closed the edit popup you were back to a list of tracks with no visual reference as to what you last looked at.
And this underlined a more general problem – with all these dynamic popups, what happens if you want to go back one popup? What happens if you want to display the details popup, then the edit popup, but then go back to the details popup so you can “next” to the next entry?
One way to do this is to keep a history in the backend of popups you’ve looked at. Problem is – and this has cropped up before – the application is purposely free-flowing, and you can have multiple windows/tabs open all using the same session (sharing the same search history, context, etc.) If you’ve got popups going in two windows, the history will be intermingled and thus useless.
So I took a different approach. Instead of a popup yielding more popups, I decided that additional popups could be dynamically loaded into the first popup. So for example, you get track details in a popup, then click to edit BPMs and the edit dialog is loaded into the current popup rather than appearing as a new popup. Submit your changes and the main popup remains.
Works a treat.
The only problem is that the popup is meant to be somewhat small relative to the main interface, and when we start dynamically inserting some of these other popups – ie, the zone selector – the popup gets to be a little large and looks a little “crammed” – hence the title of this article. But I think that’s a small price to pay for the increased usefulness (again, linking back to the title of this article), and I can probably make it more palatable with careful application of visual styling elements (via CSS).
Yup, so that’s that yo.
I also added the ability to start a new search using a popup – not just a saved search as before, but actually specifying search conditions. Not all of the fields are displayed in the popup as they are when you actually navigate over to the search page, but in concert with dynamic search fields it offers a handy way of firing off a quick search.
Werd up.