Skip to content

Gallery Block: Fix equal column gallery image sizes#2534

Draft
mukeshpanchal27 wants to merge 2 commits into
feature/2449-gallery-blockfrom
fix/2449-equal-column
Draft

Gallery Block: Fix equal column gallery image sizes#2534
mukeshpanchal27 wants to merge 2 commits into
feature/2449-gallery-blockfrom
fix/2449-equal-column

Conversation

@mukeshpanchal27

@mukeshpanchal27 mukeshpanchal27 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Part of #2449

Relevant Technical Choices

Ensure that the number of images added matches the Gallery block's configured column count.

How to Test

  1. Add a Gallery block.
  2. Insert 3 images and make sure the Columns setting is set to 3.
  3. Verify that the image sizes.
  4. Repeat the test with 6 images while keeping the Columns setting at 3.
  5. Verify that the image sizes.

Before

Screenshot 2026-06-12 at 10 30 24 AM

After

Screenshot 2026-06-12 at 10 29 45 AM

In follow-up PR will fix the sizes for other column settings.

  • Add unit tests

Use of AI Tools

N/A

@mukeshpanchal27 mukeshpanchal27 self-assigned this Jun 12, 2026
@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature no milestone PRs that do not have a defined milestone for release [Plugin] Enhanced Responsive Images Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes) labels Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.13%. Comparing base (b1608b2) to head (de04562).

Files with missing lines Patch % Lines
...ns/auto-sizes/includes/improve-calculate-sizes.php 62.50% 6 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/2449-gallery-block    #2534      +/-   ##
==============================================================
- Coverage                       69.14%   69.13%   -0.02%     
==============================================================
  Files                              90       90              
  Lines                            7723     7739      +16     
==============================================================
+ Hits                             5340     5350      +10     
- Misses                           2383     2389       +6     
Flag Coverage Δ
multisite 69.13% <62.50%> (-0.02%) ⬇️
single 35.56% <62.50%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mukeshpanchal27

Copy link
Copy Markdown
Member Author

@westonruter I'd appreciate any initial feedback you can provide on the PR when you have a chance to take a look.

@adamsilverstein

Copy link
Copy Markdown
Member

pr makes sense to me, it would be good to add some tests that demonstrate what it achieves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PRs that do not have a defined milestone for release [Plugin] Enhanced Responsive Images Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes) [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants