Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Dec 13, 2024
1 parent 3acb595 commit 4940afb
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 48 deletions.
4 changes: 2 additions & 2 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1360,9 +1360,9 @@ extension Pixel.Event {
case .remoteMessagePrimaryActionClicked: return "m_remote_message_primary_action_clicked"
case .remoteMessageSecondaryActionClicked: return "m_remote_message_secondary_action_clicked"
case .remoteMessageSheet: return "m_remote_message_sheet"

// MARK: debug pixels

case .dbCrashDetected: return "m_d_crash"
case .crashOnCrashHandlersSetUp: return "m_d_crash_on_handlers_setup"
case .dbMigrationError: return "m_d_dbme"
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@
7B1604EB2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TipKitController+ConvenienceInitializers.swift"; sourceTree = "<group>"; };
7B1604ED2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipKitDebugOptionsUIActionHandling.swift; sourceTree = "<group>"; };
7B1C892B2CF714AA0008224E /* VPNTipsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNTipsModel.swift; sourceTree = "<group>"; };
7B1D7A912D0C723B00E48644 /* DesignResourcesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = DesignResourcesKit; path = ../DesignResourcesKit; sourceTree = SOURCE_ROOT; };
7B4DC5BC2CB29D8400EE5CC2 /* VPNToggleIntent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNToggleIntent.swift; sourceTree = "<group>"; };
7B4DC5BF2CB2A4A500EE5CC2 /* VPNStatusValueProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNStatusValueProvider.swift; sourceTree = "<group>"; };
7B4DC5C12CB2AE4600EE5CC2 /* WidgetKind.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetKind.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3766,6 +3767,7 @@
31E69A60280F4BAD00478327 /* LocalPackages */ = {
isa = PBXGroup;
children = (
7B1D7A912D0C723B00E48644 /* DesignResourcesKit */,
85875B5F29912A2D00115F05 /* SyncUI */,
37FCAACB2993149A000E420A /* Waitlist */,
31794BFF2821DFB600F18633 /* DuckUI */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
"version" : "6.41.0"
}
},
{
"identity" : "designresourceskit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/DesignResourcesKit",
"state" : {
"revision" : "ad133f76501edcb2bfa841e33aebc0da5f92bb5c",
"version" : "3.3.0"
}
},
{
"identity" : "duckduckgo-autofill",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/NetworkProtectionVPNSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ struct NetworkProtectionVPNSettingsView: View {

if #available(iOS 18.0, *) {
NavigationLink {
ControlCenterWidgetEducationView(navBarTitle: "Control Center",
ControlCenterWidgetEducationView(navBarTitle: "Add DuckDuckGo VPN Shortcut to Your Control Center",
widget: .vpnToggle)
} label: {
Label {
Expand Down
11 changes: 6 additions & 5 deletions DuckDuckGo/Siri/SiriBubbleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// limitations under the License.
//

import DesignResourcesKit
import SwiftUICore

private struct SiriBubble: Shape {
Expand Down Expand Up @@ -60,15 +61,15 @@ struct SiriBubbleView: View {
}

var body: some View {
HStack {
HStack(alignment: .center) {
Text(text)
.foregroundStyle(Color.black)

Spacer()
.foregroundStyle(Color(designSystemColor: .textPrimary))
.multilineTextAlignment(.center)
}.padding(12)
.padding(.bottom, SiriBubble.tipHeight)
.frame(maxWidth: .infinity)
.background(SiriBubble()
.fill(Color.white)
.fill(Color(designSystemColor: .surface))
.shadow(color: .black.opacity(0.08), radius: 8, x: 0, y: 8)
.shadow(color: .black.opacity(0.1), radius: 3, x: 0, y: 2))
}
Expand Down
10 changes: 5 additions & 5 deletions DuckDuckGo/Siri/SiriEducationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ struct SiriEducationView: View {
.resizable()
.frame(maxWidth: 128)

Text("Control DuckDuckGo VPN with Siri")
Text("Control DuckDuckGo VPN with Siri!")
.font(.system(size: 22, weight: .bold, design: .default))
.kerning(0.35)
.multilineTextAlignment(.center)

Text("Siri Shortcuts let you connect to your VPN with a quick voice command, like saying “Connect DuckDuckgo VPN” to Siri. It’s a fast, hands-free way to use the VPN.")
Text("Siri Shortcuts let you connect to your VPN with a quick voice command, like “Siri, turn on DuckDuckGo VPN”. It’s a fast, hands-free way to use your VPN.")
.font(.system(size: 16, weight: .regular))
.multilineTextAlignment(.center)
}
.padding(.top, Spacing.aboveHeader)
.padding(.horizontal, Spacing.sidesToContent)

VStack(alignment: .leading, spacing: 16) {
SiriBubbleView("\"Siri, snooze DuckDuckGo VPN.\"")
SiriBubbleView("Siri, snooze DuckDuckGo VPN.")

SiriBubbleView("\"Siri, enable DuckDuckGo VPN.\"")
SiriBubbleView("Siri, enable DuckDuckGo VPN.")

SiriBubbleView("\"Siri, protect my device with DuckDuckGo.\"")
SiriBubbleView("Siri, protect my device with DuckDuckGo.")
}
.padding(.top, Spacing.headerToList)
.padding(.horizontal, Spacing.sidesToContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ final class SubscriptionFlowViewModel: ObservableObject {
}
}
.store(in: &cancellables)

}

@MainActor
Expand Down
18 changes: 9 additions & 9 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ public struct UserText {
public static let addWidget = NSLocalizedString("addWidget.button", value: "Add Widget", comment: "")
public static let addWidgetTitle = NSLocalizedString("addWidget.title", value: "One tap to your favorite sites.", comment: "")
public static let addWidgetDescription = NSLocalizedString("addWidget.description", value: "Get quick access to private search and the sites you love.", comment: "")
public static let addWidgetSettingsFirstParagraph = NSLocalizedString("addWidget.settings.firstParagraph", value: "Long-press on the home screen until the apps jiggle.", comment: "")
public static let addWidgetSettingsSecondParagraph = NSLocalizedString("addWidget.settings.secondParagraph", value: "Tap the Edit button, then choose Add Widget”.", comment: "")
public static let addWidgetSettingsThirdParagraph = NSLocalizedString("addWidget.settings.title", value: "Find and select DuckDuckGo. Then swipe to VPN and select Add Widget.", comment: "")
public static let addWidgetSettingsFirstParagraph = NSLocalizedString("addWidget.settings.firstParagraph", value: "Long-press anywhere on the Home Screen until the apps jiggle", comment: "")
public static let addWidgetSettingsSecondParagraph = NSLocalizedString("addWidget.settings.secondParagraph", value: "Tap the **Edit** button, then choose **Add Widget**", comment: "")
public static let addWidgetSettingsThirdParagraph = NSLocalizedString("addWidget.settings.title", value: "Find and select **DuckDuckGo**. Then choose a widget.", comment: "")

public static let actionSaveToDownloads = NSLocalizedString("downloads.alert.action.save-to-downloads", value: "Save to Downloads", comment: "Alert action for starting a file dowload")
public static func messageDownloadStarted(for filename: String) -> String {
Expand Down Expand Up @@ -449,13 +449,13 @@ public struct UserText {

// MARK: - Control Center Widget Education

public static let controlCenterWidgetEducationParagraph1 = NSLocalizedString("control.center.widget.education.paragraph.1", value: "Swipe down from the top-right corner of the screen.", comment: "First paragraph of the Control Center Widget Education screen")
public static let controlCenterWidgetEducationParagraph2 = NSLocalizedString("control.center.widget.education.paragraph.2", value: "Tap the “+” button at the top left of Control Center.", comment: "Second paragraph of the Control Center Widget Education screen")
public static let controlCenterWidgetEducationParagraph3 = NSLocalizedString("control.center.widget.education.paragraph.3", value: "Tap “+ Add a Control at the bottom of the screen.", comment: "Third paragraph of the Control Center Widget Education screen")
public static let controlCenterWidgetEducationParagraph1 = NSLocalizedString("control.center.widget.education.paragraph.1", value: "Swipe down from the top-right corner of the screen", comment: "First paragraph of the Control Center Widget Education screen")
public static let controlCenterWidgetEducationParagraph2 = NSLocalizedString("control.center.widget.education.paragraph.2", value: "Tap the **+** button at the top left of **Control Center**", comment: "Second paragraph of the Control Center Widget Education screen")
public static let controlCenterWidgetEducationParagraph3 = NSLocalizedString("control.center.widget.education.paragraph.3", value: "Tap **Add a Control** at the bottom of the screen", comment: "Third paragraph of the Control Center Widget Education screen")

// MARK: - Control Center Widget Education: VPN

public static let controlCenterVPNWidgetEducationParagraph = NSLocalizedString("control.center.vpn.widget.education.paragraph", value: "Find DuckDuckGo in the list, then tap the VPN control to add it to your Control Center.", comment: "Fourth paragraph of the Control Center VPN Widget Education screen")
public static let controlCenterVPNWidgetEducationParagraph = NSLocalizedString("control.center.vpn.widget.education.paragraph", value: "Find **DuckDuckGo** in the list, then tap **VPN control** to add it", comment: "Fourth paragraph of the Control Center VPN Widget Education screen")

// MARK: - Waitlist

Expand Down Expand Up @@ -675,11 +675,11 @@ public struct UserText {

public static let vpnSettingsAddWidget = NSLocalizedString("vpn.settings.add.widget", value: "Add VPN Widget to Home Screen", comment: "VPN settings screen cell text for adding the VPN widget to the home screen")
public static let vpnSettingsAddControlCenterWidget = NSLocalizedString("vpn.settings.add.control-center.widget", value: "Add VPN to Control Center", comment: "VPN settings screen cell text for adding the VPN widget to the control center")
public static let vpnSettingsControlWithSiri = NSLocalizedString("vpn.settings.control.with.siri", value: "Control with Siri", comment: "VPN settings screen cell text to learn how to control the VPN with Siri")
public static let vpnSettingsControlWithSiri = NSLocalizedString("vpn.settings.control.with.siri", value: "Control VPN With Siri", comment: "VPN settings screen cell text to learn how to control the VPN with Siri")

// MARK: - VPN Widget

public static let addVPNWidgetSettingsThirdParagraph = NSLocalizedString("vpn.addWidget.settings.title", value: "Find and select DuckDuckGo. Then swipe to VPN and select Add Widget.", comment: "Title for the VPN widget onboarding screen")
public static let addVPNWidgetSettingsThirdParagraph = NSLocalizedString("vpn.addWidget.settings.title", value: "Find and select **DuckDuckGo**, then swipe to **VPN** and select **Add Widget**", comment: "Title for the VPN widget onboarding screen")

// MARK: Custom DNS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ private struct NumberedParagraph: View {
NumberedCircle(number: number)
VStack(alignment: .leading, spacing: Const.Spacing.textAndImage) {
HStack {
Text(config.text)
// The LocalizedStringKey wrapper is necessary to properly parse markdown
Text(LocalizedStringKey(config.text))
.foregroundStyle(Color(designSystemColor: .textPrimary))
.font(Font(uiFont: Const.Font.text))
.lineSpacing(Const.Spacing.line)

Expand Down Expand Up @@ -124,8 +126,8 @@ private struct NumberedCircle: View {
}

private extension Color {
static let circle = Color.blue0
static let numbers = Color.blueBase
static let circle = Color(designSystemColor: .textSelectionFill)
static let numbers = Color(designSystemColor: .textLink)
}

private enum Const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x83",
"blue" : "0x87",
"green" : "0x83",
"red" : "0x83"
"red" : "0x81"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x13",
"green" : "0x13",
"red" : "0x13"
"blue" : "0x87",
"green" : "0x83",
"red" : "0x81"
}
},
"idiom" : "universal"
Expand Down
16 changes: 8 additions & 8 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@
"addWidget.description" = "Get quick access to private search and the sites you love.";

/* No comment provided by engineer. */
"addWidget.settings.firstParagraph" = "Long-press on the home screen until the apps jiggle.";
"addWidget.settings.firstParagraph" = "Long-press anywhere on the Home Screen until the apps jiggle";

/* No comment provided by engineer. */
"addWidget.settings.secondParagraph" = "Tap the Edit button, then choose Add Widget”.";
"addWidget.settings.secondParagraph" = "Tap the **Edit** button, then choose **Add Widget**";

/* No comment provided by engineer. */
"addWidget.settings.title" = "Find and select DuckDuckGo. Then swipe to VPN and select Add Widget.";
"addWidget.settings.title" = "Find and select **DuckDuckGo**. Then choose a widget.";

/* No comment provided by engineer. */
"addWidget.title" = "One tap to your favorite sites.";
Expand Down Expand Up @@ -873,16 +873,16 @@
"contextual.onboarding.try-search.surprise-me-title" = "Surprise me!";

/* Fourth paragraph of the Control Center VPN Widget Education screen */
"control.center.vpn.widget.education.paragraph" = "Find DuckDuckGo in the list, then tap the VPN control to add it to your Control Center.";
"control.center.vpn.widget.education.paragraph" = "Find **DuckDuckGo** in the list, then tap **VPN control** to add it";

/* First paragraph of the Control Center Widget Education screen */
"control.center.widget.education.paragraph.1" = "Swipe down from the top-right corner of the screen.";
"control.center.widget.education.paragraph.1" = "Swipe down from the top-right corner of the screen";

/* Second paragraph of the Control Center Widget Education screen */
"control.center.widget.education.paragraph.2" = "Tap the “+” button at the top left of Control Center.";
"control.center.widget.education.paragraph.2" = "Tap the **+** button at the top left of **Control Center**";

/* Third paragraph of the Control Center Widget Education screen */
"control.center.widget.education.paragraph.3" = "Tap “+ Add a Control at the bottom of the screen.";
"control.center.widget.education.paragraph.3" = "Tap **Add a Control** at the bottom of the screen";

/* Crash Report always send button title */
"crash.report.dialog.always.send" = "Always Send Crash Reports";
Expand Down Expand Up @@ -2842,7 +2842,7 @@ But if you *do* want a peek under the hood, you can find more information about
"vpn.access-revoked.alert.title" = "VPN disconnected due to expired subscription";

/* Title for the VPN widget onboarding screen */
"vpn.addWidget.settings.title" = "Find and select DuckDuckGo. Then swipe to VPN and select Add Widget.";
"vpn.addWidget.settings.title" = "Find and select **DuckDuckGo**, then swipe to **VPN** and select **Add Widget**";

/* Title for the Cancel button of the VPN feedback form */
"vpn.feedback-form.button.cancel" = "Cancel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"author" : "xcode",
"version" : 1
},
"properties" : {
"symbol-rendering-intent" : "template"
},
"symbols" : [
{
"filename" : "VPN-Off.svg",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"author" : "xcode",
"version" : 1
},
"properties" : {
"symbol-rendering-intent" : "template"
},
"symbols" : [
{
"filename" : "VPN-On.svg",
Expand Down

0 comments on commit 4940afb

Please sign in to comment.