-
Notifications
You must be signed in to change notification settings - Fork 14
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
Prompt to store cards and identities #461
Conversation
# By Tomas Strba (6) and others # Via GitHub (1) and Tomas Strba (1) * develop: Logins+ authentication (#438) Update privacy dashboard to main (#451) Version 0.19.1 Remove mouse event listeners on browser close (#448) Find in Page Hotfix + refactoring of forced unwrapping (#450) Memory leak fixed (#449) Version 0.19.0 Top autofill (#432) Option to add new notes or edit existing is disabled (#446) Use our own autoconsent fork (#444) New Feedback Form (#424) Update privacy dashboard (#440) # Conflicts: # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved # DuckDuckGo/SecureVault/View/PasswordManager.storyboard
# By Dominik Kapusta (2) and others # Via GitHub * develop: Animate dashboard resizing (#454) Dashboard in background tabs (#458) Fix resubmitting search with spaces (#456) Use smarter encryption feature from the BSK (#441) Use pageZoom instead of magnification when adjusting web view zoom level (#455) Version 0.19.2 # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
DuckDuckGo/Preferences/View/PrivacySecurityPreferencesTableCellView.xib
Outdated
Show resolved
Hide resolved
return label | ||
} | ||
|
||
static func optionalLabel(titled title: String?) -> NSTextField? { |
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.
Don't love this function signature, am open to suggestions.
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.
Technically we can do this:
identity.addressStreet
.flatMap(NSTextField.label(titled:))
.map(identityStackView.addArrangedSubview(_:))
Here we use Optional.flatMap
which is a no-op for .none
and otherwise produces a non-optional NSTextField, which is then added to the stack view using map
. And then we don't need optionalLabel
and a variant of addArrangedSubview
that takes an optional. We can even go further and do this:
[
identity.addressStreet,
identity.addressStreet2,
identity.addressCity,
identity.addressProvince,
identity.addressPostalCode,
identity.addressCountryCode
]
.forEach { value in
value.flatMap(NSTextField.label(titled:))
.map(identityStackView.addArrangedSubview(_:))
}
I personally consider such code "clever", which does not necessarily mean "good", so it's a matter of deciding if we think it's understandable to the reader. Perhaps it's a valid alternative to having optionalLabel
kind of API :)
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.
-
https://www.roboform.com/filling-test-all-fields
Saw this form create a prompt once, but couldn't get it to do it again even after clearing data and running a clean build. It also didn't offer to re-fill them when I came back to the page when I did have some data saved. -
Disabling the prompts worked, but turning them on again I wasn't getting prompts for the address or credit cards. Also tried fire button and restarting the browser.
-
Would be good if the test outline had some definitive test sites we can use. That might mean creating them in our privacy test pages if there aren't some good public ones.
Looks like Emanuelle also has some issue so going to leave this for now. Ping me when it's ready for another look
# By Tomas Strba (3) and others # Via GitHub * develop: Testing Checklist Updates (#480) Xcode Clean Up (#479) External App Scheme permission (#419) Update dashboard to correct version (#477) Update BSK to fix percent encoding query parameters (#475) bump version 0.21.0 add alternate for paste and match with style (#474) First reponder issues when switching tabs (#464) Pre-beta copy updates (#472) Improvements to data clearing (#467) Open feedback form upon tapping "Send Feedback" in the About page (#473) new tab tweaks (#471) # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved # DuckDuckGo/Secure Vault/View/SaveIdentityPopover.swift # DuckDuckGo/Secure Vault/View/SaveIdentityViewController.swift # DuckDuckGo/Secure Vault/View/SavePaymentMethodPopover.swift # DuckDuckGo/Secure Vault/View/SavePaymentMethodViewController.swift
Signed-off-by: Emanuele Feliziani <[email protected]>
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.
LGTM! I tested it in various ways and it does the job[0] 🚀 Great stuff! Please have a look into my comments for a possible alternative to optionalLabel
.
[0] - Actually, I found that the CC info is not saved on Catalina. Saving identities and passwords work fine. On Big Sur it all works fine. I believe it's something on the JS side though, what do you think? Having said that, the Logins+ UI on Catalina has more issues (not related to this project) - perhaps it's just a separate topic to handle with a separate project. Or it will wait until we drop Catalina support 🤔
Good catch on the Catalina issue, I took a look through the code and also think that this is something on the JS side. This is one I'm going to write up as a separate task before merging, and then try to set up my spare laptop with Catalina so that I can test it later in the week. Catalina support is something I would personally love to drop, it causes us quite a few headaches 😩 |
Task/Issue URL: https://app.asana.com/0/0/1201938691568505/f iOS PR: duckduckgo/iOS#1086 macOS PR: duckduckgo/macos-browser#461 Optional: CC: @brindy Description: This PR updates BrowserServicesKit to handle the new pmHandlerStoreData call. As a part of this, it runs some logic to look up whether the provided payment method or address already exist in the database. Steps to test this PR: See macOS PR for more information
I've written up a task for myself to get 10.15 set up and to do a deep dive into Logins+ issues, starting with this CC issue you found. 🙂 I've set it due Wednesday, but it might be later in the week depending on how busy the next couple days are. |
The push build is failing on a test that is known to be flaky, but the PR build has succeeded. I ran this test locally, and confirmed tests are green (log attached). I'm going to run this one more time just in case, but if it fails again I'm going to merge it. |
Task/Issue URL: https://app.asana.com/0/0/1201938691568506/f
Tech Design URL:
CC: @brindy
Description:
This PR updates the macOS browser to support saving and storing payment methods and identities.
Steps to test this PR:
Test websites:
Testing checklist:
Internal references:
Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM