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

[Bug] in landscape marking as paid with cash keeps user on collect payment screen #12632

Draft
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

backwardstruck
Copy link
Contributor

@backwardstruck backwardstruck commented Sep 17, 2024

Closes: #11661

Slack discussion.

Description

Addresses the issue where marking an order as paid with cash when switching from landscape mode to single pane mode keeps the user on the collect payment screen instead of redirecting them to the order list.

Problem:
When the device is in landscape mode, marking an order as paid via cash completes the operation behind the scenes, but the user remains on the collect payment screen.

Steps to reproduce

  1. Create a new order and add a product or custom amount.
  2. Tap on 'Collect Payment'.
  3. Rotate the device to landscape mode/change to split screen mode if on a tablet.
  4. Tap 'Cash' and then tap 'Mark as Paid'.
  5. Verify that you are redirected to the order list instead of remaining on the collect payment screen.

Alternate steps that @samiuelson and I discovered (seems to be the same underlying issue):

  1. Create a new order and add a product or custom amount.
  2. Tap on 'Collect Payment'.
  3. Rotate the device to landscape mode/change to split screen mode if on a tablet.
  4. Tap the back button.
  5. Verify that you are redirected to the order detail screen.

Testing information

  • Devices Tested: phone and tablet emulators
  • Scenarios Tested:
    • Creating a new order and marking it as paid in both portrait and landscape modes.
    • Ensuring the correct navigation flow from the collect payment screen to the order list.

The tests that have been performed

  • Verified the navigation flow in both portrait and landscape modes.

  • Ensured no regressions in the collect payment screen.

  • 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.

@backwardstruck backwardstruck added type: bug A confirmed bug. status: do not merge Dependent on another PR, ready for review but not ready for merge. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels Sep 17, 2024
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 17, 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
Commitab03fd1
Direct Downloadwoocommerce-wear-prototype-build-pr12632-ab03fd1.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 17, 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
Commitab03fd1
Direct Downloadwoocommerce-prototype-build-pr12632-ab03fd1.apk

@@ -244,8 +245,11 @@ class SelectPaymentMethodFragment : BaseFragment(R.layout.fragment_select_paymen
// We should pop the back stack to show the [OrderDetailsFragment].
findNavController().popBackStack()
} else {
if (isFragmentInBackStack(R.id.selectPaymentMethodFragment)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one partial fix if we can't come up with a better solution. But it only takes us back to the order detail screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mobile payments Related to mobile payments / card present payments / Woo Payments. status: do not merge Dependent on another PR, ready for review but not ready for merge. type: bug A confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants