Skip to content

Conversation

@kidinov
Copy link
Contributor

@kidinov kidinov commented Nov 5, 2025

WOOMOB-1645

@malinajirka @samiuelson @toupper FYI, it's better to use this, newly added, component when we need to display loading text

Description

This PR introduces a new WooPosShimmerText component that automatically measures text dimensions to create accurately sized shimmer loading placeholders. Previously, developers had to manually calculate text dimensions using WooPosShimmerBox, which was error-prone and led to inconsistent shimmer sizes.

The component:

  • Uses rememberTextMeasurer() to automatically calculate the exact width and height of text based on style and font weight
  • Automatically determines appropriate corner radius based on the calculated height
  • Accepts an optional fontWeight parameter to ensure accurate measurement for bold text
  • Reduces code duplication by replacing manual shimmer box calculations across the codebase

Updated the following screens to use WooPosShimmerText:

  • Settings screens (Store and Local Catalog)
  • Items list
  • Cart screen
  • Orders list and details

Test Steps

  1. Open Woo POS and navigate to various screens with loading states
  2. Observe that shimmer placeholders accurately match the size of the actual text that appears after loading
  3. Verify shimmer sizes for both regular and bold text (e.g., product names, order titles)
  4. Check that corner radius is appropriate for different text sizes
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@dangermattic
Copy link
Collaborator

dangermattic commented Nov 5, 2025

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

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 5, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit7b57700
Direct Downloadwoocommerce-wear-prototype-build-pr14903-7b57700.apk

@kidinov kidinov requested a review from malinajirka November 5, 2025 14:34
@kidinov kidinov added this to the 23.7 milestone Nov 5, 2025
@kidinov kidinov marked this pull request as ready for review November 5, 2025 14:35
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 5, 2025

🤖 Test Failure Analysis

Your tests failed. Claude has analyzed the failures - check the annotation for details.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 5, 2025

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

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit7b57700
Direct Downloadwoocommerce-prototype-build-pr14903-7b57700.apk

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.

4 participants