-
Notifications
You must be signed in to change notification settings - Fork 11
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
[FeatureToggle] Add new autofill config for partial save trigger #724
Conversation
75c0d19
to
5feeeb0
Compare
@@ -84,8 +84,8 @@ describe('Test the form class reading values correctly', () => { | |||
<input type="password" value="" autocomplete="new-password" /> | |||
<button type="submit">Sign up</button> | |||
</form>`, | |||
expHasValues: true, | |||
expValues: { credentials: { username: 'testUsername' } }, | |||
expHasValues: false, |
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.
Tests (this and the others) reverted to match https://github.com/duckduckgo/duckduckgo-autofill/pull/702/files so I am confident we're good here.
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.
const values = prepareFormValuesForStorage({ | ||
credentials: { username: '[email protected]' }, | ||
// @ts-ignore | ||
creditCards: {}, | ||
// @ts-ignore | ||
identities: {}, | ||
}); | ||
expect(values.credentials?.username).toBe('[email protected]'); | ||
expect(values.credentials).toBeUndefined(); |
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.
b0a6fbc
to
c887cf9
Compare
@GioSensation Looking at the test cases is a good start! |
@@ -244,6 +244,7 @@ export function createWebkitMocks(platform = 'macos') { | |||
password_generation: true, | |||
credentials_saving: true, | |||
inlineIcon_credentials: true, | |||
partial_form_saves: true, |
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.
c887cf9
to
545d9aa
Compare
545d9aa
to
29a049b
Compare
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.
Just a nit plus a suggestion to use the expected future value on Android integration tests. Otherwise, it's looking good. Thanks for updating as suggested on MM.
@@ -56,6 +56,7 @@ test.describe('Android Save prompts', () => { | |||
androidStringReplacements({ | |||
featureToggles: { | |||
credentials_saving: true, | |||
partial_form_saves: false, |
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.
In the future this will also be set to true, so I'm inclined to flip this right away and keep the tests working as they are expected to when the feature is actually enabled. Then I see below a test that checks that the feature flag is respected, so we're covered.
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.
Good point, actually the feature toggle is already set to true now https://github.com/duckduckgo/privacy-configuration/pull/2593/files
Boolean(values?.credentials?.username) && | ||
Boolean(this.settings.featureToggles.partial_form_saves); |
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.
Seems like we don't need to cast to a Boolean. Certainly not for the last one. Let's simplify. 🙂
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.
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.
But I could've missed something, not arguing there 😄
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.
It's getting philosophical, don't want to argue. My stance is: the language does that Boolean cast for you. You're just adding noise in the source code. Arguably, sometimes it can be useful, but casting a feature flag is just noise IMO. Anyway, don't want to block on this.
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.
Kept Boolean
in the username part because during debugging shouldTriggerPartialSave
becomes an empty one, and has caught me off guard a couple of times. The last one is fair to change, updated :)
Thanks for the comments.
Task/Issue URL: https://app.asana.com/0/1209009001482464/1209009001482464 Autofill Release: https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/16.1.0 ## Description Updates Autofill to version [16.1.0](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/16.1.0). ### Autofill 16.1.0 release notes ## What's Changed * [DeviceInterface] Call closeautofillparent only after openManage calls by @dbajpeyi in duckduckgo/duckduckgo-autofill#718 * [CredentialsImport] Call credentials flow call first, and then close parent by @dbajpeyi in duckduckgo/duckduckgo-autofill#723 * [FeatureToggle] Add new autofill config for partial save trigger by @dbajpeyi in duckduckgo/duckduckgo-autofill#724 **Full Changelog**: duckduckgo/duckduckgo-autofill@16.0.0...16.1.0 ## Steps to test This release has been tested during autofill development. For smoke test steps see [this task](https://app.asana.com/0/1198964220583541/1200583647142330/f). Co-authored-by: dbajpeyi <[email protected]>
Reviewer: @GioSensation
Asana: https://app.asana.com/0/72649045549333/1209005356472261/f
Description
Since Windows and Android are blocked out from regular autofill releases since https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/16.0.0 because, the implementation for partial saves is not ready yet. This PR adds the implementation behind a feature toggle
partial_form_saves
which will be disabled by default. This way we can continue releasing improvements on Android/Windows without autofill regression.Steps to test
Use
deviantart.com
to test the login and reset password scenario.