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

Remove Gravatar related deprecated types and replace with Gravatar SDK #23429

Merged
merged 8 commits into from
Jul 19, 2024

Conversation

pinarol
Copy link
Contributor

@pinarol pinarol commented Jul 18, 2024

Fixes #

We deprecated some Gravatar related types and methods when integrating the Gravatar SDK with PR: #22921. Now it is time to remove those deprecated types.

This PR also replaces a piece of code in WordPressAuthenticator that was still using the deprecated methods.

To test:

The avatar should look OK in the password entry page:

Regression Notes

  1. Potential unintended areas of impact

Avatars in login flow.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

I tested the login flow.

  1. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@pinarol pinarol self-assigned this Jul 18, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Jul 18, 2024

2 Warnings
⚠️ Modules/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages in Xcode.
⚠️ This PR is assigned to the milestone 25.4. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@@ -36,7 +37,9 @@ class LoginLinkRequestViewController: LoginViewController {

let email = loginFields.username
if email.isValidEmail() {
gravatarView?.downloadGravatarWithEmail(email, rating: .x)
Task {
try await gravatarView?.setGravatarImage(with: email, placeholder: .gravatarPlaceholderImage, rating: .x)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to make this code run even though I followed the email link flow. Maybe I am missing something.

But this is the same method we call from GravatarEmailTableViewCell.swift. And I was able to test that.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jul 18, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23429-892f1ba
Version25.1
Bundle IDcom.jetpack.alpha
Commit892f1ba
App Center Buildjetpack-installable-builds #9358
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jul 18, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23429-892f1ba
Version25.1
Bundle IDorg.wordpress.alpha
Commit892f1ba
App Center BuildWPiOS - One-Offs #10313
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@pinarol
Copy link
Contributor Author

pinarol commented Jul 18, 2024

About the dangermattic warning. I ran swift package resolve but it didn't change Package.resolved. Gravatar was already resolved so i think it's normal.

@pinarol pinarol requested a review from kean July 18, 2024 10:40
@pinarol pinarol marked this pull request as ready for review July 18, 2024 10:40
@pinarol pinarol added this to the 25.4 milestone Jul 18, 2024
@kean
Copy link
Contributor

kean commented Jul 18, 2024

About the #23429 (comment). I ran swift package resolve but it didn't change Package.resolved. Gravatar was already resolved so i think it's normal.

Please disregard this warning as its a false positive. The dependencies are pinned in ./WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved. The Modules/Packages.resolved file is in .gitignore as it should be. @iangmaia, could you please take a look into this warning?

AppCenter is down. I'll test it once it back up again. Thank you for the PR! 🙇

@iangmaia
Copy link
Contributor

About the #23429 (comment). I ran swift package resolve but it didn't change Package.resolved. Gravatar was already resolved so i think it's normal.

Please disregard this warning as its a false positive. The dependencies are pinned in ./WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved. The Modules/Packages.resolved file is in .gitignore as it should be. @iangmaia, could you please take a look into this warning?

Thanks, will look into it! It is indeed a false positive.

@kean
Copy link
Contributor

kean commented Jul 19, 2024

Tested – all looks good :shipit:
App Center still down .

@kean kean self-requested a review July 19, 2024 01:12
@pinarol pinarol added this pull request to the merge queue Jul 19, 2024
Merged via the queue into trunk with commit 49dacdc Jul 19, 2024
19 of 24 checks passed
@pinarol pinarol deleted the wppinar/remove-gravatar-deprecated-types branch July 19, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants