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

Calendar: Attribute classes/styles are printed twice #43652

Open
ndiego opened this issue Aug 26, 2022 · 0 comments · May be fixed by #43653
Open

Calendar: Attribute classes/styles are printed twice #43652

ndiego opened this issue Aug 26, 2022 · 0 comments · May be fixed by #43653
Assignees
Labels
[Block] Calendar Affects the Calendar Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@ndiego
Copy link
Member

ndiego commented Aug 26, 2022

Description

In the Editor, styles and classes generated by block attributes are generated twice for the Calendar block, once on the block wrapper and again on the server-side rendered component.

Up until recently, the Calendar block had no attributes other than className. Therefore, this bug was not much of an issue. However, as we start adding dimension and color support, issues emerge.

In the case of spacing controls, padding and margin get applied twice. Therefore we cannot implement this functionality without first fixing this issue.

Step-by-step reproduction instructions

  1. Add a Calendar block.
  2. Set a custom class. In the screenshot below I added table-class.
  3. Confirm that this custom class is printed twice, once in the wrapper div, and then again on the div inside of the disabled component.

Screenshots, screen recording, code snippet

image

Environment info

  • WordPress 6.0.1
  • Gutenberg nightly

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

@ndiego ndiego added [Type] Bug An existing feature does not function as intended [Block] Calendar Affects the Calendar Block labels Aug 26, 2022
@ndiego ndiego self-assigned this Aug 26, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Calendar Affects the Calendar Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant