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

text zoom improvements #3509

Merged
merged 42 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f869419
add page zoom menu option and fix dependency on AppDependencyProvider…
brindy Oct 23, 2024
866c271
fix settings bug and retain cycle and remove unneed input to content …
brindy Oct 23, 2024
d9d1e4e
migrate to using default zoom level rather than text size
brindy Oct 24, 2024
8a1e890
clean up settings and use an enum for the zoom levels
brindy Oct 24, 2024
2d3b907
more renaming
brindy Oct 24, 2024
256ec20
show slide sheet on phone
brindy Oct 24, 2024
d43a56c
fix ui glitch
brindy Oct 24, 2024
d4e968e
Merge branch 'main' into brindy/easier-page-zoom
brindy Oct 25, 2024
a52dbf1
restore global settings in script
brindy Oct 25, 2024
6bee1ce
extract code into own files and tweakk UI
brindy Oct 25, 2024
10b121e
Design check in feedback and enable on iPad
brindy Oct 28, 2024
e31637e
move forget text zoom to right place
brindy Oct 29, 2024
e1b6cd3
disable on ipad
brindy Oct 30, 2024
cb39cb8
Merge branch 'main' into brindy/easier-page-zoom
brindy Oct 30, 2024
cb76df3
add pixels
brindy Oct 30, 2024
2ec09c8
Merge branch 'main' into brindy/easier-page-zoom
brindy Oct 30, 2024
8a5c093
swift lint and a compile error
brindy Oct 30, 2024
836e30b
use correct pixel parameters
brindy Oct 31, 2024
fe7329a
add mock domain text level storage
brindy Oct 31, 2024
78623cc
handle landsape better
brindy Oct 31, 2024
067d5aa
Merge branch 'main' into brindy/easier-page-zoom
brindy Oct 31, 2024
c87d7d0
create coordinator to handle all interactions with text zoom
brindy Oct 31, 2024
36301c5
remove textsize js
brindy Oct 31, 2024
a8c4ef2
show percent in menu when appropriate. if set back to app default rem…
brindy Oct 31, 2024
06a128d
fix tests
brindy Nov 1, 2024
b6e0461
unit tests for text zoom coordinator
brindy Nov 1, 2024
8431f65
Merge branch 'main' into brindy/easier-page-zoom
brindy Nov 4, 2024
2dd2aa4
swiftlint
brindy Nov 4, 2024
24ebae7
update settings footer for text zoom
brindy Nov 4, 2024
7bed09e
fix ipad bug where it disables the ui
brindy Nov 7, 2024
8f365e6
update from ship review
brindy Nov 7, 2024
254015d
tweak code layout
brindy Nov 7, 2024
620a649
address bar setting should not be visible on ipad
brindy Nov 11, 2024
a14e301
merge main, fix conflicts, bump bsk
brindy Nov 11, 2024
16d3078
fix problem where if item is disabled then footer text would still be…
brindy Nov 11, 2024
bae1e61
fix setting when voice search not available
brindy Nov 12, 2024
feea52b
remove unused notification listener since no user script exists now
brindy Nov 12, 2024
274aafd
complete rename to text size and remove dead code
brindy Nov 12, 2024
bcd14bb
remove weird xcode token
brindy Nov 12, 2024
f6ef130
fix pixel names
brindy Nov 12, 2024
d2f6ab4
Merge branch 'main' into brindy/easier-page-zoom
brindy Nov 14, 2024
de126b3
Merge branch 'main' into brindy/easier-page-zoom
brindy Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Core/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public enum FeatureFlag: String {
case onboardingAddToDock
case autofillSurveys
case autcompleteTabs
case textZoom
case adAttributionReporting

/// https://app.asana.com/0/72649045549333/1208231259093710/f
Expand Down Expand Up @@ -104,6 +105,8 @@ extension FeatureFlag: FeatureFlagSourceProviding {
return .remoteReleasable(.feature(.autocompleteTabs))
case .networkProtectionUserTips:
return .remoteReleasable(.subfeature(NetworkProtectionSubfeature.userTips))
case .textZoom:
return .remoteReleasable(.feature(.textZoom))
case .adAttributionReporting:
return .remoteReleasable(.feature(.adAttributionReporting))
}
Expand Down
5 changes: 3 additions & 2 deletions Core/Pixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ public struct PixelParameters {
public static let count = "count"
public static let source = "source"

public static let textSizeInitial = "text_size_initial"
public static let textSizeUpdated = "text_size_updated"
// Text size is the legacy name
public static let textZoomInitial = "text_size_initial"
public static let textZoomUpdated = "text_size_updated"

public static let canAutoPreviewMIMEType = "can_auto_preview_mime_type"
public static let mimeType = "mime_type"
Expand Down
21 changes: 15 additions & 6 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ extension Pixel {
case browsingMenuCopy
case browsingMenuPrint
case browsingMenuFindInPage
case browsingMenuZoom
case browsingMenuDisableProtection
case browsingMenuEnableProtection
case browsingMenuReportBrokenSite
Expand Down Expand Up @@ -217,8 +218,10 @@ extension Pixel {
case bookmarkExportSuccess
case bookmarkExportFailure

case textSizeSettingsChanged

case textZoomSettingsChanged
case zoomChangedOnPage
case zoomChangedOnPageDaily

case downloadStarted
case downloadStartedDueToUnhandledMIMEType
case downloadTriedToPresentPreviewWithoutTab
Expand Down Expand Up @@ -743,7 +746,7 @@ extension Pixel {
case settingsRecentlyVisitedOff
case settingsAddressBarSelectorPressed
case settingsAccessibilityOpen
case settingsAccessiblityTextSize
case settingsAccessiblityTextZoom

// Web pixels
case privacyProOfferMonthlyPriceClick
Expand Down Expand Up @@ -919,6 +922,7 @@ extension Pixel.Event {
case .browsingMenuCopy: return "mb_cp"
case .browsingMenuPrint: return "mb_pr"
case .browsingMenuFindInPage: return "mb_fp"
case .browsingMenuZoom: return "m_menu_page_zoom_taps"
case .browsingMenuDisableProtection: return "mb_wla"
case .browsingMenuEnableProtection: return "mb_wlr"
case .browsingMenuReportBrokenSite: return "mb_rb"
Expand Down Expand Up @@ -1052,8 +1056,11 @@ extension Pixel.Event {
case .bookmarkExportSuccess: return "m_be_a"
case .bookmarkExportFailure: return "m_be_e"

case .textSizeSettingsChanged: return "m_text_size_settings_changed"

// Text size is the legacy name
case .textZoomSettingsChanged: return "m_text_size_settings_changed"
case .zoomChangedOnPageDaily: return "m_menu_page_zoom_changed_daily"
case .zoomChangedOnPage: return "m_menu_page_zoom_changed"

case .downloadStarted: return "m_download_started"
case .downloadStartedDueToUnhandledMIMEType: return "m_download_started_due_to_unhandled_mime_type"
case .downloadTriedToPresentPreviewWithoutTab: return "m_download_tried_to_present_preview_without_tab"
Expand Down Expand Up @@ -1577,7 +1584,9 @@ extension Pixel.Event {
case .settingsRecentlyVisitedOff: return "m_settings_autocomplete_recently-visited_off"
case .settingsAddressBarSelectorPressed: return "m_settings_address_bar_selector_pressed"
case .settingsAccessibilityOpen: return "m_settings_accessibility_open"
case .settingsAccessiblityTextSize: return "m_settings_accessiblity_text_size"

// legacy name is text size
case .settingsAccessiblityTextZoom: return "m_settings_accessiblity_text_size"

// Web
case .privacyProOfferMonthlyPriceClick: return "m_privacy-pro_offer_monthly-price_click"
Expand Down
58 changes: 0 additions & 58 deletions Core/TextSizeUserScript.swift

This file was deleted.

7 changes: 6 additions & 1 deletion Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public struct UserDefaultsWrapper<T> {
case downloadedSurrogatesCount = "com.duckduckgo.app.downloadedSurrogatesCount"
case downloadedTrackerDataSetCount = "com.duckduckgo.app.downloadedTrackerDataSetCount"
case downloadedPrivacyConfigurationCount = "com.duckduckgo.app.downloadedPrivacyConfigurationCount"
case textSize = "com.duckduckgo.ios.textSize"

// Text size is the legacy name and this key is still in use
case textZoom = "com.duckduckgo.ios.textSize"

case emailWaitlistShouldReceiveNotifications = "com.duckduckgo.ios.showWaitlistNotification"
case unseenDownloadsAvailable = "com.duckduckgo.app.unseenDownloadsAvailable"
Expand Down Expand Up @@ -179,6 +181,9 @@ public struct UserDefaultsWrapper<T> {
case duckPlayerPixelExperimentLastVideoIDRendered = "com.duckduckgo.ios.duckplayer.pixel.experiment.last.videoID.rendered.v2"
case duckPlayerPixelExperimentOverride = "com.duckduckgo.ios.duckplayer.pixel.experiment.override.v2"

// Domain specific text zoom
case domainTextZoomStorage = "com.duckduckgo.ios.domainTextZoomStorage"

// TipKit
case resetTipKitOnNextLaunch = "com.duckduckgo.ios.tipKit.resetOnNextLaunch"
}
Expand Down
154 changes: 0 additions & 154 deletions Core/textsize.js

This file was deleted.

Loading