-
Notifications
You must be signed in to change notification settings - Fork 120
[Mobile Payments] [WIP] Disable disconnect button while checking for reader software update #5008
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
[Mobile Payments] [WIP] Disable disconnect button while checking for reader software update #5008
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can trigger an installable build for these changes by visiting CircleCI here. |
Generated by 🚫 dangerJS |
|
Hey @joshheald - I was looking at the dark mode comment you posted here and I cannot reproduce it with this branch - can you give it a spin? This is what I see: |
Yep, looks good to me too @allendav
|
koke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will work in most cases, but the state would be better kept on the service and not the view model. For instance, when you visit the settings page, it will start checking for an update. If you quickly navigate out of that view and go back in:
- The view triggers a second check for updates while the first one is still in progress
- The second check fails immediately because the SDK is busy with the first one
- It fails silently as if there was no update found, and the disconnect button becomes enabled
- If you tap to disconnect, the first check is still running, so the SDK is busy and it fails silently
I think the PR is good, but commenting more generally on the feature, I feel like we're giving too much weight to something that, while important, is quite infrequent. Every time you load that screen or connect to a reader, a new check is launched with prevents you from disconnecting until that's finished. The checkForUpdate operation is cancelable, so I think it might be better if we checked for updates as often as we wanted, but canceled that operation as soon as the user requested a different thing (disconnect, collect payment,...). I'd also hide the "Update Reader Software" button instead of having it disabled.
I think so too.
Good point! I'll open a issue for moving this responsibility into the service
We are. The service could keep track of update checks and return a cached value if the last check was say within a day, with a pull to refresh allowing force refresh. Another good idea for moving this to the service layer especially with SDK 2 changes |


Fixes #4922
Changes:
@adamzelinski - I've changed the info image to an activity spinner while we are checking for updates. I'll posted that movie here below. Please let me know if there other design changes you'd expect (see movies below)
@koke - I've based this off of issue/4990-display-version in order to pick up the changes there - once that is reviewed this can be rebased and merged to develop
Movie (with spinner added)
RPReplay_Final1631834941.MP4
Update release notes:
RELEASE-NOTES.txtif necessary.