themeum / kirki

Extending the customizer
https://kirki.org
MIT License
1.26k stars 328 forks source link

Adding Collapsible Controls #1187

Open LWS-Web opened 7 years ago

LWS-Web commented 7 years ago

Hi aristath,

this is no issue report, just some thinking done by me. Iam using "lots" of typography and spacing controls in some theme project in the moment. These control-types can have multiple fields. So both of these controls can be very long, and when you are using multiple in one section, it kind of can feel/look messy.

So I thought about having collapsible controls, at least for some kind of the controls.

I wrote a little plugin which finds the .customize-control-title elements inside the .customize-control-kirki-typography and .customize-control-kirki-spacing containers. It makes the .customize-control-title clickable to allow to toggle the .wrapper element.

A Gist with the code can be found here.

Some screenshots can be seen here: http://imgur.com/kF2bHXh http://imgur.com/OpSJqsD http://imgur.com/NVz4EMJ

Iam no JS guy, and also no PHP pro so please forgive the code ;)

I dont know if someone else needs this or if its a good idea. I also thought about using it with a custom field attribute, like 'type'=> 'checkbox', 'collapsible'=> 'true,'

Thanks for your time and also for Kirki! Have a good day!

kmob2 commented 7 years ago

I second this! The more fields I am adding to the customizer, the longer it gets. Just a few days ago I thought about collapsible fields as well. However I am having a lot of fields grouped together/nested, so a solution for collapsible fields as well the fields nested below would be amazing.

Thanks for your code.

aristath commented 7 years ago

Added in 3.0

aristath commented 7 years ago

This was causing #1310 so I am disabling the module by default. It can be activated if you want it, but until we figure out how to fix this changesets issue I wouldn't recommend it. 👍

aristath commented 7 years ago

Moving to the 3.1 milestone 'cause we have to get 3.0 ready for release at some point and constantly adding new features just delays the release further. 👍 The module will still be included in v3.0, it will simply be deactivated until we manage to figure out what's wrong exactly.

Radzio1615 commented 6 years ago

I really need this feature. Without this there is a mess if someone has a lot of settings. Are you finally find solution of the problem? Can we really expect it in 3.1 milestone?