-
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
Block Controls - rename align
to position
and repurpose align
to mean justify
#19672
Comments
align
to position
and repurpose align
to mean justify
I don't mind on surface changing these but justify means something so rather we don't use that term. For me this makes sense:
|
This makes a lot of sense to me in the way of terminology and how the current align functionality is more about positioning. I imagine this will cause the classes to change from |
That's a good point. This is obvious but if we do change those classnames, we'll just need to ensure backwards compatibility with all the themes that use those (both in the front end and editor). That's generally fine, but my only hesitancy is just that it'll require including a lot of extra CSS make that happen. |
If you had listened, back at the beginning, we wouldn't be in this now... #11881 Position also has a meaning in CSS, which doesn't match up with the new usage. |
@joyously Thanks for your feedback. This issue obviously has a history which I wasn't aware of. I'm ready and willing to work with you and others to help move this forward if there is broad support for it (and it seems like there is!).
I definitely take your point here. The question I'm asking myself is do most users think in terms of CSS? I appreciate As you mention another option could be "Layout".
Personally I think we may need to consider this. As things stand you can't have both "width" and "alignment" (read float left/right) applied together. The downside to splitting these would be adding additional buttons to the UI. |
It should be noted that There are at least 4 different things here:
|
Another thing to note is that floating, pulling out of the main column, and wide/full widths are all mutually exclusive: it doesn't make any sense to use two of these at the same time. Because of that, it may make sense to put them all in the same toolbar. However, they should probably still use more descriptive names and not just share the term "align". |
(Continued from my previous comment...) The options in this combined toolbar could be labeled as follows:
I have no idea what you would call this toolbar as a whole, though. Block flow options, perhaps? |
Even if users don't know what Position in CSS is, I still don't think you should use it because future enhancements might include actual position choices, such as relative, absolute, fixed, or sticky. |
Overall, I think accurate naming in general will help users understand the UI better. But I’m also super hesitant about backwards compatibility related to changing this. I personally feel it’s better to let Gutenberg control how these classes work exclusively. The only thing a theme designer is ever concerned with related to these classes is the resulting widths of a block once rendered. With just a few variables like Also want to point out that content widths are probably the only place where it might makes sense to do something like this. We already have a global I find that it’s too easy to break things when fiddling with or overriding the alignment classes especially with responsive styles which are really hard to solve in a theme. A lot of time you don’t even know you’re doing it wrong until much later when a class name changes in core or a new block gets introduced that needs to work differently. |
There is some discussion happening in #19944 which touches icon naming. It's not extremely critical that we get it 100% right at this point in time, because those icon names are easy to change. But in case you'd like to share input, it's a good opportunity to do so. |
Reposting #20689 (comment) here to get some feedback on some class name ideas: If we were to put them all under a single naming scheme, I'd go with something like this:
I'm not sure whether But I'm not convinced that different options should use the same naming scheme if they're technically different things. If we were to use more diverse names depending on what exactly the position/alignment/whatever actually is, I would go with something like the following:
I prefer this naming scheme since it's more concise, and doesn't try to fit a redundant, possibly incorrect word like "position" into the class names. |
In general the naming convention seems worth it to me — and "worth it" is something it has to be because it's a big change. I would avoid a |
The main benefit to something like this would be that it wouldn't interfere with any more generic classnames that older themes may be using. That said, I do agree... I think it's relatively (probably?) safe to just use these without a prefix. |
If these new alignments are opt-in, which they are in #20689, this might be a non-issue. I.e. we could make the opt-in be in the code rather than in the CSS with the prefix. |
@jasmussen Just checking in to see if this is a discussion/decision that still needs resolution? |
I think at this point it largely boils down to the feasibility on the implementation side. What's actually pragmatically possible at this point. Perhaps @tellthemachines has some insights? |
Originally posted by @mtias in #19386 (comment)
Description
(If I understand him correctly) Matias raised a point about potentially renaming
Block “Align” controls to “Position” and repurposing “Align” to mean something more akin to “Justify”.
To be clear, the new terminology would be:
space-between).
This would be a significant change because align is already in use to mean float / width.
Questions
See also this WP Slack "conversation".
The text was updated successfully, but these errors were encountered: