-
Notifications
You must be signed in to change notification settings - Fork 33
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
sync conect #281
sync conect #281
Conversation
…f creating / parsing the sync codes
# Conflicts: # Package.swift
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.
Looks great! Only a couple of minor comments.
let request = api.createRequest(url: endpoints.connect, | ||
method: .POST, | ||
headers: ["Authorization": "Bearer \(token)"], | ||
parameters: [:], | ||
body: body, | ||
contentType: "application/json") |
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.
Tiny nitpick, this feels to me like the user of the API code has to care too much about the format of the request (like having to format the authorization header manually, and specify the content type string).
I assume we'll be needing to make similar calls in a number of other places, so it would be nice to have it handled more succinctly from the caller's perspective. What do you think?
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.
Agree the authorization header could be hidden away (other headers are already added elsewhere), but everything else is the responsibility of the api call to set, so laying it out like this shows the intent. If I were to change anything anything it might be to do something like this:
api.createAuthenticatedRequest(...)
Maybe body
could be more explicitly jsonBody
then there'd be no need to set the content type either, I suppose.
I think we should see what we end up doing for the actual data sync and then refactor then. I don't really want to define something now that might get changed later tbh.
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! Love to see polling mechanism in BSK as originally planned 👏
Task/Issue URL: https://app.asana.com/0/0/1204266236802307/f Tech Design URL: CC: **Description**: Add sync connect flow. **Steps to test this PR**: See duckduckgo/BrowserServicesKit#281 for details. <!-- Tagging instructions If this PR isn't ready to be merged for whatever reason it should be marked with the `DO NOT MERGE` label (particularly if it's a draft) If it's pending Product Review/PFR, please add the `Pending Product Review` label. If at any point it isn't actively being worked on/ready for review/otherwise moving forward (besides the above PR/PFR exception) strongly consider closing it (or not opening it in the first place). If you decide not to close it, make sure it's labelled to make it clear the PRs state and comment with more information. --> --- ###### Internal references: [Pull Request Review Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f) [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) **When ready for review, remember to post the PR in MM**
Task/Issue URL: https://app.asana.com/0/0/1204266236802307/f Tech Design URL: CC: Description: Adds Sync "connect" flow. Steps to test this PR: See duckduckgo/BrowserServicesKit#281 for details Copy Testing: Use of correct apostrophes in new copy, ie ’ rather than ' Orientation Testing: Portrait Landscape Device Testing: iPhone SE (1st Gen) iPhone 8 iPhone X iPhone 14 Pro iPad OS Testing: iOS 14 iOS 15 iOS 16 Theme Testing: Light theme Dark theme
* main: sync conect (#281) Fix message registration on script reloading (#302) Remove codeowner (#301) Feature flagging with autofill subfeatures (#270) Update codeowner (#297) Autofill change to sorting algorithm for displaying logins (#243) Update autofill to 6.4.3 (#279) move AppHTTPSUpgradeStore to BSK (#267) Update Package.swift syntax to Swift 5.7 (#280) Use JSON sync code format (#271) Update autofill to 6.4.1 (#273) Make FeatureName a struct so it can be extended from client code (#276) add count of all bookmarks in domain to view model (#272)
# By Alexey Martemyanov (2) and others # Via Alexey Martemyanov (1) and GitHub (1) * main: sync conect (#281) Fix message registration on script reloading (#302) Remove codeowner (#301) Feature flagging with autofill subfeatures (#270) Update codeowner (#297) Autofill change to sorting algorithm for displaying logins (#243) Update autofill to 6.4.3 (#279) move AppHTTPSUpgradeStore to BSK (#267) Update Package.swift syntax to Swift 5.7 (#280) Use JSON sync code format (#271) Update autofill to 6.4.1 (#273) # Conflicts: # Package.resolved # Package.swift
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: https://app.asana.com/0/0/1204266236802307/f
iOS PR: duckduckgo/iOS#1604
macOS PR: duckduckgo/macos-browser#1062
What kind of version bump will this require?: Major
Optional:
Tech Design URL:
CC:
Description:
Add sync connect flow.
Steps to test this PR:
iOS connect from macOS
iOS connect from iOS
OS Testing:
Internal references:
Software Engineering Expectations
Technical Design Template