WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.32k stars 4.12k forks source link

Media & Text Block: Allow reversed stacking order on mobile. #26215

Open shoelaced opened 3 years ago

shoelaced commented 3 years ago

Is your feature request related to a problem? Please describe.

It is common to use an image-beside-text layout in situations where the content on the left looks better underneath the content on the right when stacked.

For example, the common layout of:

[image]   [text ]
[text ]   [image]
[image]   [text ]

It's common to want to stack it on mobile like:

[image]
[text ]
[image]
[text ]
[image]
[text ]

Currently this layout isn't possible.

Describe the solution you'd like

It would be great if the Media & Text block could have a "reverse stacking order" setting when "stack on mobile" is enabled. As a side note, stacking on mobile and reversing the order should ideally also be available on the Columns block.

Describe alternatives you've considered

Adding a class in the Advanced section (only works for bespoke sites...), or installing a whole other block plugin with better responsive behavior and disabling the default (which is what I usually do). However, neither is ideal for the average user when such basic functionality is needed.

cr0ybot commented 2 years ago

I would still like this functionality, even though it looks like the Media & Text block now defaults to placing the media on top when stacked (used to stack in the order displayed on desktop). We pretty much want the image on top 99% of the time on mobile, but it would be nice to have the option.

getdave commented 2 years ago

This forum user would also like this feature to be added

masperber commented 2 years ago

Requested by a WordPress.com customer in live chat.

MGParisi commented 1 year ago

Yep, it would be a very necessary option.

MelanieHayn commented 1 year ago

Agree. For our site, when we have text and media blocks, we want the text on top on mobile and the image on the bottom. Having a choice in the options panel would be ideal.

carolinan commented 1 year ago

I re-tested this with WordPress 6.2.2 (Gutenberg does not need to be activated) The option "Stack on mobile" puts the image first, no matter if the image is on the left or right side. I consider this solved.

getdave commented 1 year ago

I'm not sure. I understood that the request was for the ability to control the stacking order rather than "always keep the image on top".

masperber commented 1 year ago

@getdave I agree. This is not resolved.

getdave commented 1 year ago

@carolinan Respectfully I'm going to reopen this one. Let's see if someone is open to devising a UI control to allow switching this ordering.

shoelaced commented 1 year ago

Indeed and thanks @getdave. Although my example placed the image on top, I had meant to request a control, as there are plenty of use cases for either.

Sirjazzfeetz commented 10 months ago

3 years, sheesh! Sad that we even need to request. This is a basic and critical no-code design feature.

masperber commented 10 months ago

@Sirjazzfeetz remember that this is a community project. We're all equally responsible for adding needed features and correcting issues. :)

In that spirit, I've submitted a PR to resolve this.

sabernhardt commented 9 months ago

Trac 59944 has another request for putting the text above media.

In WordPress 6.4, I get a mismatch between visual order and DOM order when the media is on the right and then stacked on top for smaller screens.

video appears above text with a link, but the text is first in the DOM

For a toggle control, "Reverse on mobile" could be confusing. I think saying specifically "Media appears above text when stacked" (or something similar) would be clearer.