Skip to content

Improving autofill background appearance on password inputs#7099

Merged
Luke9389 merged 6 commits into
Expensify:mainfrom
anthony-hull:anthony--password-autofill-background
Jan 26, 2022
Merged

Improving autofill background appearance on password inputs#7099
Luke9389 merged 6 commits into
Expensify:mainfrom
anthony-hull:anthony--password-autofill-background

Conversation

@anthony-hull

@anthony-hull anthony-hull commented Jan 9, 2022

Copy link
Copy Markdown
Contributor

Details

When auto filling any normal field we should see the whole input styled by autofill stylings
When autofilling a password input we should see part of the input styled with a strait border and a space before the visibility toggle button.

Fixed Issues

$ #7016

Tests

  1. At login screen auto fill email box
  2. see the background fills the whole box
  3. autofill the password box
  4. see that the box is filled like the screenshots
  • Verify that no errors appear in the JS console

QA Steps

  • Verify that no errors appear in the JS console

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

image

image

image
Hasn't regressed on other non secure inputs

Mobile Web

image
image

Desktop

There isn't any autofill on this

iOS

iOS doesn't colour backrounds on autofill. N/A

Android

image

Fix border underling for inputs on android:
Screenshot_20220119-160937_New Expensify

Screenshot_20220119-160944_New Expensify

@anthony-hull anthony-hull marked this pull request as ready for review January 10, 2022 22:03
@anthony-hull anthony-hull requested a review from a team as a code owner January 10, 2022 22:03
@MelvinBot MelvinBot removed the request for review from a team January 10, 2022 22:03
@anthony-hull

anthony-hull commented Jan 10, 2022

Copy link
Copy Markdown
Contributor Author

Hey team, I'm struggling to test on iOS. The autofill isn't triggering on the login. I would install 1Password but I don't have a paid iOS dev account to build for physical devices, so I'm stuck on the simulator. Do you have an idea?
Also and ideas on how to test autofill on the desktop client?

@rushatgabhane

Copy link
Copy Markdown
Member

Hey team, I'm struggling to test on iOS. The autofill isn't triggering on the login. I would install 1Password but I don't have a paid iOS dev account to build for physical devices, so I'm stuck on the simulator. Do you have an idea?
Also and ideas on how to test autofill on the desktop client?

On it! Just need some time

@anthony-hull

Copy link
Copy Markdown
Contributor Author

@Luke9389 do you know why that unit test is failing?

@rushatgabhane

rushatgabhane commented Jan 11, 2022

Copy link
Copy Markdown
Member

do you know why that unit test is failing?

It's an issue with OSBotify's GPG key. Not related to the PR

@rushatgabhane

rushatgabhane commented Jan 11, 2022

Copy link
Copy Markdown
Member

@anthony-hull
I tried all major password managers and couldn't get them to autofill on desktop. Password managers don't support it yet I think.

On iOS, I can autofill but the color of TextInput stays the same so nothing to show here

@anthony-hull

Copy link
Copy Markdown
Contributor Author

Thank you very much for the help!

Does it behave the same on the prod app from the app store?

@rushatgabhane

rushatgabhane commented Jan 11, 2022

Copy link
Copy Markdown
Member

Does it behave the same on the prod app from the app store

It goes yellow for me. Hmm, weird

Comment thread src/components/TextInput/BaseTextInput.js Outdated

@rushatgabhane rushatgabhane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work! Some suggestions

@rushatgabhane

rushatgabhane commented Jan 11, 2022

Copy link
Copy Markdown
Member

@anthony-hull
There's a very small white gap at bottom of TextInput when you fill with a password manager (Lastpass) on Android. The gap size changes when you hide/show password.

Is this fixable?
Screenshot_20220111-161754 (2)

@anthony-hull

Copy link
Copy Markdown
Contributor Author

I will

@anthony-hull There's a very small white gap at bottom of TextInput when you fill with a password manager (Lastpass) on Android. The gap size changes when you hide/show password.

Is this fixable? Screenshot_20220111-161754 (2)

I'll have a look! Should be able to today. If not tomorrow :)

@anthony-hull

Copy link
Copy Markdown
Contributor Author

I think this happens when you auto fill into the empty field when it's not using the secure input prop. That is when the password is toggled to visible and then you autofill.

Autofilling the field in its default state I couldn't reproduce this.

@rushatgabhane

rushatgabhane commented Jan 12, 2022

Copy link
Copy Markdown
Member

I think this happens when you auto fill into the empty field when it's not using the secure input prop. That is when the password is toggled to visible and then you autofill.

Oh true, have you found a solution for this?

@anthony-hull

Copy link
Copy Markdown
Contributor Author

I've not been able to so far. I've not done much native visual debugging before now.
I can't see anything different about the properties of the native element between the two states in Flipper.

@anthony-hull

Copy link
Copy Markdown
Contributor Author

do you have any ideas? or advice on how to debug this?

@rushatgabhane

Copy link
Copy Markdown
Member

Hmm you could experiment with padding. Maybe 1px more towards the bottom.

@anthony-hull

Copy link
Copy Markdown
Contributor Author

I tried padding. Didn't seem to make a difference. I'll have another go tomorrow morning!

@rushatgabhane

rushatgabhane commented Jan 14, 2022

Copy link
Copy Markdown
Member

Alright, I took a look into this and like @anthony-hull said, this only happens if you autofill when password is visible.

On second thoughts, to notice this you gotta zoom and pixel peep.
I think this is good to merge.

cc: @Luke9389 lmk if you think this should be fixed

@Luke9389

Copy link
Copy Markdown
Contributor

Hmm, let me see if I can crack it. It seems like we're off by the width of the border.
@shawnborton what do you think about this? We've got a line of white pixels at the bottom of this input (I see it in a few other screenshots too).

@rushatgabhane

rushatgabhane commented Jan 15, 2022

Copy link
Copy Markdown
Member

I was wrong. It also happens when you use google autofill. And it's very noticeable

screen-20220115-170514.mp4

@shawnborton

Copy link
Copy Markdown
Contributor

I think we should try to fix the 1px gap issue before merging this.

@anthony-hull

Copy link
Copy Markdown
Contributor Author

That is true.
I just tried the app on my iPhone installed from the App Store and auto fill worked with 1Password and no highlight showed. Looks to me there isn't a background for auto fill on iOS

@rushatgabhane

rushatgabhane commented Jan 18, 2022

Copy link
Copy Markdown
Member

Bitwarden, Lastpass and iOS password manager don't highlight. Okay, probably safe to assume that there is no highlighting on iOS 😅

@anthony-hull

anthony-hull commented Jan 18, 2022

Copy link
Copy Markdown
Contributor Author

great news! I'll update the PR tomorrow morning with test screenshots and the fix for this second issue too!
Thanks for the help :)

autoCompleteType={props.autoCompleteType === 'new-password' ? 'password' : props.autoCompleteType}
innerRef={ref}

// style added here to fix autofill background not filling to the bottom of the input

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Start the comment with capital letter

@rushatgabhane rushatgabhane Jan 19, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@anthony-hull LGTM
approving after this is done 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@anthony-hull waiting on this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this file doesn't exist anymore. I reverted the commit.

@rushatgabhane rushatgabhane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Luke9389 looks like the 1px gap issue is for TextInput component too.
It's reproducible on main for web.

It's on inputs for pages like DebitCardPage, but not on phone/email input even though both use the same component.

image

This is unrelated to the current PR and issue. What do you suggest is the best course of action?
Anthony's fix for Android doesn't work here because only some TextInputs have the 1px gap issue.

@anthony-hull

Copy link
Copy Markdown
Contributor Author

Feels too much of a hack to do this to all inputs.
I think we need another issue and to have a root cause rather than a hack to hide it

@rushatgabhane

Copy link
Copy Markdown
Member

I agree @anthony-hull

@Luke9389

Copy link
Copy Markdown
Contributor

Yup, I agree that we should open a new issue and solve the gap separately.

@Luke9389

Copy link
Copy Markdown
Contributor

I think @rushatgabhane should be the one to get the bug report credit for that since he mentioned it first, here. Are you ok with that @anthony-hull?

@anthony-hull

Copy link
Copy Markdown
Contributor Author

Yeah that makes sense to me!
Thanks for asking

@rushatgabhane rushatgabhane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Luke9389 LGTM! 🎉 I've put the white line issue on slack so that it can be created.

@Luke9389

Copy link
Copy Markdown
Contributor

Just wanted to let y'all know that I'll review this tomorrow. Super stacked with stuff to do today 😅

@rushatgabhane

rushatgabhane commented Jan 21, 2022

Copy link
Copy Markdown
Member

Nw, take your time 😄

@anthony-hull

Copy link
Copy Markdown
Contributor Author

Cool :)
Hoping no changes. I'm on holiday until Tuesday with no access to a computer

@anthony-hull

Copy link
Copy Markdown
Contributor Author

I'm back today :)

@rushatgabhane

Copy link
Copy Markdown
Member

@Luke9389 bump :)

@Luke9389

Copy link
Copy Markdown
Contributor

Thanks, @rushatgabhane. Sorry, I've been swamped recently :D

@Luke9389 Luke9389 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Luke9389 Luke9389 merged commit d6af3c1 into Expensify:main Jan 26, 2022
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

OSBotify commented Feb 1, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @Luke9389 in version: 1.1.33-4 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify

OSBotify commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @sketchydroide in version: 1.1.34-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants