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

Accurate sizes: Add ancestor block context #1795

Draft
wants to merge 6 commits into
base: feature/1511-incorporate-layout-constraints-from-ancestors
Choose a base branch
from

Conversation

mukeshpanchal27
Copy link
Member

@mukeshpanchal27 mukeshpanchal27 commented Jan 13, 2025

Summary

This PR add the ancestor block context for image and cover block that help to calculation of img sizes attributes.

See #1511

The context for ancestor block after the PR.

Group > Image

Array(
    [0] => Array( [core/columns] => default ),
)

Columns > Column > Image

Array(
    [0] => Array( [core/columns] => default ),
    [1] => Array( [core/column] => 100%)
)

Group > Columns > Column ( 50% ) > Image

Array(
    [0] => Array( [core/group] => default ),
    [1] => Array( [core/columns] => default ),
    [2] => Array( [core/column] => 50%)
)

@mukeshpanchal27 mukeshpanchal27 added [Type] Feature A new feature within an existing module [Plugin] Enhanced Responsive Images Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes) labels Jan 13, 2025
@mukeshpanchal27 mukeshpanchal27 self-assigned this Jan 13, 2025
@mukeshpanchal27 mukeshpanchal27 added the no milestone PRs that do not have a defined milestone for release label Jan 13, 2025
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 10 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/1511-incorporate-layout-constraints-from-ancestors@3671902). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ns/auto-sizes/includes/improve-calculate-sizes.php 68.96% 9 Missing ⚠️
plugins/auto-sizes/hooks.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                                      Coverage Diff                                      @@
##             feature/1511-incorporate-layout-constraints-from-ancestors    #1795   +/-   ##
=============================================================================================
  Coverage                                                              ?   57.53%           
=============================================================================================
  Files                                                                 ?       84           
  Lines                                                                 ?     6544           
  Branches                                                              ?        0           
=============================================================================================
  Hits                                                                  ?     3765           
  Misses                                                                ?     2779           
  Partials                                                              ?        0           
Flag Coverage Δ
multisite 57.53% <66.66%> (?)
single 34.65% <66.66%> (?)

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

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

@mukeshpanchal27 mukeshpanchal27 changed the base branch from trunk to feature/1511-incorporate-layout-constraints-from-ancestors January 13, 2025 09:25
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] Feature A new feature within an existing module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant