Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Sep 22, 2025

Part of WOOMOB-935

Description

This PR moves shared dependencies from the app layer to appropriate framework layers in preparation for migrating Point of Sale (POS) code to a dedicated module WOOMOB-935. This restructuring enables access to code currently in the app layer when POS usage is moved to a separate module. The moves in this PR were pretty straightforward, while non-trivial moves like the WaitingTimeTracker will be in a separate PR.

Key Changes:

Moved to WooFoundation:

  • SafariView and SafariSheet UI components - commonly used across POS and main app for web browsing. These two components are quite similar and probably worth consolidating, but it is out of scope of the POS modulairzation
  • DateFormatter and Decimal extensions - utility extensions used in both POS and main app

Moved to Yosemite:

  • SiteAddress model and functionality - business logic for store address handling needed by POS settings
  • CountryCode.readableCountry extension - country display logic required by POS and other features in the app
  • Related tests moved to YosemiteTests

App Layer Updates:

  • Updated POS views to import SafariView from WooFoundation
  • Added convenience initializer for SiteAddress that uses ServiceLocator for app-layer compatibility
  • Updated import statements across affected POS files

Steps to reproduce

  1. Open the WooCommerce app
  2. Navigate to Settings > Point of Sale
  3. Access hardware and help settings that use Safari views
  4. Verify store location functionality in POS settings

Testing information

I tested the following:

  • Critical POS Flows to Test:

  • POS Settings Safari Views: Verify hardware documentation and help links open correctly in Safari

  • Store Address in POS: Confirm store location displays properly in POS settings

  • POS Eligibility: Test that country-based eligibility checks work correctly

  • Date/Currency Formatting: Verify proper formatting throughout POS flows

  • Main App Areas to Test:

  • In-Person Payments Settings: Test Safari links for card reader documentation

  • Store Settings: Verify site address functionality in main app settings

  • Date and currency display: Check formatting consistency across the app


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

@jaclync jaclync added type: task An internally driven task. feature: POS labels Sep 22, 2025
@jaclync jaclync added this to the 23.4 milestone Sep 22, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 22, 2025

1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

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

App NameWooCommerce iOS Prototype
Build Numberpr16159-6ae4441
Version23.3
Bundle IDcom.automattic.alpha.woocommerce
Commit6ae4441
Installation URL6q0bpc2r2lm9o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@jaclync jaclync changed the title Move shared dependencies to shared frameworks in preparation for POS module [Woo POS] Modularization: move shared dependencies to shared frameworks in preparation for POS modularization Sep 22, 2025
@jaclync jaclync requested a review from staskus September 22, 2025 07:04
Copy link
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

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

Thank you! Looks god 👍


extension SiteAddress {
convenience init() {
self.init(siteSettings: ServiceLocator.selectedSiteSettings.siteSettings)
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, a good way to keep the backwards compatibility and avoid unnecessary changes after the refactoring 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, there are a few such usage in the app.

@jaclync jaclync merged commit 90c88a7 into trunk Sep 25, 2025
27 of 29 checks passed
@jaclync jaclync deleted the feat/WOOMOB-935-move-shared-dependencies-to-shared-frameworks branch September 25, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: POS type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants