Skip to content

Issue/13326 scan full screen loading & error handling#13920

Merged
malinajirka merged 11 commits intodevelopfrom
issue/13326-scan-error-handling
Feb 1, 2021
Merged

Issue/13326 scan full screen loading & error handling#13920
malinajirka merged 11 commits intodevelopfrom
issue/13326-scan-error-handling

Conversation

@ashiagr
Copy link
Copy Markdown
Contributor

@ashiagr ashiagr commented Jan 31, 2021

Parent #13326

This PR displays full screen loading and errors on fetch scan and start scan requests.

Full screen loading/ errors

Loading (0) No Network (1) Generic Request Failed (3) Start Scan Request Failed (4)
loading_scan no-network-full screen generic_request_failed Something went wrong_start_scan

Snack bars

No Network (5) Generic Request Failed (6)
no network snackbar generic_request_failed_snackbar

To test

Loading (0), No Network (1)

  1. Fresh install the app and logon to wp.com account with site having scan capability
  2. Switch to site with scan capability
  3. Enable airplane mode
  4. Click Scan menu
  5. Notice that fullscreen "Loading scan" is shown, followed by full screen "No network available" message
  6. Disable airplane mode
  7. Click retry
  8. Notice that scan content is shown

No network snackbar (5)

  1. Continuing from above, while being on the scan screen, enable airplane mode
  2. Click scan button
  3. Notice that a snackbar is shown with no network available message

Generic Request Failed (3), Start Scan Request Failed (4), Generic Request Failed snackbar (6)

These states can be tested by using
ScanViewModel tests:

Generic Request Failed (3)
given fetch scan fails, when scan state fetched over empty scan state, then request failed ui state shown
given request failed error ui state, when contact support is clicked, then contact support screen is shown

Start Scan Request Failed (4)
given scan start request fails, when scan button is clicked, then request failed state is shown
given start scan request failed error state, when contact support is clicked, then contact support shown

Generic Request Failed snackbar (6)
given fetch scan state fails, when scan state fetched over last scan state, then request failed msg shown

Notes:

  1. Start scan request fail displays a full screen error with contact support button, message string is copied from the iOS app.
  2. I plan to implement pull-to-refresh which will enable users to retry fetch scan state on full screen errors.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@ashiagr ashiagr added this to the 16.7 milestone Jan 31, 2021
@ashiagr ashiagr self-assigned this Jan 31, 2021
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 31, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 31, 2021

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks @ashiagr! Great job ;). It looks good overall, I've left one blocking comment ("translatable=false") and a few nitpicks.

🔍 Nitpick: When I click on "retry" when my internet connection is still disabled, there is no loading indicator -> it seems like the button doesn't work. We usually add "500ms" delay in such scenarios so the loading is displayed for a bit.

@ashiagr
Copy link
Copy Markdown
Contributor Author

ashiagr commented Feb 1, 2021

Thanks for the review @malinajirka! I've addressed your comments and answered questions.

Nitpick: When I click on "retry" when my internet connection is still disabled, there is no loading indicator -> it seems like the button doesn't work. We usually add "500ms" delay in such scenarios so the loading is displayed for a bit.

Added retry delay in d9ea5d2.

Ready for another round.

Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! ;)

@malinajirka malinajirka merged commit 07c4738 into develop Feb 1, 2021
@malinajirka malinajirka deleted the issue/13326-scan-error-handling branch February 1, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants