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: Reorganize file structure by feature #1699

Conversation

joemcgill
Copy link
Member

Summary

This reorganizes the file structure of the Enhanced Responsive Images plugin (i.e. auto-sizes) to separate the functionality for the original auto-sizes implementation from the functionality for the improved sizes calculation being worked on in #1511. This reorganization is meant to make it easier follow where code relevant to each feature exists and to ensure they stay as separate functionality within the plugin.

Relevant technical choices

All function definitions have been moved into one of two files in the /includes/ directory:

  • /includes/auto-sizes.php: Functions related to auto-sizes
  • /includes/improve-calculate-sizes: Function related to improving the default wp_calculate_image_sizes algorithm
  • Renames tests/test-improve-sizes to tests/test-improve-calculate-sizes for consistency with the related functions file and renames the related test class accordingly
  • All add_filter() hooks remain in hooks.php
  • The default plugin action for rendering the generator tag remains in hooks.php

@joemcgill joemcgill added the [Type] Enhancement A suggestion for improvement of an existing feature label Nov 25, 2024
@joemcgill joemcgill added this to the auto-sizes n.e.x.t milestone Nov 25, 2024
@joemcgill joemcgill self-assigned this Nov 25, 2024
Copy link

github-actions bot commented Nov 25, 2024

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: joemcgill <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: mukeshpanchal27 <[email protected]>

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

@joemcgill joemcgill added the [Plugin] Enhanced Responsive Images Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes) label Nov 25, 2024
@mukeshpanchal27 mukeshpanchal27 merged commit 9ffe60c into feature/1511-incorporate-layout-constraints-from-ancestors Nov 26, 2024
22 checks passed
@mukeshpanchal27 mukeshpanchal27 deleted the update/separate-file-structure branch November 26, 2024 04:19
@joemcgill joemcgill changed the title Auto sizes: Reorganize file structure by feature Accurate sizes: Reorganize file structure by feature Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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
Status: Done 😃
Development

Successfully merging this pull request may close these issues.

3 participants