Update default value of constrain media setting #2266
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary:
Changes the default value of the
Constrain media to screen height
setting.Important: Could cause a visual change in existing themes for some users depending on product image sizes.
Why are these changes introduced?
Relates to #2052
The constrain setting was originally included with the default set to
false
. Which would prevent any visual changes. However, we intend for the setting to betrue
moving forward so this PR just changes that default value.We originally considered a softer rollout of this change, where we update the setting default in a subsequent release, but adding the desired end state now as a breaking change for a major release comes with less logistical overhead.
What approach did you take?
Updated default setting in the main-product and featured-product section schemas and also added the missing default in the product.json template.
Visual impact on existing themes
This is a visually breaking change.
Depending on the selected media width setting, the aspect ratio of the product images, and the end user's viewport dimensions, it is possible some product images will be scaled down to fit within the viewport. This will be most common with taller portrait images on relatively shorter viewports. Otherwise the effect of this change might not be immediately noticeable.
Before:


After:
Testing steps/scenarios
Demo links
Checklist