Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think that the current UI for the expert field template is very confusing because you have lots of fields that you probably don't need because the corresponding checkbox isn't checked.
That was the reason for writing a small patch which adds the #states
to all wrapper fields.
Before the patch was applied:
After the patch was applied:
And here you can see how it looks like when checking a checkbox:
Comment | File | Size | Author |
---|---|---|---|
#7 | ds_expert_styles.jpg | 98.13 KB | froboy |
#7 | ds-hide_unnecessary_wrapper_fields-1931216-7.patch | 4.02 KB | froboy |
#4 | Screen Shot 2013-03-05 at 00.04.54.png | 140.3 KB | yannickoo |
#3 | Screen Shot 2013-03-04 at 19.51.02.png | 61.87 KB | swentel |
#1 | ds-hide_unnecessary_wrapper_fields-1931216-1.patch | 3.41 KB | yannickoo |
Comments
Comment #1
yannickooComment #2
Hydra CreditAttribution: Hydra commentedThis looks like a good usability improvement to me. Code is fine and working like expected. Nice usage of the already existing checkbox :)
Comment #3
swentel CreditAttribution: swentel commentedI'm going to be annoying here - but I do like the idea, it's been bothering me a lot as well.
I like the idea, but let's try to fix the following then too:
I'll have a look myself after next week unless someone beats me to it.
Comment #4
yannickooI think we could add a new checkbox called "Label" what do you think? What do you mean by colspans? I cannot see any colspans...
Comment #5
davidneedhamGreat idea. I'm seeing the same problem as @swentel in terms of the wrapping, though it's completely unrelated to this particular issue.
I went ahead and created a separate issue for that #2009496: Expert field template has broken styles in the admin
(Though, if it can be fixed here, why not?)
Comment #6
swentel CreditAttribution: swentel commentedComment #7
froboyWe should get this going again...
I'm not sure how to solve swentel's issue with the label fields, but I've added some styling to the rest that I think makes things much better. I've also added
overflow:auto;
to the .ft-group css so that the clearfix's are no longer necessary. I've also fixed the funky wrapping with awhitespace:normal;
to override thenowrap
from the system css.I've rolled those changes with the patch from above.
Comment #8
yannickooCool! Tested your patch and
overflow: auto;
works but I don't know whether the border is a good solution :/ Let's see what swentel thinks about that :)Comment #9
aspilicious CreditAttribution: aspilicious commentedcan your provide a patch and screenshot without the border?
Comment #10
yannickooStrange, just tested my patch form #1 and it works fine.
I guess that adding an
overflow: auto;
andwhite-space: normal;
is not necessary :/Comment #11
froboySame shot, with and without borders. I still think they help clarify the sections.
yannickoo, have you tried resizing your browser window? It might look ok when you're wide enough to see everything in one line, but as soon as the fields start wrapping things look funky without those styles. Also,
overflow:auto
is generally good practice when you have a div containing floats.Comment #12
aspilicious CreditAttribution: aspilicious commentedThis on top of my list together with the label wrapper. Will fix this when I have some time.
Comment #13
aspilicious CreditAttribution: aspilicious commentedtagging for sprint
Comment #14
aspilicious CreditAttribution: aspilicious commentedFixed this, needs porting
Comment #15
aspilicious CreditAttribution: aspilicious commented