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

Layout panel options cannot be edited across multiple blocks without data loss #41260

Open
cbirdsong opened this issue May 23, 2022 · 3 comments
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended

Comments

@cbirdsong
Copy link

cbirdsong commented May 23, 2022

Description

When editing multiple layout-enabled blocks, the layout panel applies the first block's layout settings to all subsequent blocks once any layout setting is changed.

Step-by-step reproduction instructions

  1. Add multiple buttons or row/stack group blocks to a page, and set them to have different justifications in the Layout panel of the sidebar.
  2. Select them all, and change the wrap or orientation setting.
  3. Note how your previous justification settings have now all been removed and replaced with the settings from the first block.

Screenshots, screen recording, code snippet

Videos

CleanShot.2022-05-23.at.10.13.51.mp4
CleanShot.2022-05-23.at.12.12.33.mp4

Sample code

Buttons blocks:

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"right"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">1</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">2</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">3</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">1</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">2</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">3</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"left"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">1</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">2</a></div>
<!-- /wp:button -->

<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link">3</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

Group/row blocks:

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
<div class="wp-block-group"><!-- wp:paragraph -->
<p>Lorem</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>ipsum</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>dolor</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>sit</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>amet</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:paragraph -->
<p>Lorem</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>ipsum</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>dolor</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>sit</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>amet</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left"}} -->
<div class="wp-block-group"><!-- wp:paragraph -->
<p>Lorem</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>ipsum</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>dolor</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>sit</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>amet</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

Environment info

Wordpress 5.9.3, both with Gutenberg 13.2.2 activated and without it.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@justintadlock justintadlock added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels May 24, 2022
@cbirdsong
Copy link
Author

Can confirm this is still an issue in the 6.2 beta.

@c24b
Copy link

c24b commented Jul 1, 2023

Up! Same problem with 6.2 and 16.1.0

@skorasaurus skorasaurus added the [Feature] Layout Layout block support, its UI controls, and style output. label Sep 13, 2023
@cbirdsong
Copy link
Author

Still an issue in 6.4 and the 6.5 beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended
4 participants