Skip to content

Conversation

@RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented Sep 17, 2025

WOOMOB-1303

Description

Fixes warnings for trait collection update deprecated API. Replaces traitCollectionDidChange(_ previousTraitCollection:) with new API calls in:

  • AddProductImageCollectionViewCell
  • ProductImageCollectionViewCell
  • ProductImagesHeaderTableViewCell
  • ProductsTabProductTableViewCell
  • ProductFormViewController

Testing steps

Since the behaviour is not supposed to change - pls smoke the product list and product details screens for ui trait changes like light/dark appearance, accessibility font and contrast, orientation rotations.
For the following tests use Xcode debug and iOS simulator.

For AddProductImageCollectionViewCell

  • Put breakpoint in applyContentBorderColorOnInterfaceStyleChange handler in AddProductImageCollectionViewCell.swift on line 40
  • Navigate to Product details screen
  • Toggle light/dark appearance in iOS Simulator -> Features -> Toggle Appearance
  • Make sure the breakpoint is hit

For ProductImageCollectionViewCell

  • Put breakpoint in applyContentBorderColorOnInterfaceStyleChange handler in ProductImageCollectionViewCell.swift on line 88
  • Navigate to Product details screen
  • Toggle light/dark appearance in iOS Simulator -> Features -> Toggle Appearance
  • Make sure the breakpoint is hit

For ProductImagesHeaderTableViewCell

  • Put breakpoint in registerForTraitChanges handler in ProductImagesHeaderTableViewCell.swift on line 174
  • Toggle dark/light appearance
  • Rotate device
  • Toggle accessibility sizes
  • Make sure the trait changes handler is triggered by the actions above and the breakpoint is hit.

For ProductsTabProductTableViewCell

  • Put breakpoint in registerForTraitChanges handler in ProductsTabProductTableViewCell.swift on line 272
  • Navigate to products list
  • Toggle light/dark appearance in iOS Simulator -> Features -> Toggle Appearance
  • Make sure the registerForTraitChanges handler is triggered and breakpoint is hit

For ProductFormViewController

  • Put breakpoint in ProductFormViewController.swift on line 954
  • Navigate to product details form
  • Rotate the simulator to different orientations
  • Make sure the registerForTraitChanges handler is triggered and breakpoint is hit.

Testing information

Tested in iOS 26 Simulator


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

@RafaelKayumov RafaelKayumov added this to the 23.3 milestone Sep 17, 2025
@RafaelKayumov RafaelKayumov added the type: task An internally driven task. label Sep 17, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 17, 2025

1 Warning
⚠️ This PR is assigned to the milestone 23.3. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@RafaelKayumov RafaelKayumov marked this pull request as ready for review September 17, 2025 12:08
@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 Numberpr16140-358e207
Version23.2
Bundle IDcom.automattic.alpha.woocommerce
Commit358e207
Installation URL7i5srah4gb760
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo self-assigned this Sep 18, 2025
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

LGTM 🚢 Tested with simulator iPhone 16 and iPad mini. All affected areas look good.

@RafaelKayumov RafaelKayumov merged commit 43675f8 into trunk Sep 18, 2025
21 checks passed
@RafaelKayumov RafaelKayumov deleted the WOOMOB-1303-update-trait-update-api-for-product-flows branch September 18, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants