The mocks for theme Seven have a treatment for fieldsets which displays the fieldset legend's inside the fieldsets. This is all nice and dandy and can be done with a span added into the legend to get browsers behave and obey our positioning. (See http://www.sitepoint.com/article/fancy-form-design-css/5/ for some fine tips).

The mocks show fieldsets this way (from http://d7ux.org/content):

The looks after the patch and the current looks of fieldsets (before patch) is as follows:

Now this would be all to good, but we have this little problem with collapsed fieldsets. This is how they look on a block configure form for example:

Even if we just fix this by not applying the margin to collapsed fieldsets, the label would jump in and out. We can call for the collapsed fieldsets to look like on the Meta tab (with a summary and More button as seen on http://www.d7ux.org/content/), but then how can we require all fieldsets to provide that?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bojhan’s picture

Issue tags: +Usability, +#d7uxsprint

Very interesting, I think its unlikely that we can go down the path of requiring every single fieldset to supply a summary. I am not even sure, if the proposed solution is any better then the current implementation. Because we somehow, make fields less important - which was exactly not the idea.

Gábor Hojtsy’s picture

Well, we can have them have the border all around and include the legend text inside and have the "More" action link at the end which would open up the fieldset (but do not have a summary). That would make you open/close fieldsets with an action link at the bottom right instead of the top. That would make fieldsets consistent with what was called pseudo fieldsets so far on the Meta page.

Bojhan’s picture

So I spoke with Mark about the current proposal, and it has some difficulties that we have yet to solve. For example the current collapsed state implementation - would mean in order to collapse a field in the administration area - you need to move to the complete right (while you are working on the left).

Where as field sets right now are used, for collapsing, grouping and more - we found out this interaction might not be very sufficient in the future. So the current proposal is to aim for something such as http://www.welie.com/patterns/showPattern.php?patternID=collapsible-panels . Which has several advantages, it moves the action of expanding to the left. It exposes the label, and it allows the same visual grouping as proposed by Mark if expanded ( we might add a color background to the fieldset title, but not required.

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
2.44 KB
53.79 KB

Here comes an updated patch then. Body fieldset still looks as above on the AFTER screenshot. Collapsible and collapsed fieldsets now hot the look explained by Bojhan. An example screenshot with a block configure screen:

Status: Needs review » Needs work

The last submitted patch failed testing.

Bojhan’s picture

Status: Needs work » Needs review
FileSize
77.66 KB

This is starting to look really nice! This will probably require some extensive reviewing, since we by default can't do fieldsets in fieldsets in core.

I attached a few issues I saw with spacing, but I wasn't able to find the CSS to fix it.

Gábor Hojtsy’s picture

Attached a test file for testing fieldsets. This is taken directly from Acquia Marina and contains an enormous number of fieldsets in all kinds of nasty nests. Just drop the file as theme-settings.php to a theme in D7 and get the fieldsets on the theme settings form. Not that this would be fieldset use we'd like to advocate, but it was an easy quick example.

Also, thanks to how I devised this fieldset test, I figured out that theme setting pages were not actually working due to a callback inherit expectation that was not fulfilled anymore.

Here is one screenshot before and two screenshots after the patch, so you get how it looks.

BEFORE:

AFTER:

Status: Needs review » Needs work

The last submitted patch failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
2.44 KB

Ah, huh, scratch the patch in #7, that was totally the appearance page patch from #491214: implement the top level Appearance / Choose Theme admin page. That settings page issue only crept into my dev environment due to that patch, so no need to fix it here. Back to the v2 patch above.

Status: Needs review » Needs work

The last submitted patch failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
3.13 KB

The issue with the patch was that the simpletest tests did not use asText() on the fieldset label when comparing (but did use it elsewhere), so the test groups were not identified properly. With added asText(), we can use markup inside the legend as the patch does, and the correct label name is identified still.

Also, tried to address the alignment issues raised by Bojhan. Hope this will be all right.

Gábor Hojtsy’s picture

Note that the reason I work on this so closely is that this would lay down the UI element for the node meta tab too, so we'd have a consistent UI across the collapsible/collapsed areas.

Bojhan’s picture

FileSize
3.13 KB

A 1px fix.

yoroy’s picture

Status: Needs review » Reviewed & tested by the community

I applied the patch in #13. here's a before/after in Firefox on OS X:

before:

after:

Looking good.

Dries’s picture

I really like how the the fieldsets look when collapsible -- both collapsed and unfolded. However, when they are not collapsible, the fieldset title is black and it somewhat looses some of its emphasis/readability compared to the blue fieldset titles. It also looks a bit funny when you have collapsible and non-collapsible fieldsets on the same page. I might be bike shedding here, but I wanted to point that out nonetheless.

Bojhan’s picture

Totally bike shedding. :P It does lose some of its emphasis, but I am unsure how much of that is fixable with our solution.

markboulton’s picture

Looks good to me.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Alan D.’s picture

FileSize
9.66 KB

Moving this issue from Initial D7UX admin theme#131.

I haven't traced the patch queue, so this may be resolved, but the fieldsets on IE8 & IE8 in IE7 mode are all messed up. The following screenshots show this. The autocomplete was a cut n paste from taxonomy module into the dblog module.

Running windows xp sp3 / drupal 7 straight from head 13-08-2009. They appear fine in FF3.5

The CVS tags were:
style.css,v 1.9 2009/08/12 23:51:19
template.php,v 1.2 2009/08/12 11:32:07

I posted a related issue about the autocomplete part of this issue for the Garland theme here: http://drupal.org/node/171953#comment-1919258

Alan D.’s picture

Status: Fixed » Needs work

Forgot to change the status

dboulet’s picture

dboulet’s picture

Status: Needs work » Needs review
FileSize
1.5 KB

The only way that I found to have the fieldset legends appear consistently in all browsers was to add conditional styling that adds fieldset legend a, fieldset legend span { top: 0; left: 0; } in IE only. I know this is an ugly solution, but I thought I'd post a patch to get some ideas rolling.

Status: Needs review » Needs work

The last submitted patch failed testing.

mrfelton’s picture

@dboulet:, that is better for ie7, much better... but not perfect. When the fieldset is closed, about 95% of fieldsets top border is missing. In FF it's perfect.

dboulet’s picture

IE bugs are being worked on in another issue, see #676800: Fieldsets break design badly.

dboulet’s picture

Status: Needs work » Fixed

Now that browser compatibility has been sorted out, setting status back to fixed.

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -#d7uxsprint

Automatically closed -- issue fixed for 2 weeks with no activity.