Skip to content
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

Consider to abstract the description output #13

Open
afercia opened this issue Apr 24, 2017 · 2 comments
Open

Consider to abstract the description output #13

afercia opened this issue Apr 24, 2017 · 2 comments

Comments

@afercia
Copy link
Contributor

afercia commented Apr 24, 2017

The field description output does basically always the same thing and could be abstracted in a method. If I'm not wrong, it currently does a slightly different thing only in the case of render_settings_field_radio() and render_settings_field_multibox().

@felixarntz
Copy link
Contributor

@afercia I completely agree, and there are more areas that are similar across all of these functions.

I think we should eventually create a base class and then individual classes for each field type. This would provide a much better and more reusable codebase, and would also allow us to set a proper visibility for utility methods such as what you're proposing.

I'd like to leave the code as is for now and not outsource such parts, so that we can focus on the markup/CSS/a11y challenges. Code quality can come after we know what exactly we wanna do and how we wanna do it. :)

@afercia
Copy link
Contributor Author

afercia commented Apr 29, 2017

Sure, this is a general consideration and not an immediate priority 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants