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

Fixed address bar cleared/losing focus on Navigation #2157

Merged
merged 17 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
03f9bb3
Fixed address bar cleared/losing focus on Navigation
mallexxx Feb 5, 2024
375cbb1
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 7, 2024
c5cdd45
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 7, 2024
7b699bf
fixed suggestion window not disappearing on tab switch
mallexxx Feb 7, 2024
3aa45ff
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 19, 2024
8f37cd8
refactor first responder setting and fix address bar blinking issues
mallexxx Feb 19, 2024
7ebe607
fix tests
mallexxx Feb 19, 2024
543f5ba
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 19, 2024
535f92e
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 21, 2024
41ae4cf
fix issues, add tests
mallexxx Feb 22, 2024
eeb4e1c
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 22, 2024
d0c5643
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 22, 2024
808c5bd
fix comment; fixing tests
mallexxx Feb 22, 2024
3b634cb
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 26, 2024
5684bb5
fix divider shown on the Home Page
mallexxx Feb 26, 2024
52d6f16
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 27, 2024
a968834
Merge remote-tracking branch 'origin/main' into alex/fix-address-bar-…
mallexxx Feb 27, 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
19 changes: 12 additions & 7 deletions Configuration/UITests/UITests.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,22 @@

#include "../Common.xcconfig"

CODE_SIGN_STYLE = Automatic
CODE_SIGN_IDENTITY[config=CI][sdk=macosx*] =

CODE_SIGN_STYLE[config=CI][sdk=macosx*] = Manual
CODE_SIGNING_ALLOWED[config=CI][sdk=macosx*] = NO
COPY_PHASE_STRIP = NO
DEAD_CODE_STRIPPING = YES
DEVELOPMENT_TEAM[config=CI][sdk=macosx*] =
ENABLE_USER_SCRIPT_SANDBOXING = YES
GCC_NO_COMMON_BLOCKS = YES
GENERATE_INFOPLIST_FILE = YES
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
LOCALIZATION_PREFERS_STRING_CATALOGS = YES

MACOSX_DEPLOYMENT_TARGET = 11.4

INFOPLIST_FILE = UI Tests/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.duckduckgo.UI-Tests
PRODUCT_NAME = $(TARGET_NAME)

TEST_TARGET_NAME = DuckDuckGo

LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
PROVISIONING_PROFILE_SPECIFIER[config=CI][sdk=macosx*] =
SWIFT_EMIT_LOC_STRINGS = NO
TEST_TARGET_NAME = DuckDuckGo Privacy Browser
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really related change but this made UI test at least launchable

56 changes: 29 additions & 27 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@
B6080BC82B21E78100B418EF /* DataImportErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6080BC42B21E78100B418EF /* DataImportErrorView.swift */; };
B6085D062743905F00A9C456 /* CoreDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6085D052743905F00A9C456 /* CoreDataStore.swift */; };
B6085D092743AAB600A9C456 /* FireproofDomains.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = B6085D072743993C00A9C456 /* FireproofDomains.xcdatamodeld */; };
B60C5F232B86189800FFA1D2 /* TestsURLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6EC37FB29B83E99001ACE79 /* TestsURLExtension.swift */; };
B60C6F7729B0E286007BFAA8 /* SearchNonexistentDomainNavigationResponder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60C6F7629B0E286007BFAA8 /* SearchNonexistentDomainNavigationResponder.swift */; };
B60C6F7829B0E286007BFAA8 /* SearchNonexistentDomainNavigationResponder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60C6F7629B0E286007BFAA8 /* SearchNonexistentDomainNavigationResponder.swift */; };
B60C6F7E29B1B41D007BFAA8 /* TestRunHelperInitializer.m in Sources */ = {isa = PBXBuildFile; fileRef = B60C6F7D29B1B41D007BFAA8 /* TestRunHelperInitializer.m */; };
Expand Down Expand Up @@ -2684,7 +2685,6 @@
B630794226731F5400DCEE41 /* WKDownloadMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630794126731F5400DCEE41 /* WKDownloadMock.swift */; };
B630E7FE29C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630E7FD29C887ED00363609 /* NSErrorAdditionalInfo.swift */; };
B630E7FF29C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630E7FD29C887ED00363609 /* NSErrorAdditionalInfo.swift */; };
B630E80029C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630E7FD29C887ED00363609 /* NSErrorAdditionalInfo.swift */; };
B630E80129C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630E7FD29C887ED00363609 /* NSErrorAdditionalInfo.swift */; };
B630E80229C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630E7FD29C887ED00363609 /* NSErrorAdditionalInfo.swift */; };
B634DBDF293C8F7F00C3C99E /* Tab+UIDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B634DBDE293C8F7F00C3C99E /* Tab+UIDelegate.swift */; };
Expand All @@ -2705,8 +2705,6 @@
B63ED0E026AFE32F00A9DAD1 /* GeolocationProviderMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63ED0DF26AFE32F00A9DAD1 /* GeolocationProviderMock.swift */; };
B63ED0E326B3E7FA00A9DAD1 /* CLLocationManagerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63ED0E226B3E7FA00A9DAD1 /* CLLocationManagerMock.swift */; };
B63ED0E526BB8FB900A9DAD1 /* SharingMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63ED0E426BB8FB900A9DAD1 /* SharingMenu.swift */; };
B63FCB3529B5B2680022C61A /* TestRunHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60C6F8029B1B4AD007BFAA8 /* TestRunHelper.swift */; };
B63FCB3629B5B2730022C61A /* FileManagerTempDirReplacement.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60C6F8329B1BAD3007BFAA8 /* FileManagerTempDirReplacement.swift */; };
B642738227B65BAC0005DFD1 /* SecureVaultErrorReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B642738127B65BAC0005DFD1 /* SecureVaultErrorReporter.swift */; };
B643BF1427ABF772000BACEC /* NSWorkspaceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B643BF1327ABF772000BACEC /* NSWorkspaceExtension.swift */; };
B644B43D29D56829003FA9AB /* SearchNonexistentDomainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B644B43929D565DB003FA9AB /* SearchNonexistentDomainTests.swift */; };
Expand All @@ -2725,6 +2723,9 @@
B64C853826944B880048FEBE /* StoredPermission.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64C853726944B880048FEBE /* StoredPermission.swift */; };
B64C853D26944B940048FEBE /* PermissionStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64C853C26944B940048FEBE /* PermissionStore.swift */; };
B64C85422694590B0048FEBE /* PermissionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64C85412694590B0048FEBE /* PermissionButton.swift */; };
B64CE01C2B861B4F00126CA5 /* BrowserServicesKit in Frameworks */ = {isa = PBXBuildFile; productRef = B64CE01B2B861B4F00126CA5 /* BrowserServicesKit */; };
B64CE01E2B8622D700126CA5 /* AddressBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64CE01D2B8622D700126CA5 /* AddressBarTests.swift */; };
B64CE01F2B8622D700126CA5 /* AddressBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B64CE01D2B8622D700126CA5 /* AddressBarTests.swift */; };
B65211252B29A42C00B30633 /* BookmarkStoreMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA652CDA25DDAB32009059CC /* BookmarkStoreMock.swift */; };
B65211262B29A42E00B30633 /* BookmarkStoreMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA652CDA25DDAB32009059CC /* BookmarkStoreMock.swift */; };
B65211272B29A43000B30633 /* BookmarkStoreMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA652CDA25DDAB32009059CC /* BookmarkStoreMock.swift */; };
Expand All @@ -2745,7 +2746,6 @@
B65CD8CD2B316DFC00A595BB /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = B65CD8CC2B316DFC00A595BB /* SnapshotTesting */; };
B65CD8CF2B316E0200A595BB /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = B65CD8CE2B316E0200A595BB /* SnapshotTesting */; };
B65CD8D12B316E0C00A595BB /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = B65CD8D02B316E0C00A595BB /* SnapshotTesting */; };
B65CD8D32B316E1700A595BB /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = B65CD8D22B316E1700A595BB /* SnapshotTesting */; };
B65CD8D52B316FCA00A595BB /* __Snapshots__ in Resources */ = {isa = PBXBuildFile; fileRef = B65CD8D42B316FCA00A595BB /* __Snapshots__ */; };
B65CD8D62B316FCA00A595BB /* __Snapshots__ in Resources */ = {isa = PBXBuildFile; fileRef = B65CD8D42B316FCA00A595BB /* __Snapshots__ */; };
B65DA5EF2A77CC3A00CBEE8D /* Bundle+NetworkProtectionExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B602E81F2A1E2603006D261F /* Bundle+NetworkProtectionExtensions.swift */; };
Expand Down Expand Up @@ -3225,6 +3225,13 @@
remoteGlobalIDString = AA585D7D248FD31100E9A3E2;
remoteInfo = DuckDuckGo;
};
B696E8182B8619D6008368F0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = AA585D76248FD31100E9A3E2 /* Project object */;
proxyType = 1;
remoteGlobalIDString = B6EC37E729B5DA2A001ACE79;
remoteInfo = "tests-server";
};
B6EC37F129B5DA8F001ACE79 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = AA585D76248FD31100E9A3E2 /* Project object */;
Expand Down Expand Up @@ -3804,7 +3811,6 @@
7B3618C12ADE75C8000D6154 /* NetworkProtectionNavBarPopoverManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionNavBarPopoverManager.swift; sourceTree = "<group>"; };
7B430EA02A71411A00BAC4A1 /* NetworkProtectionSimulateFailureMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionSimulateFailureMenu.swift; sourceTree = "<group>"; };
7B4CE8DA26F02108009134B1 /* UI Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UI Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
7B4CE8DE26F02108009134B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7B4CE8E626F02134009134B1 /* TabBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarTests.swift; sourceTree = "<group>"; };
7B5291882A1697680022E406 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7B5291892A169BC90022E406 /* DeveloperID.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DeveloperID.xcconfig; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4223,6 +4229,7 @@
B64C853726944B880048FEBE /* StoredPermission.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoredPermission.swift; sourceTree = "<group>"; };
B64C853C26944B940048FEBE /* PermissionStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionStore.swift; sourceTree = "<group>"; };
B64C85412694590B0048FEBE /* PermissionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionButton.swift; sourceTree = "<group>"; };
B64CE01D2B8622D700126CA5 /* AddressBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressBarTests.swift; sourceTree = "<group>"; };
B65349A9265CF45000DCC645 /* DispatchQueueExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchQueueExtensionsTests.swift; sourceTree = "<group>"; };
B6553691268440D700085A79 /* WKProcessPool+GeolocationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WKProcessPool+GeolocationProvider.swift"; sourceTree = "<group>"; };
B65536962684413900085A79 /* WKGeolocationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKGeolocationProvider.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4645,7 +4652,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B65CD8D32B316E1700A595BB /* SnapshotTesting in Frameworks */,
B64CE01C2B861B4F00126CA5 /* BrowserServicesKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -6150,7 +6157,6 @@
isa = PBXGroup;
children = (
7B4CE8E626F02134009134B1 /* TabBarTests.swift */,
7B4CE8DE26F02108009134B1 /* Info.plist */,
);
path = UITests;
sourceTree = "<group>";
Expand Down Expand Up @@ -7882,6 +7888,7 @@
children = (
B644B43929D565DB003FA9AB /* SearchNonexistentDomainTests.swift */,
B693766D2B6B5F26005BD9D4 /* ErrorPageTests.swift */,
B64CE01D2B8622D700126CA5 /* AddressBarTests.swift */,
);
path = Tab;
sourceTree = "<group>";
Expand Down Expand Up @@ -8651,12 +8658,11 @@
buildRules = (
);
dependencies = (
B6080B9B2B20AF6400B418EF /* PBXTargetDependency */,
7B4CE8E026F02108009134B1 /* PBXTargetDependency */,
B696E8192B8619D6008368F0 /* PBXTargetDependency */,
);
name = "UI Tests";
packageProductDependencies = (
B65CD8D22B316E1700A595BB /* SnapshotTesting */,
B64CE01B2B861B4F00126CA5 /* BrowserServicesKit */,
);
productName = "UI Tests";
productReference = 7B4CE8DA26F02108009134B1 /* UI Tests.xctest */;
Expand Down Expand Up @@ -10557,6 +10563,7 @@
3706FEA5293F662100E42796 /* CoreDataEncryptionTesting.xcdatamodeld in Sources */,
B603973D29BF1D7D00902A34 /* AutoconsentIntegrationTests.swift in Sources */,
B60C6F8729B1CAB2007BFAA8 /* TestRunHelper.swift in Sources */,
B64CE01F2B8622D700126CA5 /* AddressBarTests.swift in Sources */,
B603972D29BEDF2100902A34 /* ExpectedNavigationExtension.swift in Sources */,
3706FEA6293F662100E42796 /* EncryptionKeyStoreTests.swift in Sources */,
B6F5656A299A414300A04298 /* WKWebViewMockingExtension.swift in Sources */,
Expand Down Expand Up @@ -10598,6 +10605,7 @@
B644B43D29D56829003FA9AB /* SearchNonexistentDomainTests.swift in Sources */,
B603973C29BF1D7D00902A34 /* AutoconsentIntegrationTests.swift in Sources */,
B60C6F8629B1CAB0007BFAA8 /* TestRunHelper.swift in Sources */,
B64CE01E2B8622D700126CA5 /* AddressBarTests.swift in Sources */,
B603972C29BEDF2100902A34 /* ExpectedNavigationExtension.swift in Sources */,
4B1AD8D525FC38DD00261379 /* EncryptionKeyStoreTests.swift in Sources */,
B6F56568299A414300A04298 /* WKWebViewMockingExtension.swift in Sources */,
Expand Down Expand Up @@ -11472,9 +11480,7 @@
buildActionMask = 2147483647;
files = (
7B4CE8E726F02135009134B1 /* TabBarTests.swift in Sources */,
B63FCB3529B5B2680022C61A /* TestRunHelper.swift in Sources */,
B630E80029C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */,
B63FCB3629B5B2730022C61A /* FileManagerTempDirReplacement.swift in Sources */,
B60C5F232B86189800FFA1D2 /* TestsURLExtension.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -12579,10 +12585,6 @@
target = AA585D7D248FD31100E9A3E2 /* DuckDuckGo Privacy Browser */;
targetProxy = AA585D91248FD31400E9A3E2 /* PBXContainerItemProxy */;
};
B6080B9B2B20AF6400B418EF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = B6080B9A2B20AF6400B418EF /* SwiftLintPlugin */;
};
B6080B9D2B20AF7700B418EF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = B6080B9C2B20AF7700B418EF /* SwiftLintPlugin */;
Expand Down Expand Up @@ -12615,6 +12617,11 @@
isa = PBXTargetDependency;
productRef = B692D0DE2B209FB7003F2548 /* SwiftLintPlugin */;
};
B696E8192B8619D6008368F0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B6EC37E729B5DA2A001ACE79 /* tests-server */;
targetProxy = B696E8182B8619D6008368F0 /* PBXContainerItemProxy */;
};
B69D06142A4C0AC50032D14D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = B69D06132A4C0AC50032D14D /* SwiftLintPlugin */;
Expand Down Expand Up @@ -14085,11 +14092,6 @@
package = AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */;
productName = Sparkle;
};
B6080B9A2B20AF6400B418EF /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
productName = "plugin:SwiftLintPlugin";
};
B6080B9C2B20AF7700B418EF /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
Expand Down Expand Up @@ -14125,6 +14127,11 @@
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
productName = "plugin:SwiftLintPlugin";
};
B64CE01B2B861B4F00126CA5 /* BrowserServicesKit */ = {
isa = XCSwiftPackageProductDependency;
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
productName = BrowserServicesKit;
};
B65CD8CA2B316DF100A595BB /* SnapshotTesting */ = {
isa = XCSwiftPackageProductDependency;
package = B65CD8C92B316DF100A595BB /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
Expand All @@ -14145,11 +14152,6 @@
package = B65CD8C92B316DF100A595BB /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
productName = SnapshotTesting;
};
B65CD8D22B316E1700A595BB /* SnapshotTesting */ = {
isa = XCSwiftPackageProductDependency;
package = B65CD8C92B316DF100A595BB /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
productName = SnapshotTesting;
};
B692D0DE2B209FB7003F2548 /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
Expand Down
4 changes: 3 additions & 1 deletion DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel

startupSync()

stateRestorationManager.applicationDidFinishLaunching()
if [.normal, .uiTests].contains(NSApp.runType) {
stateRestorationManager.applicationDidFinishLaunching()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable state restoration for integration tests

}

BWManager.shared.initCommunication()

Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGo/Common/Extensions/NSViewExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ extension NSView {
os_log("%s: Window not available", type: .error, className)
return
}
// prevent all text selection on repeated Address Bar activation
guard window.firstResponder !== (self as? NSControl)?.currentEditor() ?? self else { return }

window.makeFirstResponder(self)
}
Expand Down
3 changes: 3 additions & 0 deletions DuckDuckGo/Common/Localizables/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ struct UserText {
static let addressBarVisitSuffix = NSLocalizedString("address.bar.visit.suffix",
value: "Visit",
comment: "Address bar suffix of possibly visited website. Example: spreadprivacy.com . Visit spreadprivacy.com")
static let addressBarPlaceholder = NSLocalizedString("address.bar.placeholder",
value: "Search or enter address",
comment: "Empty Address Bar placeholder text displayed on the new tab page.")

static let navigateBack = NSLocalizedString("navigate.back", value: "Back", comment: "Context menu item")
static let closeAndReturnToParentFormat = NSLocalizedString("close.tab.on.back.format",
Expand Down
12 changes: 12 additions & 0 deletions DuckDuckGo/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,18 @@
"Address:" : {
"comment" : "Add Bookmark dialog bookmark url field heading"
},
"address.bar.placeholder" : {
"comment" : "Empty Address Bar placeholder text displayed on the new tab page.",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Search or enter address"
}
}
}
},
"address.bar.search.suffix" : {
"comment" : "Suffix of searched terms in address bar. Example: best watching machine . Search DuckDuckGo",
"extractionState" : "extracted_with_value",
Expand Down
2 changes: 0 additions & 2 deletions DuckDuckGo/MainWindow/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ final class MainView: NSView {
bookmarksBarHeightConstraint = bookmarksBarContainerView.heightAnchor.constraint(equalToConstant: 34)

navigationBarTopConstraint = navigationBarContainerView.topAnchor.constraint(equalTo: topAnchor, constant: 38)
addressBarHeightConstraint = navigationBarContainerView.heightAnchor.constraint(equalToConstant: 42)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved tnis into the Navigation Bar Controller in sake of encapsulation and fluid address bar animation


NSLayoutConstraint.activate([
tabBarContainerView.topAnchor.constraint(equalTo: topAnchor),
Expand All @@ -82,7 +81,6 @@ final class MainView: NSView {
navigationBarTopConstraint,
navigationBarContainerView.leadingAnchor.constraint(equalTo: leadingAnchor),
navigationBarContainerView.trailingAnchor.constraint(equalTo: trailingAnchor),
addressBarHeightConstraint,

webContainerView.topAnchor.constraint(equalTo: bookmarksBarContainerView.bottomAnchor),
webContainerView.bottomAnchor.constraint(equalTo: bottomAnchor),
Expand Down
Loading
Loading