Skip to content

Conversation

@adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Apr 4, 2022

Summary

Fixes #

Relevant technical choices

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

mitogh and others added 30 commits March 19, 2022 12:39
The class is in charge of performing operations to an image
as if a user is performing those actions from the image editor
but from the BE. This class is a utility class to be used
from within the test context to mimic the user behavior of
performing edits into an image.
When an image is edited the `sources` properties is going to be backup with
the rest of the sizes properties, however that's not the case for the `full`
size which is a virtual type and the top level `sources` would be moved
into the backup metadata.

When the image is restored any edited image available in the sources array would
be removed before the restore takes place. The `sources` property for the `full-orig`
would be placed at the top level `sources` with the rest of the metadata.
This would be handled once #158 is merged so
the current approach can be adjusted accordingly.
When an image is edited using a target other than the
all and the thumbnail make sure the `success` method
returns the correct value.
Due to the only value that is not correctly stored is
the top level sources attributes this now is stored
in a separate meta value. Stored in `_wp_attachment_backup_sources`

Logic was added to handle scenarios where only the thumbnail
or all images except the thumbnail are modified.
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
…y replace images without using the preg_match call.
…ources

Replace images in frontend content without using an additional regular expression
Move the hooks for the update right into the place where they are
actually used.
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
Co-authored-by: Felix Arntz <felixarntz@users.noreply.github.com>
The `backup_sizes` parameter was not used so it can be safely removed
from the code execution.
Reuse the hook as now is stored in a variable, so it can be reused in
both hooks.
Merge extra enhancements landed in beta.4 branch into new rc.1 branch
mitogh and others added 13 commits March 30, 2022 10:49
Co-authored-by: Eugene Manuilov <manuilov@google.com>
Co-authored-by: Eugene Manuilov <manuilov@google.com>
Co-authored-by: Eugene Manuilov <manuilov@google.com>
Co-authored-by: Eugene Manuilov <manuilov@google.com>
Make sure the code performns in a more structured way
…-image-sources

Restore and backup image sizes alongside the sources properties
# Conflicts:
#	modules/images/webp-uploads/load.php
#	tests/modules/images/webp-uploads/webp-uploads-test.php
@mitogh mitogh added Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release [Type] Enhancement A suggestion for improvement of an existing feature labels Apr 4, 2022
@mitogh mitogh merged commit 2e6a8c0 into trunk Apr 4, 2022
@felixarntz felixarntz deleted the release/1.0.0-rc.1-take-2 branch April 15, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants