[Tablet support M2] Full flow
Closes: #10568
Description
This PR introduces a nav_host_fragment within the OrderListFragment, facilitating a two-pane layout for tablets. On phones, this layout adjustment will have no impact. The nav_host_fragment is designated to host the Order detail screen.
Note: This PR solely focuses on layout adjustments and does not encompass any business logic for selecting orders or automatically opening the first order by default.
Testing instructions
- Run the app on physical tablet or in a tablet emulator
- Click on the
Orderstab - Ensure you see a 2 pane layout with order list and order detail
- Go into split mode and resize the window and ensure the layout moves between 2 pane and single pane layout according to the window size
- Run the same app on phone and ensure the behaviour is same as before and there's no change
Images/gif
- [x] I have considered if this change warrants release notes and have added them to
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.
| 3 Warnings | |
|---|---|
| :warning: | This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
| :warning: | Class SelectedOrderTrackerViewModel is missing tests, but unit-tests-exemption label was set to ignore this. |
| :warning: | This PR is assigned to the milestone 17.5. The due date for this milestone has already passed. Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished. |
| 1 Message | |
|---|---|
| :book: | This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:
|
Generated by :no_entry_sign: Danger
📲 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 | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | ac50d0efcb65b31683b4ab157e2343bdfaaaa0ec | |
| Direct Download | woocommerce-prototype-build-pr10591-ac50d0e.apk |
@pachlava The UI test failure in this PR appears to be related to the constructor() : super(R.id.toolbar) in FilterScreen. This issue likely stems from our refactoring, where we transitioned to using fragment-specific toolbars in place of a shared toolbar.
cc @samiuelson
@pachlava The UI test failure in this PR appears to be related to the constructor() : super(R.id.toolbar) in FilterScreen. This issue likely stems from our recent refactoring, where we transitioned to using fragment-specific toolbars in place of a shared toolbar.
@AnirudhBhat, as shared in the test charter with more details (pdfdoF-4C0-p2#comment-5822), there are the following navigation scenarios that I believe should be fixed before release:
Issue 1
- Open the app, go to Orders, and wait for the first order to load on the right pane
- Click back – you'll be redirected to My store
- Go to Orders again Observe order is not loading – the pane on the right side displays shimmer animation endlessly.
Issue 2
- Open the app in split mode, go to Orders, and wait for the first order to load on the right pane
- Adjust Woo app's window size, so that it displays single pane only, the order details screen shuold become visible
- Click arrow back on the toolbar Observe there is enless shimmer animation displayed on the screen instead of the orders list screen. We are not able to get back to orders list nor by clicking back arrow navigation or system back press.
Issue 3
- Open the app, go to Orders, and wait for the first order to load on the right pane
- Click search icon and enter search phrase, e.g. existing order number
- Click on the search result to load it in the right-side pane Observe that the order list shows only search results (not the full list of orders) and there is no way to go back to the full orders list. Clicking "back" redirects to My Store instead of going back to full list.
@samiuelson Thanks for the review and testing! Really appreciate it!
I have fixed issue 1 and 3 here: https://github.com/woocommerce/woocommerce-android/pull/10591/commits/f94ef0aaa2502f7b6094bb15cac310a5228d1e50 https://github.com/woocommerce/woocommerce-android/pull/10591/commits/7d16c9903a127cf3e580c9401fb54164d7a968d1
I need additional time to resolve issue 2. Given that it's an edge case, occurring only during the transition from tablet to non-tablet mode, I suggest proceeding with the release. The impact on users is minimal, as navigating to a different tab and returning to the orders tab serves as a workaround. What are your thoughts?
Adding the "do not merge" label until we make a final decision on whether to include it in this week's release or not. cc @malinajirka
Codecov Report
Attention: Patch coverage is 32.18391% with 59 lines in your changes are missing coverage. Please review.
Project coverage is 41.20%. Comparing base (
ca19633) to head (ac50d0e). Report is 17 commits behind head on trunk.
Additional details and impacted files
@@ Coverage Diff @@
## trunk #10591 +/- ##
============================================
- Coverage 41.21% 41.20% -0.02%
- Complexity 5057 5062 +5
============================================
Files 1028 1029 +1
Lines 59415 59465 +50
Branches 7971 7980 +9
============================================
+ Hits 24489 24503 +14
- Misses 32755 32786 +31
- Partials 2171 2176 +5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@pachlava @samiuelson Heads up. I have added @Ignore annotation for couple of UI tests that need some fix due to our recent toolbar refactoring. https://github.com/woocommerce/woocommerce-android/pull/10591/commits/b85d5625f592574fadb03273f2e5feb5ba9f510a
Thank you both! We have found some issues today, which we fixed. However, it seems having an additional week for testing will increase our confidence. Moreover, I don't think we should merge a PR with broken tests - that beats their purpose. Let's move the target date to the next week.
Found 1 violations:
The PR caused the following dependency changes:
expand
-+--- org.wordpress:fluxc:2.67.0
-| +--- org.wordpress:wellsql:2.0.0
-| | +--- androidx.annotation:annotation:1.2.0 -> 1.7.0 (*)
-| | \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
-| +--- org.wordpress.fluxc:fluxc-annotations:2.67.0
-| +--- org.greenrobot:eventbus:3.3.1 (*)
-| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
-| +--- com.android.volley:volley:1.1.1 -> 1.2.0
-| +--- androidx.paging:paging-runtime:2.1.2
-| | +--- androidx.paging:paging-common:2.1.2
-| | | +--- androidx.annotation:annotation:1.0.0 -> 1.7.0 (*)
-| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
-| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.2 (*)
-| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.2 (*)
-| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-| +--- com.goterl:lazysodium-android:5.0.2
-| +--- net.java.dev.jna:jna:5.5.0
-| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.9.0 (*)
-| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.9.22
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
-| +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
-| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
-| | \--- androidx.annotation:annotation:1.2.0 -> 1.7.0 (*)
-| +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
-| | +--- androidx.annotation:annotation:1.1.0 -> 1.7.0 (*)
-| | +--- com.google.crypto.tink:tink-android:1.5.0
-| | \--- androidx.collection:collection:1.1.0 -> 1.2.0 (*)
-| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
-| | +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.0 (*)
-| +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-| +--- org.apache.commons:commons-text:1.10.0 (*)
-| +--- androidx.room:room-runtime:2.4.2 -> 2.5.2 (*)
-| +--- androidx.room:room-ktx:2.4.2 -> 2.5.2
-| | +--- androidx.room:room-common:2.5.2 (*)
-| | +--- androidx.room:room-runtime:2.5.2 (*)
-| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
-| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 -> 1.7.3 (*)
-| +--- com.google.dagger:dagger:2.42 -> 2.50
-| | \--- javax.inject:javax.inject:1
-| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
-| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
++--- org.wordpress:fluxc:2959-fa5de726746db9abca205b9c433f61bbb4fdb9ae
+| +--- org.wordpress:wellsql:2.0.0
+| | +--- androidx.annotation:annotation:1.2.0 -> 1.7.0 (*)
+| | \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
+| +--- org.wordpress.fluxc:fluxc-annotations:2959-fa5de726746db9abca205b9c433f61bbb4fdb9ae
+| +--- org.greenrobot:eventbus:3.3.1 (*)
+| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
+| +--- com.android.volley:volley:1.1.1 -> 1.2.0
+| +--- androidx.paging:paging-runtime:2.1.2
+| | +--- androidx.paging:paging-common:2.1.2
+| | | +--- androidx.annotation:annotation:1.0.0 -> 1.7.0 (*)
+| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
+| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.2 (*)
+| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.2 (*)
+| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
+| +--- com.goterl:lazysodium-android:5.0.2
+| +--- net.java.dev.jna:jna:5.5.0
+| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.9.0 (*)
+| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.9.22
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
+| +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
+| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
+| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
+| | \--- androidx.annotation:annotation:1.2.0 -> 1.7.0 (*)
+| +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
+| | +--- androidx.annotation:annotation:1.1.0 -> 1.7.0 (*)
+| | +--- com.google.crypto.tink:tink-android:1.5.0
+| | \--- androidx.collection:collection:1.1.0 -> 1.2.0 (*)
+| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
+| | +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.0 (*)
+| +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+| +--- org.apache.commons:commons-text:1.10.0 (*)
+| +--- androidx.room:room-runtime:2.4.2 -> 2.5.2 (*)
+| +--- androidx.room:room-ktx:2.4.2 -> 2.5.2
+| | +--- androidx.room:room-common:2.5.2 (*)
+| | +--- androidx.room:room-runtime:2.5.2 (*)
+| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
+| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 -> 1.7.3 (*)
+| +--- com.google.dagger:dagger:2.42 -> 2.50
+| | \--- javax.inject:javax.inject:1
+| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
+| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
-\--- org.wordpress.fluxc.plugins:woocommerce:2.67.0
- +--- org.wordpress:wellsql:2.0.0 (*)
- +--- org.wordpress.fluxc:fluxc-annotations:2.67.0
- +--- androidx.room:room-ktx:2.4.2 -> 2.5.2 (*)
- +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.9.0 (*)
- +--- org.wordpress:fluxc:2.67.0 (*)
- +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
- +--- com.google.dagger:dagger:2.42 -> 2.50 (*)
- +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
- +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
- \--- androidx.room:room-runtime:2.4.2 -> 2.5.2 (*)
+\--- org.wordpress.fluxc.plugins:woocommerce:2959-fa5de726746db9abca205b9c433f61bbb4fdb9ae
+ +--- org.wordpress:wellsql:2.0.0 (*)
+ +--- org.wordpress.fluxc:fluxc-annotations:2959-fa5de726746db9abca205b9c433f61bbb4fdb9ae
+ +--- androidx.room:room-ktx:2.4.2 -> 2.5.2 (*)
+ +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.9.0 (*)
+ +--- org.wordpress:fluxc:2959-fa5de726746db9abca205b9c433f61bbb4fdb9ae (*)
+ +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+ +--- com.google.dagger:dagger:2.42 -> 2.50 (*)
+ +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
+ +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
+ \--- androidx.room:room-runtime:2.4.2 -> 2.5.2 (*)
Please review and act accordingly
<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>
<ACCUMULATED-VIOLATIONS>