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

Display error icon in CardInputWidget #2200

Closed
FrancoisBlavoet opened this issue Feb 19, 2020 · 2 comments · Fixed by #2224
Closed

Display error icon in CardInputWidget #2200

FrancoisBlavoet opened this issue Feb 19, 2020 · 2 comments · Fixed by #2224
Assignees
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@FrancoisBlavoet
Copy link
Contributor

CardInputWidget only relays its error state visually by coloring the text in red :

image

The issue is that for many users (including myself) this is almost impossible to differentiate from the black font used in the normal case, so the error state is not visible.

A possible fix would be to rely on the error icon of the TextInputLayouts these fields are wrapped with.

(the widget also correctly adds an error message for blind users, 💯 for that !)

Android version

API 29

Impacted devices

Pixel 4xl

Installation method

stripe 13.2.0 dependency in instacart app
also the sample app in this repo

SDK version

stripe 13.2.0

@mshafrir-stripe mshafrir-stripe self-assigned this Feb 25, 2020
@mshafrir-stripe mshafrir-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Feb 25, 2020
@mshafrir-stripe
Copy link
Collaborator

@FrancoisBlavoet please take a look at the PR, specifically the recording.

mshafrir-stripe added a commit that referenced this issue Feb 26, 2020
Summary
After validating `CardInputWidget` input (i.e. when a params object is
attempted to be created), if validation fails, show an error icon for
the brand icon.

Motivation
Fixes #2200

Testing
Unit test
Manual validation
@FrancoisBlavoet
Copy link
Contributor Author

Thanks for the quick fix @mshafrir !

Looks like this will make it a bit easier to realize that you are in an error state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants