Skip to content
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

Remove duplicate toolbar from package details screen #12576

Merged

Conversation

AnirudhBhat
Copy link
Contributor

@AnirudhBhat AnirudhBhat commented Sep 11, 2024

Closes: #12236

Description

This PR removes the duplicate toolbar from the Shipping Package Details screen. This issue was fixed earlier in #12489 but the last minute change of replacing BaseFragment with Fragment made it to reappear.

Steps to reproduce

  1. Navigate to order detail screen which is eligible for creating Shipping label
  2. Click on Shipping Label button
  3. Enter from and to address
  4. Navigate to package detail screen
  5. We see two toolbar instead of one

Testing information

I've tested this on my Pixel 4a device by navigating to Package details screen and ensured just a single toolbar is visible.

The tests that have been performed

Ensure that single toolbar is shown in package details screen.

Images/gif

Before

Before

After

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.

@AnirudhBhat AnirudhBhat added type: bug A confirmed bug. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Sep 11, 2024
@AnirudhBhat AnirudhBhat added this to the 20.4 milestone Sep 11, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 11, 2024

📲 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
Commit6291967
Direct Downloadwoocommerce-wear-prototype-build-pr12576-6291967.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 11, 2024

📲 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
Commit6291967
Direct Downloadwoocommerce-prototype-build-pr12576-6291967.apk

@backwardstruck backwardstruck self-assigned this Sep 11, 2024
@dangermattic
Copy link
Collaborator

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

@backwardstruck
Copy link
Contributor

Able to reproduce using this info.

Copy link
Contributor

@backwardstruck backwardstruck left a comment

Choose a reason for hiding this comment

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

Tested and was able to see the second toolbar removed. One note, while testing I encountered this crash. I think it's unrelated, but I can share the repro steps if you want me to ticket it separately:

FATAL EXCEPTION: main (Ask Gemini)
                                                                                                    Process: com.woocommerce.android.dev, PID: 9305
                                                                                                    java.lang.NumberFormatException: empty String
                                                                                                    	at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
                                                                                                    	at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
                                                                                                    	at java.lang.Float.parseFloat(Float.java:455)
                                                                                                    	at com.woocommerce.android.model.ShippingPackageKt.toAppModel(ShippingPackage.kt:82)
                                                                                                    	at com.woocommerce.android.ui.orders.shippinglabels.ShippingLabelRepository.getShippingPackages(ShippingLabelRepository.kt:80)
                                                                                                    	at com.woocommerce.android.ui.orders.shippinglabels.ShippingLabelRepository$getShippingPackages$1.invokeSuspend(Unknown Source:14)
                                                                                                    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:942)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7872)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
                                                                                                    	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@a1c6c7c, Dispatchers.Main.immediate]

Seems to be related to the test address I used.

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.63%. Comparing base (589df25) to head (6291967).
Report is 63 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #12576   +/-   ##
=========================================
  Coverage     40.62%   40.63%           
- Complexity     5669     5670    +1     
=========================================
  Files          1228     1228           
  Lines         68944    68944           
  Branches       9549     9549           
=========================================
+ Hits          28010    28013    +3     
+ Misses        38357    38355    -2     
+ Partials       2577     2576    -1     

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

@AnirudhBhat
Copy link
Contributor Author

Thanks for testing and noticing the crash @backwardstruck! I would really appreciate if you could send me the reproduction steps for the crash. Since I'm the exception catcher this week, I can post it on the WooMobileCUW. Thanks!

@AnirudhBhat AnirudhBhat merged commit 96a11a0 into trunk Sep 12, 2024
14 checks passed
@AnirudhBhat AnirudhBhat deleted the issue/12236-multiple-toolbar-package-details-screen branch September 12, 2024 05:43
@backwardstruck
Copy link
Contributor

Thanks for testing and noticing the crash @backwardstruck! I would really appreciate if you could send me the reproduction steps for the crash. Since I'm the exception catcher this week, I can post it on the WooMobileCUW. Thanks!

Yes, shared here.

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: bug A confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toolbar appearing twice in Package details screen
5 participants