woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Woo POS][Non-Simple Products] Navigation to variations screen #12873

Closed AnirudhBhat closed 2 days ago

AnirudhBhat commented 2 weeks ago

Closes: #12843

Description

This PR handles navigation to variations screen when clicked on a variable product. This PR does not display variations list, just a new screen with a toolbar that displays variable product name and number of variations.

Testing information

Click on variable product and ensure you navigate to a new screen and you can see toolbar with variable product name and number of variations along with a back button.

Ensure that clicking on the back button will take you back to the items list screen.

The tests that have been performed

  1. Ensured we can navigate to the variations screen from items list when clicked on variable product
  2. Ensured back button in the variations screen takes us back to the items list screen.

Images/gif

https://github.com/user-attachments/assets/2b9afa85-e6e1-4bc4-9b3b-99c8e0ebada1

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:

wpmobilebot commented 2 weeks ago
📲 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
Commitfb44b49cfb7ad3e9f1e71c112d3c67d37f6e0422
Direct Downloadwoocommerce-wear-prototype-build-pr12873-fb44b49.apk
wpmobilebot commented 2 weeks ago

📲 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
Commitfb44b49cfb7ad3e9f1e71c112d3c67d37f6e0422
Direct Downloadwoocommerce-prototype-build-pr12873-fb44b49.apk
codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.

Project coverage is 39.63%. Comparing base (6bca21e) to head (fb44b49). Report is 140 commits behind head on trunk.

Files with missing lines Patch % Lines
...opos/home/items/navigation/WooPosItemsNavigator.kt 0.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12873 +/- ## ============================================ + Coverage 39.61% 39.63% +0.01% - Complexity 5929 5932 +3 ============================================ Files 1260 1261 +1 Lines 72836 72862 +26 Branches 9965 9965 ============================================ + Hits 28856 28879 +23 - Misses 41410 41414 +4 + Partials 2570 2569 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

dangermattic commented 4 days ago
1 Warning
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

samiuelson commented 2 days ago

Another thing worth addressing here or in the next PRs is that after returning from the variations screen, the previous item list is scrolled to the top. It would be nice to preserve the scroll state.

AnirudhBhat commented 2 days ago

Another thing worth addressing here or in the next PRs is that after returning from the variations screen, the previous item list is scrolled to the top. It would be nice to preserve the scroll state.

Made the changes to restore list scroll state here - https://github.com/woocommerce/woocommerce-android/pull/12873/commits/fb44b49cfb7ad3e9f1e71c112d3c67d37f6e0422