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: Get accurate sizes base on ancestor block context #1818

Conversation

mukeshpanchal27
Copy link
Member

Summary

See #1511

@mukeshpanchal27 mukeshpanchal27 added [Type] Feature A new feature within an existing module 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 Jan 22, 2025
@mukeshpanchal27 mukeshpanchal27 self-assigned this Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.59%. Comparing base (7757e50) to head (80cc029).
Report is 16 commits behind head on feature/1511-incorporate-layout-constraints-from-ancestors.

Additional details and impacted files
@@                                      Coverage Diff                                       @@
##           feature/1511-incorporate-layout-constraints-from-ancestors    #1818      +/-   ##
==============================================================================================
+ Coverage                                                       69.41%   69.59%   +0.18%     
==============================================================================================
  Files                                                              86       86              
  Lines                                                            7006     7018      +12     
==============================================================================================
+ Hits                                                             4863     4884      +21     
+ Misses                                                           2143     2134       -9     
Flag Coverage Δ
multisite 69.59% <100.00%> (+0.18%) ⬆️
single 39.66% <100.00%> (+0.23%) ⬆️

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.

🚀 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
Member Author

@joemcgill This one ready for your review.

@mukeshpanchal27
Copy link
Member Author

The PR is ready for internal review.

@mukeshpanchal27 mukeshpanchal27 marked this pull request as ready for review March 26, 2025 05:25
Copy link

github-actions bot commented Mar 26, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mukeshpanchal27 <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: westonruter <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: phanduynam <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@swissspidy
Copy link
Member

What‘s with the failing tests?

@mukeshpanchal27
Copy link
Member Author

What‘s with the failing tests?

In 3a51aed it will skip failed tests for WordPress versions lower than 6.8

*
* @return array<string, array<int, string>> The ancestor and image alignments.
*/
public function data_image_block_with_parent_columns_and_its_parent_group_block(): array {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of the tests has the exact same sizes attribute: sizes="(max-width: 413px) 100vw, 413px".

Is this expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is expected as it end up to the default alignment any of it's parents or image alignment as default alignment. In bba4997, I added more variations of alignment options.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mukeshpanchal27 This looks really good, just a few questions.

Base automatically changed from add/ancestor-block-context to feature/1511-incorporate-layout-constraints-from-ancestors April 2, 2025 03:43
@phanduynam

This comment was marked as spam.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mukeshpanchal27 for the updates, looks great!

@mukeshpanchal27 mukeshpanchal27 merged commit c9e98f3 into feature/1511-incorporate-layout-constraints-from-ancestors Apr 9, 2025
17 checks passed
@mukeshpanchal27 mukeshpanchal27 deleted the fix/add-column-block-context branch April 9, 2025 11:02
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.

5 participants