Skip to content

[Shipping labels] Refactor purchased screen preview #13909

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

Merged
merged 4 commits into from
Apr 17, 2025

Conversation

irfano
Copy link
Contributor

@irfano irfano commented Apr 9, 2025

Closes: WOOMOB-266

Description

This PR removes an unnecessary composable that was only used for preview. The removed composable (WooShippingLabelPurchasedScreen) was the duplicate of the one used in production.

Steps to reproduce

This shouldn’t affect production. Reviewing the composable preview should be sufficient.

The tests that have been performed

Compared the previews shown below.

Images/gif

Before After
before after
  • 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.

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 big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@irfano irfano added type: task An internally driven task. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Apr 9, 2025
@irfano irfano added this to the 22.2 milestone Apr 9, 2025
@irfano irfano requested a review from hichamboushaba April 9, 2025 10:25
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 9, 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 Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit77acf18
Direct Downloadwoocommerce-wear-prototype-build-pr13909-77acf18.apk

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 9, 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 Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit77acf18
Direct Downloadwoocommerce-prototype-build-pr13909-77acf18.apk

@irfano irfano requested a review from JorgeMucientes April 11, 2025 16:55
Copy link
Member

@hichamboushaba hichamboushaba left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for cleaning this up @irfano.

Just one minor suggestion: WDYT about renaming WooShippingLabelPurchasedWithBottomSheetScreen to WooShippingLabelPurchasedScreen just to be consistent with the other Composable files where we have the root file accepting the viewModel and the overload with the data models for the preview? Feel free to ignore this suggestion 🙂.

@irfano
Copy link
Contributor Author

irfano commented Apr 16, 2025

Thank you for your review. I renamed WooShippingLabelPurchasedWithBottomSheetScreen as you suggested. 👍🏻
bd8be4f

@irfano irfano enabled auto-merge April 16, 2025 21:24
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 22.2. 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

@irfano irfano merged commit c53049f into trunk Apr 17, 2025
15 of 17 checks passed
@irfano irfano deleted the issue/WOOMOB-266-refactor-purchased-screen-preview branch April 17, 2025 12:21
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.32%. Comparing base (aec5665) to head (77acf18).
Report is 5 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13909      +/-   ##
============================================
- Coverage     38.32%   38.32%   -0.01%     
+ Complexity     9407     9406       -1     
============================================
  Files          2098     2098              
  Lines        115971   115971              
  Branches      14831    14831              
============================================
- Hits          44450    44449       -1     
  Misses        67477    67477              
- Partials       4044     4045       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants