Quick Tabs for D6 beta release - now with Views 2.0 integration, but was it worth it?
At last I overcame my fear of Views 2.0 and have added it to my D6 effort for Quick Tabs. (Previously my D6 version only allowed you to add blocks to your tabs.) My colleague, Hubert a.k.a. couzinhub, having quickly jumped in and familiarised himself with the wonders of Views 2.0 (well, after all he did help with the UI), helped me out with a very enthusiastic run-though of displays, overriding default displays, etc. and generally getting an overview of the lay of the land in the beta4 release of this super-module.
As far as Quick Tabs integration went, all I needed was a way of providing a drop-down list of all available Views so that people could add one for display in a tab. I had previously used the views_build_view() function then to display the view. There were a couple of hiccups in getting this to work in Drupal 6. Views_build_view() no longer exists but there is views_embed_view() which is slightly different because of the fact that you now have different displays per View. Probably the biggest challenge was getting a dependent drop-down to show all the displays for whichever View is selected. Let's just say I had an interesting journey through the Forms API, after my initial naïve effort that simply used AJAX to replace the options in the drop-down (synopsis: you can't add new elements or even select options to Drupal forms via AJAX without telling Drupal about them - see here for more info: http://drupal.org/node/150859). And the end result is a Quick Tabs creation form which may well get the prize for highest concentration of AJAX and AHAH craziness - which is not necessarily a good thing, as I'm worried my issue queue will prove soon enough.
Actually, the real low point came after I had done the bulk of the work and then suddenly it seemed that the new Views was so powerful it totally reduced the benefit of being able to add a View directly into a Quick Tabs block over just adding that View's block display (i.e. just adding a block that happens to come from a View). Well, fortunately, that's not quite true. The ability to use the same View in multiple tabs but passing in different arguments each time (an example of which is the "My Favourite..." QT block in my right sidebar) is, I think, justification enough for my continuing to include Views integration in Quick Tabs. I'm looking forward to feedback on this question.
Next on my to-do list: SimpleTest unit tests for Quick Tabs. And I might even request some Drupal Tough Love for it... if I dare!