Skip to content

Conversation

@joshheald
Copy link
Contributor

@joshheald joshheald commented Jul 11, 2025

Part of: WOOMOB-696

Description

This PR adds the error state for test scan's failing in the Star set up flow.

To do this, I've updated the flow definition to use a dictionary, rather than a linear array. Steps now define their own transitions.

In future, we may want an associated value on the error transition to pass different errors, but it might break the hashability and be a bit of a pain. We'll see if we need it, I don't want to over-complicate at the moment.

Steps to reproduce

  1. Open POS, tap ... > Barcode scanning
  2. Follow the Star flow
  3. When asked to scan the test barcode, scan a different barcode instead.
  4. Observe that you're shown the error.

Retry restarts the flow
Back takes you to the test page again.

Screenshots

error.flow.mp4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@joshheald joshheald added this to the 22.9 milestone Jul 11, 2025
@joshheald joshheald added type: task An internally driven task. status: feature-flagged Behind a feature flag. Milestone is not strongly held. feature: POS labels Jul 11, 2025
@joshheald joshheald requested a review from staskus July 11, 2025 10:27
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr15903-8dd20c3
Version22.7
Bundle IDcom.automattic.alpha.woocommerce
Commit8dd20c3
Installation URL3r344tt8p9sv0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

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

Thanks, I like the system. Looks simple enough and fitting for a few step flows.

}

// MARK: - Step Identifiers
enum PointOfSaleBarcodeScannerStepID: String, CaseIterable {
Copy link
Contributor

Choose a reason for hiding this comment

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

I realized in the analytics PR as well that we need a strongly typed step definition. Therefore, it helps the analytics as well.

@staskus staskus merged commit 0ffb257 into trunk Jul 14, 2025
24 of 27 checks passed
@staskus staskus deleted the woomob-696-woo-posbarcodes-set-up-flow-failure-screen branch July 14, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: POS status: feature-flagged Behind a feature flag. Milestone is not strongly held. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants