Skip to content
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

Row block should provide option for mobile responsive like columns block #68433

Open
rinkalpagdar opened this issue Dec 31, 2024 · 8 comments
Open
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) [Feature] Layout Layout block support, its UI controls, and style output. Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.

Comments

@rinkalpagdar
Copy link
Contributor

Description

Row block should provide option to "Stack on mobile" just like columns, because currently row block cause overflow on mobile devices if "Allow to wrap to multiple lines" is not enabled.

Step-by-step reproduction instructions

  1. Add a row block
  2. Add 4 paragraphs inside it.
  3. Now check the front end on smaller devices like mobile.

Expected behaviour

It should have a "stack on mobile" option like the columns block.

Screenshots or screen recording (optional)

row-block-mobile-issue.mp4

Environment

  • WordPress: 6.7.1
  • PHP: 8.1.23
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins:
    • Gutenberg 19.9.0
    • Test Reports 1.2.0
@rinkalpagdar rinkalpagdar added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Dec 31, 2024
@Rishit30G
Copy link
Contributor

Thanks for raising the issue,
I could replicate this issue and understand that having 'Stack on Mobile' on rows would be a good choice
But I think we would be needing design review for this before working on implementing this feature.
However a quick workaround would be to have multiple columns with different layout options like (50,50), (33,33,33) etc to incorporate the row like design and then select the 'Stack on Mobile' option

Screen.Recording.2024-12-31.at.3.47.14.PM.mov

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Block] Group Affects the Group Block (and row, stack and grid variants) and removed Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Dec 31, 2024
@Mamaduka
Copy link
Member

The "Allow to wrap to multiple lines" option should allow you to achieve a similar effect. The Columns block predates modern CSS layouts like Flex and Grid. That's one of the reasons it has a unique "Stack on Mobile" setting.

TL;DR: Row and Grid blocks shouldn't mimic the Columns block but instead embrace the capabilities of modern CSS layouts.

cc @tellthemachines

Screenshot

Image

@rinkalpagdar
Copy link
Contributor Author

Hello @Mamaduka
The "Allow to wrap to multiple lines" option turns row items into the stack on the desktop screen itself. So this will not be useful for responsiveness.

@Mayank-Tripathi32
Copy link
Contributor

@rinkalpagdar @Rishit30G I’d like to work on this. I’ll have a draft PR ready and open in a few minutes.

@Mamaduka
Copy link
Member

@Mayank-Tripathi32, let's wait for more feedback before starting PR for this.

@Mamaduka Mamaduka added Needs Decision Needs a decision to be actionable or relevant [Feature] Layout Layout block support, its UI controls, and style output. labels Dec 31, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Jan 2, 2025

I think Adding the "Stack on Mobile" option feels like a temporary fix.

Perhaps instead of discussing a specific block, we should look at the broader picture and find the ideal solution? There have been many requests for a responsive option, and I think the following issues are similar to this one:

It may be best to close this issue and continue the discussion in the above issues.

P.S. It's worth checking out the responsive tools, one of the upcoming features mentioned in the State of the Word 2024. There, a demo shows how we can set block settings and block styles for each device preview (breakpoint).

It's mentioned at the 28-minute 59-second mark. https://www.youtube.com/watch?v=KLybH5YvIPQ&t=1739s

@hanneslsm
Copy link

It's mentioned at the 28-minute 59-second mark. https://www.youtube.com/watch?v=KLybH5YvIPQ&t=1739s

I know, off-topic, but was this anywhere discussed beforehand? Matias makes pretty big (and specific) promises here - I may have missed a proposal on Make or elsewhere…

@t-hamano
Copy link
Contributor

t-hamano commented Jan 5, 2025

was this anywhere discussed beforehand?

I may also have missed it, but I have not seen any such proposals or discussions. In fact, even reading through #34641 and #19909, it still seems like we are in the phase of debating the ideal approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) [Feature] Layout Layout block support, its UI controls, and style output. Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants