justintadlock / butterbean

A neat little post meta framework.
GNU General Public License v2.0
204 stars 31 forks source link

textarea description is below textarea instead of label #37

Open timelsass opened 7 years ago

timelsass commented 7 years ago

This isn't really an issue overall if no one else has a problem with it, but it seems odd that most of the controls follow for the most part the same presentation except for the textarea control.

It seems like 1 data.label, 2 data.description, 3 control was the overall arrangement that the controls stuck with, but the textarea control is 1 data.label, 2 control, 3 data.description - which makes it look strange if you are implementing text input fields and textarea fields in a section.

As a use case of why I needed it uniform from a development prospective, I needed the description to follow the label because I have a "sudo-tooltip" that hides/shows the description field in each of my controls to keep the interface less cluttered for my end users.

Obviously I just created a new control/template, but it felt like a few extra steps that I wouldn't want to take again in the future. I'll be happy to create a PR if you agree with this.

justintadlock commented 7 years ago

You only need a new template, not a new control. Templates are filterable via

apply_filters( "butterbean_control_template", $located, $slug );
justintadlock commented 7 years ago

As for changing, I don't know yet. I need to think on it a bit. I generally like my textareas like that, and not all other controls follow the same pattern (most do). It might be worth doing just for more uniformity.