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:
ds-field-template-expert-before.png

After the patch was applied:
ds-field-template-expert-patched.png

And here you can see how it looks like when checking a checkbox:
ds-field-template-expert-patched-1.png

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yannickoo’s picture

Status: Active » Needs review
FileSize
3.41 KB
Hydra’s picture

Status: Needs review » Reviewed & tested by the community

This looks like a good usability improvement to me. Code is fine and working like expected. Nice usage of the already existing checkbox :)

swentel’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
61.87 KB

I'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:

  • Figure out if we can do the same with label (maybe hide by default and show once there's a label in it)
  • Fix the alignment on DS fields, e.g. title, see screenshot - I *think* it has something todo with colspans

I'll have a look myself after next week unless someone beats me to it.

yannickoo’s picture

I think we could add a new checkbox called "Label" what do you think? What do you mean by colspans? I cannot see any colspans...
Screen Shot 2013-03-05 at 00.04.54.png

davidneedham’s picture

Great 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?)

swentel’s picture

Category: feature » task
froboy’s picture

Status: Needs work » Needs review
FileSize
4.02 KB
98.13 KB

We 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 a whitespace:normal; to override the nowrap from the system css.

I've rolled those changes with the patch from above.

yannickoo’s picture

Cool! 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 :)

aspilicious’s picture

can your provide a patch and screenshot without the border?

yannickoo’s picture

Strange, just tested my patch form #1 and it works fine.

I guess that adding an overflow: auto; and white-space: normal; is not necessary :/

froboy’s picture

FileSize
185.86 KB
179.15 KB

No bordersBorders

Same 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.

aspilicious’s picture

This on top of my list together with the label wrapper. Will fix this when I have some time.

aspilicious’s picture

Issue tags: +sprint-nascom-2013

tagging for sprint

aspilicious’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Issue summary: View changes
Status: Needs review » Patch (to be ported)

Fixed this, needs porting

aspilicious’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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