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

Change methods name #785

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Change methods name #785

merged 4 commits into from
Jan 25, 2024

Conversation

Khadreal
Copy link
Contributor

Description

Changed methods name for media library view

Fixes #779

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Is the solution different from the one proposed during the grooming?

No

Please describe in this section if there is any change to the groomed solution, and why.

Checklists

Generic development checklist

  • My code follows the style guidelines of this project, with adapted comments and without new warnings.
  • I have added unit and integration tests that prove my fix is effective or that my feature works.
  • The CI passes locally with my changes (including unit tests, integration tests, linter).
  • Any dependent changes have been merged and published in downstream modules.
  • If applicable, I have made corresponding changes to the documentation. Provide a link to the documentation.

Test summary

  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I validated all Acceptance Criteria of the related issues. (If applicable, provide proof).
  • I validated all test plan the QA Review asked me to.

@@ -202,20 +202,20 @@ protected function optimize_missing_sizes( $media_id, $context ) {
* @param string $context The context.
* @return bool|WP_Error True if successfully launched. A \WP_Error instance on failure.
*/
protected function generate_webp_versions( $media_id, $context ) {
protected function generate_nextgen_versions( $media_id, $context ) {
Copy link
Contributor

@Miraeld Miraeld Jan 19, 2024

Choose a reason for hiding this comment

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

⚠️ this function has been refactored here with a different name :

protected function generate_next_gen_versions( $media_id, $context ) {

@@ -27,8 +27,8 @@ class Imagify_Admin_Ajax_Post extends Imagify_Admin_Ajax_Post_Deprecated {
'imagify_manual_optimize',
'imagify_manual_reoptimize',
'imagify_optimize_missing_sizes',
'imagify_generate_webp_versions',
'imagify_delete_webp_versions',
'imagify_generate_nextgen_versions',
Copy link
Contributor

@Miraeld Miraeld Jan 19, 2024

Choose a reason for hiding this comment

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

⚠️ this function has been refactored here with a different name :

'imagify_generate_next_gen_versions',

*
* @since 1.7
*
* @param object $item The current item. It must contain at least a $process property.
*/
protected function generate_webp_versions_button( $item ) {
protected function generate_nextgen_versions_button( $item ) {
Copy link
Contributor

@Miraeld Miraeld Jan 19, 2024

Choose a reason for hiding this comment

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

⚠️ this function has been refactored here with a different name :

protected function generate_next_gen_versions_button( $item ) {

@@ -363,21 +363,21 @@ public function imagify_optimize_missing_sizes_callback() {
*
* @since 1.9
*/
public function imagify_generate_webp_versions_callback() {
public function imagify_generate_nextgen_versions_callback() {
Copy link
Contributor

@Miraeld Miraeld Jan 19, 2024

Choose a reason for hiding this comment

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

⚠️ this function has been refactored here with a different name :

public function imagify_generate_next_gen_versions_callback() {

@Khadreal
Copy link
Contributor Author

@Miraeld I think I should assigned this #779 to you, it seems you've already worked on it and #778 by looking at your commits history

@Miraeld
Copy link
Contributor

Miraeld commented Jan 19, 2024

There is no need to re-assign it I think.
From what I've seen on other PRs, we've been using next_gen notation instead of nextgen.
As I needed few of these functions in an other PR, I had to rename them. I made my comment here to avoid either of us having conflicts.

@Tabrisrp Tabrisrp changed the base branch from develop to feature/avif January 19, 2024 20:16
@Tabrisrp
Copy link
Contributor

This PR needs conflict fixed before moving forward

@Khadreal
Copy link
Contributor Author

While resolving the conflicts I noticed that the issue #779 was created based on develop branch and deature/avif branch has few things that aren't captured in the issue.
Is it safe to rename all next_gen to nextgen ? @Tabrisrp

@Tabrisrp Tabrisrp merged commit de6dc98 into feature/avif Jan 25, 2024
1 check failed
@Tabrisrp Tabrisrp deleted the feature/779-avif-media-view branch January 25, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AVIF support: media library view
3 participants