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

Container width and height values will cause layout issues when changing theme or updating settings.layout.contentSize value in theme.json #28

Open
chrishbite opened this issue Sep 6, 2024 · 1 comment · May be fixed by #39
Assignees
Labels
bug Something isn't working

Comments

@chrishbite
Copy link
Collaborator

chrishbite commented Sep 6, 2024

Expected Behavior

The Image Comparisons containerHeight and containerWidth values should avoid being set to numeric values unless specifically set by a user, this will allow for the block to scale with the themes settings.layout.contentSize value in theme.json when changed.

Actual Behavior

When an Image Comparison block is added the containerWidth attribute is set to the value of settings.layout.contentSize from the themes theme.json, if you then change theme or edit the value of settings.layout.contentSize in theme.json the Image Comparison block won't scale to the new width in the editor or on the frontend.

Step-by-step reproduction instructions

  1. Add an Image Comparison block
  2. Add both images
  3. Save
  4. Increase the settings.layout.contentSize value in theme.json
  5. Refresh page
  6. See that the Image Comparison block is now displaying incorrectly in the editor and on the frontend

Screenshots, screen recordings, code snippets

N/A

System Information

  • Browser: Firefox Developer Edition 131.0b2 (aarch64)
  • WordPress version: 6.6.1
  • PHP version: 8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants