-
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
Change default Wide width alignment for Media & Text block to normal width. #20941
Comments
I think so too!! |
I run into the same issue, and luckly I found your post and issue on this before spending too much time changing the CSS. I didn't even though not having alinewide is this easy. So please change this feature to something more understandable. |
Joen @jasmussen I have a feeling we have earlier discussed this but I thought I would bring it up with you again. |
I don't personally have a strong opinion here. It seems like a PR can fix it. |
Adjusting my initial idea to create a consistency with other blocks. Example. Adding a Group block or Columns block starts out with no alignment selected. One has to select either Wide width or Full width for the Group block to change alignment. Back to the Media & Text block. Then selects to either use the default content view or go with Wide width or Full width alignment. |
Have been looking into/working on this one. Some existing tests (here's one example) and blocks have no If I remove the So, I'm looking for the best way to fix that. Currently, checking whether it would work to create a deprecation to handle adding setting Any other recommendations/ideas welcome. Related: #16365 |
I've been thinking about this on and off since the previous comment. From what I can tell, The primary issue seems to be that it's unclear to users that alignment can be removed/cleared, which I don't think would be solved by changing/removing the default on this block. If I understand properly, any block that has a default other than "no alignment" would have similar UX difficulties. Unless there's a change of mind over what the best UX would be for the default alignment on Media & Text, I think it's probably better to address the issues with "unselecting" the alignment. See: #30782 and the mockups there for another example of user confusion/lack of discovery of the feature, and some more ideas of how to change the UX. What do you think? |
I think I may have been the source of those original mockups! Yes, I do think that there could be a space for adding an explicit "no alignment" option which is shown as toggled by default in cases like these. The option was explored as being added back in context of making it clearer that wide and fullwide alignments need theme support, and perhaps even in context of CSS-grid-based positions as superficially discussed in #16998. Looking back at those mockups, the only thing I'm waffling on is the help text that says "max 720px wide". Upon further reflection, we don't really add per-menu item help text like that in any other menus, so we probably shouldn't do that here either. Help text in menus, such as in the beginning or at the end of the menu such as what you see in the tools dropdown, can be fine to add if necessary. |
This PR: Show "none" as an alignment option and use contextual text to clarify settings |
Now that #34710 has landed, is this still necessary? My understanding behind this ticket is that the primary issue was that the alignment setting was unclear, because it wasn't obvious that the alignment was set and could be "unset". Now that it's possible to choose "none", and it's intended functionality for Media and Text to default to "wide", I think the question is: Is there a user benefit to setting it to "none" by default, or is "wide" still the best user default? I'm leaning towards closing this, but thought I'd check in on what folks thought first. |
Hey Mike @getsource I believe we can go ahead and close this issue. As we now have a "None" width alignment. Closing issue. Please reopen if need be. |
I think it's odd for Media & Text to default to something other than "none". It always trips me up when I use it, and I think it's the only block like this? |
FYI if you create a Media & Text block within a column the width button goes away, but the Media & Text block still has the It would be nice if the |
I am reopening this issue as I came across it again. Even made an issue without realizing I had this old issue. |
Default value today is Wide width. Default value should start out with None as width. |
It seems fine to default to none. |
I will go ahead and add the label good first issue. |
Removing the Good First Issue label as @Mamaduka mentioned that it might require block deprecation. |
I just received an e-mail from a client asking me how to adjust the width setting for the Media & Text block. I have earlier told him how but he had forgotten. So I checked this issue to see if there has been any movement. I see that @carolinan Carolina has begun a PR which is in draft mode. Thank you Carolina! I look forward to having this adjustments added to the Gutenberg plugin and later in core. |
@paaljoachim I have tried indeed, but I am still unable to solve the issue with the deprecation that was mentioned already in 2021. 😢 |
I will ping @talldan @aaronrobertshaw as they might have some advice regarding depreciations. |
Thanks for the ping 👍 At a quick glance, I suspect we need a deprecation with the original attributes definition (including the wide default for align), then migrate the block's actual attributes to set the align value to wide (where it was previously unset being the default). The deprecation would probably also require the I can take a closer look at #46971 tomorrow. |
#46971 doesn't include the deprecation; I never pushed it as part of the draft pr because it wasn't working. Feel free to ignore it; if there is an alternative, I will close it. |
@carolinan Can you elaborate further on how it wasn't working? Was the approach taken similar to my earlier suggestion? I'd like to make sure there isn't something I'm missing and causing us to retread the same old ground. |
I tried to implement it according to yours and Mike's comments, but I could not get the migration to work. It checked for the class name and set the alignment conditionally,... but it was never actually set. I think it was the implementation, not the idea. |
Thanks for clarifying 👍 I'm digging into the block's deprecations now. It might take a little while for me to grok it all given the lack of comments and the mix-and-match attribute objects. I've been working on my own custom branch so far but if I get something that works I can publish it and you can decide whether to roll it into yours or iterate on it separately. |
@carolinan I've run out of time today but have pushed a draft PR (#48404) that you might be able to work from. It needs more testing in terms of ensuring all the deprecations are working as expected and that I haven't missed anything. Hopefully, it helps. If you notice any issues with it we can continue the discussion over on that PR. |
I remember some previous challenges trying to change a block's default value. IIRC, the problem is that because the default value isn't serialized it's difficult to preserve the alignment for existing 'wide' media and text blocks. A migration will change them all to 'none'. For the group block, this PR used a default block variation to change the default layout value - #44176. I think that works because it only applies the new default to blocks as they're inserted. |
Thanks for the heads up @talldan 👍 All the more reason to give #48404 a thorough test and review. The existing blocks that were defaulting to What I was looking to test when I get back to this was ensuring that new blocks added don't falsely trigger the deprecation. The updated primary block fixture (which defaults I could well be missing something and happy to change the approach if needed. |
Awesome! |
I am just about to reply to this support issue https://wordpress.org/support/topic/make-media-and-text-block-normal-width-not-wide-or-full/
If I have understood it correctly the person is asking how to make Media & Text the standard same width as other blocks.
I am about to tell him that he needs to turn off the initial default Wide Width:
Then have no alignment width selected. As no alignment selected is the same as normal width.
I would also suggest having a Normal width alignment. So that a user can select Normal width to see that they are using the standard width.
ps
Normal width is really not a good word. It could instead be default/standard width.
Right now deselecting width is the same as = default/standard width.
EDIT:
Could be something like this:
Advantage:
There is an default alignment visible in the UI alignment options popup.
Showing that there is an alignment that starts out as default and the user can then just change to any of the options available.
There is always one alignment selected. One can not turn off all alignments.
As turning off alignment is really outside the consistency in choosing which alignment to use.
The wording as I thought about it is the page content width.
The text was updated successfully, but these errors were encountered: