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

Sync form factor specific favorites #2029

Merged
merged 57 commits into from
Nov 10, 2023
Merged

Sync form factor specific favorites #2029

merged 57 commits into from
Nov 10, 2023

Conversation

ayoy
Copy link
Contributor

@ayoy ayoy commented Sep 21, 2023

Task/Issue URL: https://app.asana.com/0/1201493110486074/1204926049616866/f
Tech Design URL: https://app.asana.com/0/481882893211075/1205418608802079/f

Description:
This change introduces form factor specific favorites to be used when Sync is enabled.
1 favorites folder is replaced by 3 folders – mobile, desktop and unified.
Users always see only 1 folder and it's their form-factor-specific one. Only users with Sync enabled
get to choose whether they want to see the form-factor-specific favorites or unified (desktop + mobile)
favorites. The setting itself is synced between devices in the Sync account.
BookmarkEntity's isFavorite is replaced with isFavorite(on:) taking folder as a parameter.
API for adding to favorites and removing from favorites was updated to take multiple favorites
folders as needed.
FavoritesDisplayMode enum is introduced to manage display mode in clients.
Bookmarks and Favorites related view models used on iOS are updated to take favorites display mode
and reload their data as the mode changes.
In SyncDataProviders, an abstract SettingSyncHandler class was added to support adding
an arbitrary setting (key-value pair) to Sync. It's subclassed by EmailProtectionSyncHandler
and FavoritesDisplayModeSyncHandlerBase (that needs to be subclassed in client apps due to differences
in User Defaults storage between iOS and macOS apps).

Steps to test this PR:
Refer to BSK PR for testing steps.

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

Internal references:

Software Engineering Expectations
Technical Design Template

@github-actions
Copy link

github-actions bot commented Sep 21, 2023

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against 4a5dded

@ayoy ayoy requested a review from bwaresiak September 21, 2023 14:22
@ayoy ayoy assigned bwaresiak and unassigned ayoy Sep 21, 2023
@ayoy ayoy marked this pull request as ready for review September 21, 2023 14:31
@ayoy
Copy link
Contributor Author

ayoy commented Sep 22, 2023

Adding a "Pending Product Review" label (in absence of "DO NOT MERGE") so that it can't be accidentally merged.

@ayoy ayoy merged commit 02329f8 into develop Nov 10, 2023
10 checks passed
@ayoy ayoy deleted the dominik/sync-ffs-favorites branch November 10, 2023 16:01
samsymons added a commit that referenced this pull request Nov 10, 2023
* develop:
  Sync form factor specific favorites (#2029)
  Add Sync e2e test flows (#2127)
  switch to true|false for protectionsState param (#2137)
samsymons added a commit that referenced this pull request Nov 12, 2023
# By Dominik Kapusta (1) and others
# Via GitHub
* develop:
  Add DesignResourcesKit to SyncUI (#2147)
  Sync form factor specific favorites (#2029)
  Add Sync e2e test flows (#2127)
  switch to true|false for protectionsState param (#2137)

# Conflicts:
#	DuckDuckGo/AppDelegate.swift
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.

3 participants