-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapsable groups #59
Conversation
This is a cool concept, but looks like it could still use some tweaking. When I add a new group, the new group(s) is/are not collapsible, so that JS that triggers the collapsible stuff needs to be applied to each new group that is added. Also, I would prefer if we stuck w/ the class-based selectors and gave the h3 the cmb-group-title class. |
Also, there needs to be some styling accommodations for repeatable groups in the sidebar: http://b.ustin.co/1fHSy |
Collapsing the groups doesn't work with ajax right now. Any idea what js function needs to be called to refresh this? I can add the classes back in. I think I removed them originally because of some funky styling that was being applied. I didn't really want to get into writing more css with this. It seems like we should be able to get away with writing very little css if we are smart about our usage of the built in classes/ids. Good call on the sidebar I never bothered trying this in the sidebar just with some custom code and the example functions. What kind of behavior would be preferable when new fields are added? Default to collapsed or accordion style where the other groups are collapsed something else? I am open to suggestion here. I tried to keep this patch pretty minimal and get some feedback before going to far with changes. I don't want to be stuck maintaining my own fork. |
Fixed the ajax toggles and everything gets rebinded correctly. There is the side effect of the drag and drop appearing to work but not actually saving the box order. It also isn't bound to the parent container so you can drag and drop outside of the containing metabox. This might be a separate issue or we can just try to get all the wonkyness of this change ironed out under the one issue. |
Trying to avoid the use of box-sizing. What IE version does WP support?
Haven't really had any time to dig into the plugin recently but I did find out that removing the "hndle" class from the h3 disables the drag and drop functionality. Could we get this merged in once the drag and drop is removed? The collapsing is really a live saver on large repeatable groups. |
@cluke009 You're saying this is good to go, or still needs work? If wo, what work needs to be done? |
Should be good to go. Pretty sure I addressed all the issues raised. If there is anything I missed just let me know. |
@cluke009 Do you think you could update your PR after merging from master again? Some things have changed to repeatable groups, so your PR will break things as-is. |
Took a bit to fix the conflicts but everything is working again. Hopefully we can get this in soon as there are some other issues I would like to tackle. |
Thank you and nice addition! I updated a couple styling things, and added a 'remove' icon/button to the group title bar. |
Re: "other issues I would like to tackle", you can always create a new branch off of this repo's master and do a pull request w/ that branch. Then you could work on more than one thing simultaneously. |
Set up CMB2 to utilize the built in wordpress collapsable metabox styling on group fields #58