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

Preserve webp setting options with update from versions older than 2.2 #849

Merged
merged 6 commits into from
Mar 8, 2024

Conversation

wordpressfan
Copy link
Contributor

@wordpressfan wordpressfan commented Mar 7, 2024

Description

Fixes #848
Fixes #850

Documentation

User documentation

Here we added back the webp option names, so those old options (display_webp, display_webp_method, and convert_to_webp) will be kept on the database but without UI.

Then when the user updates to the latest version we will move those options' values to the corresponding new ones.

Technical documentation

Explain how this code works. Diagram & drawings are welcomed.

Type of change

Delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).

New dependencies

List any new dependencies that are required for this change.

Risks

List possible performance & security issues or risks, and explain how they have been mitigated.

We only have one risk that I can think of now, having not used settings in the database but it worth having them because also what if any user reverted back to an older version of imagify after updating to the latest version, with this change, he will find everything set properly in older versions too.

Checklists

Feature validation

  • I validated all the Acceptance Criteria. If possible, provide sreenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Documentation

  • I prepared the user documentation for the feature/enhancement and shared it in the PR or the GitHub issue.
  • The user documentation covers new/changed entry points (endpoints, WP hooks, configuration files, ...).
  • I prepared the technical documentation if needed, and shared it in the PR or the GitHub issue.

Code style

  • I wrote self-explanatory code about what it does.
  • I wrote comments to explain why it does it.
  • I named variables and functions explicitely.
  • I protected entry points against unexpected inputs.
  • I did not introduce unecessary complexity.
  • I listed the introduced external dependencies explicitely on the PR.
  • I validated the repo-specific guidelines from CONTRIBUTING.md.

Observability

  • I handled errors when needed.
  •  I wrote user-facing messages that are understandable and provide actionable feedbacks.
  • I prepared ways to observe the implemented system (logs, data, etc.).

Risks

  •  I explicitely mentioned performance risks in the PR.
  • I explicitely mentioned security risks in the PR.

@wordpressfan wordpressfan self-assigned this Mar 7, 2024
@wordpressfan wordpressfan marked this pull request as ready for review March 8, 2024 06:16
@wordpressfan wordpressfan requested a review from a team March 8, 2024 06:52
@MathieuLamiot MathieuLamiot merged commit 52f8dfe into develop Mar 8, 2024
6 of 7 checks passed
@MathieuLamiot MathieuLamiot deleted the fix/848-webp-upgrade-routine branch March 8, 2024 11:02
@Mai-Saad
Copy link

Mai-Saad commented Mar 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants