-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Input field: Additional Class as a textarea #19367
Comments
I think the field is an input because new lines are not allowed in HTML classnames. |
Probably, but there are PHP solutions for it, i guess. |
I wonder if tags would make for a better experience, either within a textarea or under the input. |
@StevenDufresne ; exactly this is even better. Take a look at how Editorskit plugin handles the Class field; it's amazingly good. Even more if we can add class suggestions, which add to the autocompletion. Last week on a WordPress Meetup, i dropped this idea and someone made this autocomplete field: <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> In this strange are of Gutenberg, where every other Gutenberg plugin makes it's own standard; the class field can play a huge role in getting the right standard way sooner. It will not be a non-tech user feature, but it would make a foundation for it. When custom Gutenberg features spit out classes; which can be viewed over there. |
We chatted about this in today's design meeting (Slack link). We discussed that it'd be an interesting idea to explore, as this would improve readability of individual classes added. It's worth noting that this is an advanced usage area, that not many folks will use - but those who do use it would like to see what classes they've applied to the block. In its current form it's quite difficult to see the applied classes, as they're in a singular input field. Let's move forward with mockups to start feeling it out. 💪 |
Fantastic! |
What needs to be done here to move this issue onward? |
@paaljoachim if there's a bit of consensus on the design proposal, we can relabel this with "needs dev" and move it on. |
It looks like a good idea to move forward with. I adjusted the labels. |
In case this ever gets traction, I've done some testing and I feel that the typical "token" or "tag" style input field is not super easy to use for adding classes. I sometimes like to add classes in a logical order, or to change a suffix (ie: |
I started out with Tailwind; and it's amazing.
But the input field for additional classes in Gutenberg blocks is so small; i hope this input field could be a textarea field to have a better overview of entered classes.
Valid feature request?
The text was updated successfully, but these errors were encountered: