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

Move all WordPressAuthenticator sources into this repo #14779

Open
wants to merge 89 commits into
base: trunk
Choose a base branch
from

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Dec 31, 2024

Description

Removes the WordPressAuthenticator-iOS and WordPressKit-iOS dependencies by folding both into the codebase. See rationale in #14329.

I implemented this using one framework target in the WooCommerce project, which is then linked in the WooCommerce iOS app. I had initially tried having the code in a dedicated project, like the other frameworks like Yosemite, Storage, Networking, etc. do, but I run into some compilation issues and decided to move to the target setup. For what is worth, that is the same approach that WordPress and Jetpack use.

We could consider extracting into a project in the future, once most of the unused code (and presumably some additional dependency) has been removed.

Alternatively, we could move the whole code into the WooCommerce target itself. However I wouldn't recommend this because that target is already quite big and with tests that take a long time to run.

There is of course a lot of new code in this PR. As you can see from the commit history, I spent some time deleting unused code, but I'm nowhere near done. I decided to draw a line in the sand and ask for review now, though, and continue chipping away at the unused afterwards. Otherwise, this will become stale and we'll risk more work happening in the libraries.

Steps to reproduce

N.A.

Testing information

If CI is green and we can log into the app, then I'd call the operation successful.

Screenshots

N.A.


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary. – N.A.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

@dangermattic
Copy link
Collaborator

dangermattic commented Dec 31, 2024

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@mokagio mokagio force-pushed the mokagio/fold-wordpress-authenticator branch 2 times, most recently from ef7a776 to c4e4f34 Compare January 2, 2025 07:00
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 2, 2025

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14779-56e20a4
Version21.4
Bundle IDcom.automattic.alpha.woocommerce
Commit56e20a4
App Center BuildWooCommerce - Prototype Builds #12594
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@@ -37,7 +37,11 @@ def tracks
end

def wordpress_shared
pod 'WordPressShared', '~> 2.1'
pod 'WordPressShared', '~> 2.1-beta'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -1,4 +1,4 @@
IPHONEOS_DEPLOYMENT_TARGET = 15.0
IPHONEOS_DEPLOYMENT_TARGET = 16.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already set in the project but not update here and ignored because some target overrode it instead of inheriting (by deleting the entry at the target level)

@hichamboushaba
Copy link
Member

Hey @mokagio, when can we expect this PR to be ready for review and merged? We have a project that touches on this code (pe5sF9-3mV-p2), and we are delaying it until this PR is merged to avoid any more unwanted conflicts.

@mokagio mokagio force-pushed the mokagio/fold-wordpress-authenticator branch from 6bc7e88 to 56e20a4 Compare January 20, 2025 10:14
@mokagio
Copy link
Contributor Author

mokagio commented Jan 20, 2025

@hichamboushaba sorry you had to write that. Bad timing on my end... I had planned and started to work on this today p1737328507842779-slack, but something else came up, p1737344967048199-slack, so I only got to this now.

Anyway, this is now ready to review and I hope it'll get looked at soon. Feel free to leave your review, too, much appreciated.

@mokagio mokagio marked this pull request as ready for review January 20, 2025 10:18
@mokagio mokagio requested a review from a team January 20, 2025 10:18
@mokagio mokagio changed the title WIP - Move all WordPressAuthenticator sources into this repo Move all WordPressAuthenticator sources into this repo Jan 20, 2025
@mokagio mokagio added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Jan 20, 2025
@mokagio mokagio added this to the 21.5 milestone Jan 20, 2025
@wzieba
Copy link

wzieba commented Jan 22, 2025

hi @mokagio 👋 have you considered using git filter-repo to preserve the git history of the WordPressAuthenticator files? We've been using this strategy for a few Android projects now (Media, FluxC, Login) with success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fold WordPressAuthenticator into WooCommerce iOS
5 participants