Skip to content

Commit

Permalink
Changes based on design Ship Review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstrba committed Mar 26, 2024
1 parent 1ac790f commit 5cb5118
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 66 deletions.
2 changes: 2 additions & 0 deletions Core/PixelExperiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ extension PixelExperiment {
final internal class PixelExperimentLogic {

var cohort: PixelExperiment? {
return .newSettings

guard isInstalled else { return nil }

if let allocatedCohort,
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
1DEAADF22BA4716C00E25A97 /* SettingsStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADF12BA4716C00E25A97 /* SettingsStatus.swift */; };
1DEAADF42BA47B5300E25A97 /* WebTrackingProtectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADF32BA47B5300E25A97 /* WebTrackingProtectionView.swift */; };
1DEAADF62BA4809400E25A97 /* CookiePopUpProtectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADF52BA4809400E25A97 /* CookiePopUpProtectionView.swift */; };
1DEAADF92BA4892600E25A97 /* SettingsPrivacyProDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADF82BA4892600E25A97 /* SettingsPrivacyProDetailView.swift */; };
1DEAADFB2BA71E9A00E25A97 /* SettingsPrivacyProtectionDescriptionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADFA2BA71E9A00E25A97 /* SettingsPrivacyProtectionDescriptionView.swift */; };
1DEAADFF2BA7832F00E25A97 /* EmailProtectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEAADFE2BA7832F00E25A97 /* EmailProtectionView.swift */; };
1E016AB42949FEB500F21625 /* OmniBarNotificationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E016AB32949FEB500F21625 /* OmniBarNotificationViewModel.swift */; };
Expand Down Expand Up @@ -1276,7 +1275,6 @@
1DEAADF12BA4716C00E25A97 /* SettingsStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsStatus.swift; sourceTree = "<group>"; };
1DEAADF32BA47B5300E25A97 /* WebTrackingProtectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebTrackingProtectionView.swift; sourceTree = "<group>"; };
1DEAADF52BA4809400E25A97 /* CookiePopUpProtectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CookiePopUpProtectionView.swift; sourceTree = "<group>"; };
1DEAADF82BA4892600E25A97 /* SettingsPrivacyProDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsPrivacyProDetailView.swift; sourceTree = "<group>"; };
1DEAADFA2BA71E9A00E25A97 /* SettingsPrivacyProtectionDescriptionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsPrivacyProtectionDescriptionView.swift; sourceTree = "<group>"; };
1DEAADFE2BA7832F00E25A97 /* EmailProtectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailProtectionView.swift; sourceTree = "<group>"; };
1E016AB32949FEB500F21625 /* OmniBarNotificationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OmniBarNotificationViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3268,7 +3266,6 @@
isa = PBXGroup;
children = (
1D5216AB2BAC1F11002FE1ED /* SettingsPrivacyProView.swift */,
1DEAADF82BA4892600E25A97 /* SettingsPrivacyProDetailView.swift */,
D69FBF752B28BE3600B505F1 /* SettingsSubscriptionView.swift */,
);
name = "Privacy Pro";
Expand Down Expand Up @@ -6710,7 +6707,6 @@
D68DF81C2B58302E0023DBEA /* SubscriptionRestoreView.swift in Sources */,
D664C7CE2B289AA200CBFA76 /* SubscriptionPagesUseSubscriptionFeature.swift in Sources */,
EE9D68DC2AE16AE100B55EF4 /* NotificationsAuthorizationController.swift in Sources */,
1DEAADF92BA4892600E25A97 /* SettingsPrivacyProDetailView.swift in Sources */,
AA3D854923DA1DFB00788410 /* AppIcon.swift in Sources */,
D6E83C2E2B1EA06E006C8AFB /* SettingsViewModel.swift in Sources */,
8590CB612684D0600089F6BF /* CookieDebugViewController.swift in Sources */,
Expand Down
23 changes: 13 additions & 10 deletions DuckDuckGo/PrivateSearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,19 @@ struct PrivateSearchViewSettings: View {
@State var shouldShowNoMicrophonePermissionAlert = false

var body: some View {
Section(header: Text(UserText.searchSettings)) {
Section(header: Text(UserText.searchSettings),
footer: Text(viewModel.autocompleteSubtitle ?? "")) {
// Autocomplete Suggestions
SettingsCellView(label: UserText.settingsAutocomplete,
subtitle: viewModel.autocompleteSubtitle,
accesory: .toggle(isOn: viewModel.autocompletePrivateSearchBinding))
}

Section(footer: Text(UserText.voiceSearchFooter)) {
// Private Voice Search
if viewModel.state.speechRecognitionAvailable {
SettingsCellView(label: UserText.settingsVoiceSearch,
subtitle: UserText.voiceSearchFooter,
accesory: .toggle(isOn: viewModel.voiceSearchEnabledPrivateSearchBinding))
}

// More Search Settings
SettingsCellView(label: UserText.moreSearchSettings,
subtitle: UserText.moreSearchSettingsExplanation,
action: { viewModel.openMoreSearchSettings() },
disclosureIndicator: true,
isButton: true)
}
.alert(isPresented: $shouldShowNoMicrophonePermissionAlert) {
Alert(title: Text(UserText.noVoicePermissionAlertTitle),
Expand All @@ -85,6 +79,15 @@ struct PrivateSearchViewSettings: View {
.onChange(of: viewModel.shouldShowNoMicrophonePermissionAlert) { value in
shouldShowNoMicrophonePermissionAlert = value
}

Section {
// More Search Settings
SettingsCellView(label: UserText.moreSearchSettings,
subtitle: UserText.moreSearchSettingsExplanation,
action: { viewModel.openMoreSearchSettings() },
disclosureIndicator: true,
isButton: true)
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions DuckDuckGo/SettingsGeneralView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ struct SettingsGeneralView: View {
}

Section(header: Text(UserText.privateSearch),
footer: Text(UserText.voiceSearchFooter)) {
footer: Text(viewModel.autocompleteSubtitle ?? "")) {
// Autocomplete Suggestions
SettingsCellView(label: UserText.settingsAutocomplete,
subtitle: viewModel.autocompleteSubtitle,
accesory: .toggle(isOn: viewModel.autocompleteGeneralBinding))
}

Section(footer: Text(UserText.voiceSearchFooter)) {
// Private Voice Search
if viewModel.state.speechRecognitionAvailable {
SettingsCellView(label: UserText.settingsVoiceSearch,
Expand Down
39 changes: 0 additions & 39 deletions DuckDuckGo/SettingsPrivacyProDetailView.swift

This file was deleted.

10 changes: 1 addition & 9 deletions DuckDuckGo/SettingsPrivacyProView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ struct SettingsPrivacyProView: View {
var body: some View {
#if SUBSCRIPTION
if #available(iOS 15, *) {
if viewModel.state.subscription.enabled {
Section {
// Privacy Pro
NavigationLink(destination: SettingsPrivacyProDetailView().environmentObject(viewModel)) {
SettingsCellView(label: UserText.settingsPProSection,
image: Image("SettingsPrivacyPro"))
}
}
}
SettingsSubscriptionView()
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/SettingsStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct StatusIndicatorView: View {
}

Text(status.text)
.daxSubheadRegular()
.daxBodyRegular()
.foregroundColor(Color(designSystemColor: .textSecondary))
}
}
Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/SettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,6 @@ extension SettingsViewModel {
pushViewController(legacyViewProvider.netP)
}
#endif

}
}

Expand Down

0 comments on commit 5cb5118

Please sign in to comment.