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

[CredentialsImport] Call credentials flow call first, and then close parent #723

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

dbajpeyi
Copy link
Collaborator

@dbajpeyi dbajpeyi commented Dec 16, 2024

Reviewer: @GioSensation
Asana: https://app.asana.com/0/1203822806345703/1208958786488368/f

Description

On windows IWebView disposes after closeAutofillParent more efficiently (since https://github.com/duckduckgo/windows-browser/pull/2658/files#diff-e9708afe1dc71c217b0379bc7531fd02309a7ce40e69ce7e60e3bed7edde1160) now causing startCredentialsImportFlow call to be late. This causes the native import flow UI to not open anymore.

This PR changes the sequence of closeAutofillParent and startCredentialsImportFlow calls. Note that this will also affect MacOS, it does affect MAC a little bit as the parent closes a bit later than the import prompt. I think it's not bad enough, and doesn't call for multiple implementations

Tests

  • Tested on Mac

(Before)

close-parent-before-mac.mov

(After, regression in UX?)

close-parent-after-mac.mov
  • Tested on Windows
close-parent-windows.mov

@dbajpeyi dbajpeyi changed the title fix: call credentials flow call first, and then close parent [CredentialsImport] Call credentials flow call first, and then close parent Dec 16, 2024
Copy link
Member

@GioSensation GioSensation left a comment

Choose a reason for hiding this comment

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

Seems acceptable on macOS.

  1. Are there other scenarios that may have regressed on Windows? Have you checked all those CloseAutofillParentCalls?
  2. Can you check on macOS if there are other scenarios where we switched the call order and whether there is an impact on UX? Like the Manage… button?

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/bug/credentials-import-race-condition branch from 8f8c68b to 05651de Compare December 17, 2024 14:56
@dbajpeyi
Copy link
Collaborator Author

dbajpeyi commented Dec 17, 2024

@GioSensation

  1. Good point, switched up incontext signup too - doesn't seem problematic 05651de Nevermind, breaks extension tests, and it seems like this is not present on windows anyway. I don't see any other calls for closeautofillparent racing with other calls.
  2. Manage button was already tested here, both Mac and Windows. [DeviceInterface] Call closeautofillparent only after openManage calls #718. Somehow Mac is fine here, I didn't see any jittery UX.

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/bug/credentials-import-race-condition branch from 05651de to b4c96d2 Compare December 17, 2024 15:11
@dbajpeyi dbajpeyi merged commit 7623023 into main Dec 17, 2024
1 check passed
@dbajpeyi dbajpeyi deleted the dbajpeyi/bug/credentials-import-race-condition branch December 17, 2024 15:17
CDRussell pushed a commit to duckduckgo/Android that referenced this pull request Dec 18, 2024
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]>
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.

2 participants