Is there a reason collapsible fieldsets is used *only* on the main settings page? What about the users setting page? That is really long and would benefit. And the uploads setting page, as you add more roles, that page can get really long too.
I think we should add this feature to all standard Drupal settings pages that are long like the settings page... it really helps and would make things look more consistent, instead of "why the heck is this on one page and not them all?".
Need to get this into the next release as well to be consistent with the approach of this new feature.
Comments
Comment #1
m3avrck commentedI've gone through all of the settings pages for the included default Drupal modules and have applied the collapsible form fix. This really does make a *huge* difference... it makes the Settings interface more consistent and greatly improves readability. Let's get this one in! :)
Comment #2
Souvent22 commentedInstalled, and used the patched. Worked great. Much needed. :). +1
Comment #3
chx commented-1 and +1 at the same time. +1 but only after the forms API is in -- it'd be better if we won't break the fastly evolving patch.
Comment #4
m3avrck commentedBeat me to the post :) I just was reviewing the Forms API patch and realized this one is no longer applicable if that goes through.
chx, can you include the fixes in this patch with the forms api? it just makes a few extra menus 'collapsible' which with the new API, requires even less code change, haha!
Comment #5
m3avrck commentedRerolled against HEAD.
Since it seems the FORM api is going to go in *after* the freeze, this should go in now, so before any of the forms are updated to the new API (so this change is accounted for later instead of having to do another patch :))
Comment #6
m3avrck commentedWaiting for the Forms API commit now.
Comment #7
m3avrck commentedUpdated patch to work with the new Forms API. With chx's +1 from above I'd say this one is ready :-)
Comment #8
Stefan Nagtegaal commentedI *love* this! :-)
Comment #9
chx commenteddrupal.org/patch/review
Comment #10
m3avrck commentedi'm confused, what is wrong with the patch? i'll fix it if you can be more specific, i can't fix it i don't know what is wrong.
Comment #11
Crell commentedWhile I agree that nearly all fieldsets should be collapsable, perhaps even by default, I do not agree with making so many of them collapsed by default. Frankly I dislike the admin/settings page right now, on the grounds that it's default appearance is now, um, useless. Sure it's short, but there's *nothing there* that is of any use to me until I start opening sections. I'd much rather have the first few "major" ones open by default and the rest closed.
Similarly, in this patch the upload.module settings page is collapsed by default. There's only a single fieldset on the page, and it has only a single field in it. So why is it collapsed by default, adding another click to my task every time I want to change that *one setting*? There's no improvement there, but a regression.
So -1 from me on this patch, and a request that we not get so carried away with the collapse=true setting. :-) Overusing it is dangerous, and I think we already are.
Comment #12
m3avrck commentedCrell I agree completely. I was trying to be consistent with the current approach.
But the biggest problem with Drupal is it is not consistent with how it implements things so that was the reason for this patch, to at least make it consistent.
However, I do think we need some sort of *rule* for settings, so I propose this:
On settings pages, if there is only one fieldset, it should be set to collapsible but be open by default. If there is more than 1 fieldset, then all fieldsets should be collapsed for maximum readability and scanning (e.g., no scrolling), unless the first fieldset is relatively compact, in which case, it may be open.
My patch updates drupal to such a convention. Let's get talking and then commit this (or similar).
Comment #13
pfaocle+1 for m3avrck's suggested guidlines, and the patch seems to work fine.
There was some strange edits in the above patch, here's a revised one.
Comment #14
pfaocleArgh - ignore that one, problems with line breaks again. Two mins...
Comment #15
pfaocleThat got it.
Comment #16
Crell commentedI agree that there needs to be some sort of standard for how to use collapsing fieldsets, but I'm not sure I agree with the one proposed. It's not always easier to scan the fieldsets when they're closed. Fieldset legends are not always the most descriptive :-), and not every page uses fieldsets in the first place.
Comment #17
m3avrck commented4 months later, here is a newly updated patch and improved rules :-)
And here's the patch. Note, in this process I cleaned up the formatting of a majority of the forms code in core. Just formatting, *no* actual changes.
So what's the big deal? Apply this patch. Notice instantly how much more usable most of core is. Why's that? Simple, it adheres to the first rule of usability, be consistent otherwise you confuse your users. Not to mention, beautiful code is easier to tinker with ;-)
Comment #18
m3avrck commentedbad patch, here's one that works.
Comment #19
m3avrck commentedAnd an even better one that doesn't accidently reencode a few strings, doh utf-8!!! ;-)
Comment #20
m3avrck commentedfixed one more after talking with rkerr.
Comment #21
m3avrck commentedoops wrong one again, doh! i'm too tired, last one for tonight.
Comment #22
rkerr commentedPatch applies and works as advertised. I think this is a good addition as it enforces consistency in the display of fieldsets.
+1
The specifics of exactly which fieldsets are collapsed can be discussed further but I think the consistent behaviour is worth having.
Comment #23
m3avrck commentedUpdated against HEAD.
Comment #24
m3avrck commentedUpdated against HEAD.
Comment #25
m3avrck commentedOk new rules after talking with Morbus and Steven:
This new patch adheres to these changes and fixes formatting for a few forms.
After this, forms docs will be updated, and another patch will go into clean up the formatting of forms, along with removing redundant #collapsible ... make patches in small, editable chunks...
Comment #26
m3avrck commentedUpdated patch, was missing 2 fieldsets.
Comment #27
m3avrck commentedUpdated against HEAD.
Comment #28
webchickI tend to agree with Crell on this, although it sounds like if Steven is in your camp we're outnumbered. ;) But imo, the first fieldset of settings pages should *always* be expanded, regardless if it's long or not, because otherwise pages like admin/settings are completely useless until you start clicking around on things.
As for the functionality of the patch, I tested it on a new HEAD install with all core modules enabled. Looks like the following got missed (there are multiple fieldsets, and all are expanded):
- drupal
- menus
- search
- statistics
But then these settings pages look strange in comparison because they have no fieldsets, collapsible or otherwise:
- aggregator
- blogapi
- content types (though wouldn't really fit)
- posts
- profile (though wouldn't really fit)
- throttle
Honestly not sure what the best policy is here, but things still feel inconsistent.
Comment #29
drummI'd like to see these guidelines posted in the handbook first and patches posted separately since the design of each form stands on its own.
Code style- there needs to be a comma after every line of each array element, even the last one.
Comment #30
coreb commentedmoving from x.y.z to 6.x-dev version queue
Comment #31
webchickMarked http://drupal.org/node/97478 a duplicate of this bug; the patch there might be a better starting point for 6.x; not sure.
Comment #32
Crell commentedIs this even still relevant with the refactored admin pages in Drupal 5? I'm inclined to mark won't fix / no longer relevant unless someone tells me not to. :-)
Comment #33
Crell commentedIt's been a week and no one has told me not to. Feel free to reopen if still relevant.