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

Styles sidebar: Site logo spacing controls are reset on saving #50940

Closed
carolinan opened this issue May 25, 2023 · 3 comments · Fixed by #50956
Closed

Styles sidebar: Site logo spacing controls are reset on saving #50940

carolinan opened this issue May 25, 2023 · 3 comments · Fixed by #50956
Assignees
Labels
[Feature] Layout Layout block support, its UI controls, and style output. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

carolinan commented May 25, 2023

Description

When I try to use a global styles preset for margin for the site logo block, the control in the styles sidebar is reset when I save.

Update: same with padding.

Step-by-step reproduction instructions

  1. Activate a block theme. I used Twenty Twenty-Three.
  2. Add a site logo block with an image.
  3. In the Site Editor, Styles sidebar, select the site logo block.
  4. In the dimensions panel, select a spacing preset. Either one for all sides, or individual size.
  5. Save the style changes
  6. See that the control is reset, but in the preview in the site logo panel, the margin is applied.

Screenshots, screen recording, code snippet

Screen.Recording.2023-05-25.at.09.18.11.mov

Environment info

No response

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

@carolinan carolinan added Needs Testing Needs further testing to be confirmed. [Block] Site Logo Affects the Site Logo Block labels May 25, 2023
@carolinan carolinan changed the title Styles sidebar: Site logo margin controls are reset on saving Styles sidebar: Site logo spacing controls are reset on saving May 25, 2023
@dogwonder
Copy link

I've also been able to replicate this. I tested it on a vanilla install of 6.2.2, Twenty Twenty-Three theme and 15.8.1 version of Gutenberg plugin

The margin and padding did not persist in the settings panel when applied in the Global Styles context.

Steps taken to test the issue:

  1. Activated 2023 Theme
  2. In site editor, I navigated to Template parts > Header
  3. Edited header and added a site logo to the header and moved it as the first block
  4. In global styles I set the logo to max padding and margin. The styles were not saved.
  5. In the preview (admin and front-end) the margin and padding is applied.
  6. Re-applying the padding applies it somewhere but the settings do not reflect the current state

Screenshots, screen recording, code snippet

CleanShot 2023-05-25 at 10 50 47@2x
Screen.Recording.2023-05-25.at.10.51.43.mov

@t-hamano
Copy link
Contributor

This problem can be seen in other blocks, so maybe it is occurring in all blocks.

f5180c8479699396c134f82729dfe82d.mp4

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Layout Layout block support, its UI controls, and style output. and removed Needs Testing Needs further testing to be confirmed. [Block] Site Logo Affects the Site Logo Block labels May 25, 2023
@t-hamano
Copy link
Contributor

I have identified the cause. I will submit a PR in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
4 participants