mrwweb / useful-block-styles

Simple block styles you frequently need for the WordPress Block Editor
GNU General Public License v3.0
4 stars 1 forks source link

New Styles: Gallery Ideas #16

Closed mrwweb closed 2 years ago

mrwweb commented 3 years ago

After running into these needs a bunch, I'm thinking about common gallery styles I've needed:

@rtvenge Do you think that fits with this plugin or is that more of a separate thing. At one point, we mostly agreed that this would only focus on text styles. Maybe it should? I'm torn.

rtvenge commented 3 years ago

@mrwweb Hmm, per you on #11:

"stick to styles that are useful utility classes (small, single purpose) and mostly for Text blocks."

I think these are small and single purpose changes. 😄 I think if you did anything more to it, that might be pushing it.

Can you apply multiple styles to a block? If so, I could see that being an issue. I could see wanting two of these styles on one block.

mrwweb commented 3 years ago

You can't combine block styles which is super annoying. So to do what we both would ideally want you'd have to add:

Gross. It's certainly possibly to manually add the additional classes in the Advanced Selectors field, and it's also possible to make Block Patterns (sidebar tab) and Block Variations ("new" blocks in the inserter) with multiple classes. So it's not that hard for someone who "knows what they're doing", but it's not exactly user-friendly and requires going out of the existing UI this plugin provides.

The Gutenberg issue to watch is https://github.com/WordPress/gutenberg/issues/14598 but it seems low priority and to have little movement.

You've convinced me this could live in this plugin, but I'm annoyed by how overcomplicated implementation might be. Maybe we just provide Icon with "Unstretched" included by default, Grayscale, Unstretched, and then Icon Grayscale. Four doesn't seem terrible.

rtvenge commented 3 years ago

@mrwweb I think multiple styles is a bit of an edge. Your combined options above seem like a good middle ground. I could also be convinced to not have any combinations. 😄

What is the Icon version?

mrwweb commented 3 years ago

The icon style would force every image to a low max width (140 or 150px) which is often even smaller than the "Thumbnail" size. I realize now that I referred to that initially as "Small Images." However, I'm tempted to call it Icon Size instead or something, since that's really the only use case I can think of.

rtvenge commented 3 years ago

@mrwweb Ah 🤦🏻‍♂️ Yes, the 150 width one. 😄

"Icon Size" is better; more descriptive for what it does.