Skip to content

Conversation

@RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented Apr 17, 2025

Fixes: WOOMOB-75

Description

Adds Pixel density / screen resolution UIScreen.main.scale multiplier to calculate image pixel size in ResizingImageProcessor.

Steps to reproduce

  • Build from trunk.
  • Make sure the Shipping extension is enabled.
  • In the app navigate to the "Orders" and select an order eligible for a shipping label
  • The "Create shipping label" button should be visible. Tap it.
  • On newly appeared "Create Shipping Labels" screen expand the "N items" view.
  • Presented product thumbnails will look blurry. Compare to product thumbnails in previous screen or in Products tab.

Testing information

  • Build from current branch.
  • Follow same steps to repro.
  • Product thumbnails should look sharp.
  • Consider tweaking larger font in iOS accessibility settings.

Screenshots

Before After
Снимок экрана 2025-04-17 в 18 13 48 Снимок экрана 2025-04-17 в 18 10 40
Before (Large) After (Large)
Снимок экрана 2025-04-17 в 17 57 22 Снимок экрана 2025-04-17 в 18 00 01

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

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.

@RafaelKayumov RafaelKayumov added the type: bug A confirmed bug. label Apr 17, 2025
@RafaelKayumov RafaelKayumov added this to the 22.2 milestone Apr 17, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Apr 17, 2025

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 Number29349
VersionPR #15517
Bundle IDcom.automattic.alpha.woocommerce
Commit09874be
Installation URL16m6mmh7heshg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@RafaelKayumov RafaelKayumov force-pushed the woomob-75-fix-blurry-product-thumbnails branch from d053125 to 09874be Compare April 17, 2025 16:13
@RafaelKayumov RafaelKayumov marked this pull request as ready for review April 17, 2025 16:54
@staskus staskus modified the milestones: 22.2, 22.3 Apr 18, 2025
@itsmeichigo itsmeichigo self-assigned this Apr 21, 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.

Nice fix @RafaelKayumov! Would you mind explaining why using UIScreen's scale fixes this issue, while using the scale from @ScaleMetric doesn't? I was thinking that they were the equivalent of each other.

@RafaelKayumov
Copy link
Contributor Author

Nice fix @RafaelKayumov! Would you mind explaining why using UIScreen's scale fixes this issue, while using the scale from @ScaleMetric doesn't? I was thinking that they were the equivalent of each other.

Sure. The @ScaledMetric is the property wrapper that adjusts wrapped value basing on Dynamic Type settings, i.e. the text size that can be increased/reduced in iOS accessibility settings. The UIScreen.scale is basically the screen pixel density. So we should account both to calculate the correct image size.

@RafaelKayumov RafaelKayumov merged commit 17d5b68 into trunk Apr 21, 2025
17 checks passed
@RafaelKayumov RafaelKayumov deleted the woomob-75-fix-blurry-product-thumbnails branch April 21, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants