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

[28] Fixes container width and height values causing layout issues when changing theme or updating settings.layout.contentSize value in theme.json #38

Closed
wants to merge 7 commits into from

Conversation

PaulREnglish
Copy link

@PaulREnglish PaulREnglish commented Oct 7, 2024

Description

Issue: #28.

Assigns the Image Comparisons containerHeight and containerWidth values a default of null. This is to avoid an issue where the block won't scale to the new width if the settings.layout.contentSize setting in theme.json is changed and the user has not set a width yet.

Change Log

  • Fixes an issue where containerHeight and containerWidth values not specifically set the by user would not scale when the settings.layout.contentSize setting in theme.json would change.

Steps to test

  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 correctly in the editor and on the frontend

Screenshots/Videos

http://bigbite.im/v/KfN5NC

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Fixes an issue where editing settings.layout.contentSize in theme.json would not change the width of the block.
This was needed to fix 'Arrow function has a complexity of 12. Maximum allowed is 10' JS lint error
@PaulREnglish
Copy link
Author

Converting to draft as there is a few changes I need to implement to make some of the other tickets mentioned in #32 a bit easier.

This was needed to fix 'Arrow function has a complexity of 12. Maximum allowed is 10' JS lint error
@PaulREnglish PaulREnglish marked this pull request as ready for review October 8, 2024 08:58
@PaulREnglish PaulREnglish changed the title Fixes container width and height values causing layout issues when changing theme or updating settings.layout.contentSize value in theme.json [28] Fixes container width and height values causing layout issues when changing theme or updating settings.layout.contentSize value in theme.json Oct 8, 2024
@chrishbite
Copy link
Collaborator

Closed as superseded by #39

@chrishbite chrishbite closed this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants