Skip to content

Commit 7598d38

Browse files
committed
Merge branch 'main' into rlitianu/FXIOS-13730-#29785-New-first-run-onboarding]iPad]-The-Skip-button-is-missing-from-the-onboarding-on-iPad
2 parents 2f3f9da + 32c8fc9 commit 7598d38

File tree

52 files changed

+420
-3135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+420
-3135
lines changed

BrowserKit/Sources/Common/Constants/NotificationConstants.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ extension Notification.Name {
3535

3636
public static let HomePanelPrefsChanged = Notification.Name("HomePanelPrefsChanged")
3737

38-
public static let TrackingProtectionViewControllerDidDismiss =
39-
Notification.Name("TrackingProtectionViewControllerDidDismiss")
40-
41-
public static let TrackingProtectionViewControllerDidAppear =
42-
Notification.Name("TrackingProtectionViewControllerDidAppear")
43-
4438
public static let FileDidDownload = Notification.Name("FileDidDownload")
4539

4640
public static let SearchBarPositionDidChange = Notification.Name("SearchBarPositionDidChange")

firefox-ios/Client.xcodeproj/project.pbxproj

Lines changed: 11 additions & 55 deletions
Large diffs are not rendered by default.

firefox-ios/Client/Application/AccessibilityIdentifiers.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ struct AccessibilityIdentifiers {
1616
/// Used for toolbar/URL bar buttons since our classes are built that buttons can live in one or the other
1717
/// Using only those a11y identifiers for both ensures we have standard way to refer to buttons from iPad to iPhone
1818
struct Toolbar {
19-
static let urlBarBorder = "TabToolbar.urlBarBorder"
2019
static let settingsMenuButton = "TabToolbar.menuButton"
2120
static let homeButton = "TabToolbar.homeButton"
22-
static let trackingProtection = "TabLocationView.trackingProtectionButton"
2321
static let readerModeButton = "TabLocationView.readerModeButton"
2422
static let reloadButton = "TabLocationView.reloadButton"
2523
static let shareButton = "TabLocationView.shareButton"
@@ -41,9 +39,7 @@ struct AccessibilityIdentifiers {
4139
}
4240

4341
struct UrlBar {
44-
static let scanQRCodeButton = "urlBar-scanQRCode"
4542
static let cancelButton = "urlBar-cancel"
46-
static let searchTextField = "address"
4743
}
4844

4945
struct KeyboardAccessory {

firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,7 @@ class BrowserCoordinator: BaseCoordinator,
335335
// MARK: - ETPCoordinatorSSLStatusDelegate
336336

337337
var showHasOnlySecureContentInTrackingPanel: Bool {
338-
if browserViewController.isToolbarRefactorEnabled {
339-
return browserViewController.tabManager.selectedTab?.currentWebView()?.hasOnlySecureContent ?? false
340-
}
341-
342-
guard let bar = browserViewController.legacyUrlBar else { return false }
343-
return bar.locationView.hasSecureContent
338+
return browserViewController.tabManager.selectedTab?.currentWebView()?.hasOnlySecureContent ?? false
344339
}
345340

346341
// MARK: - Route handling

firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+KeyCommands.swift

Lines changed: 14 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,8 @@ extension BrowserViewController {
5656
method: .press,
5757
object: .keyCommand,
5858
extras: ["action": "reload"])
59-
guard let tab = tabManager.selectedTab else { return }
60-
if isToolbarRefactorEnabled {
61-
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
62-
actionType: GeneralBrowserActionType.reloadWebsite))
63-
} else {
64-
if !contentContainer.hasAnyHomepage {
65-
tab.reload()
66-
}
67-
}
59+
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
60+
actionType: GeneralBrowserActionType.reloadWebsite))
6861
}
6962

7063
@objc
@@ -73,15 +66,8 @@ extension BrowserViewController {
7366
method: .press,
7467
object: .keyCommand,
7568
extras: ["action": "reload-no-cache"])
76-
guard let tab = tabManager.selectedTab else { return }
77-
if isToolbarRefactorEnabled {
78-
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
79-
actionType: GeneralBrowserActionType.reloadWebsiteNoCache))
80-
} else {
81-
if !contentContainer.hasAnyHomepage {
82-
tab.reload(bypassCache: true)
83-
}
84-
}
69+
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
70+
actionType: GeneralBrowserActionType.reloadWebsiteNoCache))
8571
}
8672

8773
@objc
@@ -91,14 +77,9 @@ extension BrowserViewController {
9177
object: .keyCommand,
9278
extras: ["action": "go-back"])
9379
guard let tab = tabManager.selectedTab, tab.canGoBack else { return }
94-
if isToolbarRefactorEnabled {
95-
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
96-
actionType: GeneralBrowserActionType.navigateBack))
97-
} else {
98-
if !contentContainer.hasAnyHomepage {
99-
tab.goBack()
100-
}
101-
}
80+
81+
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
82+
actionType: GeneralBrowserActionType.navigateBack))
10283
}
10384

10485
@objc
@@ -108,14 +89,9 @@ extension BrowserViewController {
10889
object: .keyCommand,
10990
extras: ["action": "go-forward"])
11091
guard let tab = tabManager.selectedTab, tab.canGoForward else { return }
111-
if isToolbarRefactorEnabled {
112-
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
113-
actionType: GeneralBrowserActionType.navigateForward))
114-
} else {
115-
if !contentContainer.hasAnyHomepage {
116-
tab.goForward()
117-
}
118-
}
92+
93+
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
94+
actionType: GeneralBrowserActionType.navigateForward))
11995
}
12096

12197
@objc
@@ -147,12 +123,7 @@ extension BrowserViewController {
147123
object: .keyCommand,
148124
extras: ["action": "select-location-bar"])
149125
scrollController.showToolbars(animated: true)
150-
151-
if isToolbarRefactorEnabled {
152-
store.dispatchLegacy(ToolbarAction(windowUUID: windowUUID, actionType: ToolbarActionType.didStartEditingUrl))
153-
} else if let legacyUrlBar {
154-
legacyUrlBar.tabLocationViewDidTapLocation(legacyUrlBar.locationView)
155-
}
126+
store.dispatchLegacy(ToolbarAction(windowUUID: windowUUID, actionType: ToolbarActionType.didStartEditingUrl))
156127
}
157128

158129
@objc
@@ -162,14 +133,8 @@ extension BrowserViewController {
162133
object: .keyCommand,
163134
extras: ["action": "new-tab"])
164135

165-
if isToolbarRefactorEnabled {
166-
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
167-
actionType: GeneralBrowserActionType.addNewTab))
168-
} else {
169-
let isPrivate = tabManager.selectedTab?.isPrivate ?? false
170-
openBlankNewTab(focusLocationField: true, isPrivate: isPrivate)
171-
keyboardPressesHandler().reset()
172-
}
136+
store.dispatchLegacy(GeneralBrowserAction(windowUUID: windowUUID,
137+
actionType: GeneralBrowserActionType.addNewTab))
173138
}
174139

175140
@objc
@@ -421,9 +386,7 @@ extension BrowserViewController {
421386

422387
let isEditingText = tabManager.selectedTab?.isEditing ?? false
423388

424-
if !isToolbarRefactorEnabled, let legacyUrlBar, legacyUrlBar.inOverlayMode {
425-
return commands + searchLocationCommands
426-
} else if !isEditingText {
389+
if !isEditingText {
427390
return commands + overridesTextEditing
428391
}
429392
return commands

firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+TabToolbarDelegate.swift

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
3838

3939
// Starts a timer to monitor for a navigation button double tap for the navigation contextual hint
4040
func startNavigationButtonDoubleTapTimer() {
41-
guard isToolbarRefactorEnabled, isToolbarNavigationHintEnabled else { return }
41+
guard isToolbarNavigationHintEnabled else { return }
4242
if navigationHintDoubleTapTimer == nil {
4343
navigationHintDoubleTapTimer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: false) { _ in
4444
self.navigationHintDoubleTapTimer = nil
@@ -51,7 +51,6 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
5151
}
5252

5353
func configureNavigationContextualHint(_ view: UIView) {
54-
guard isToolbarRefactorEnabled, isToolbarNavigationHintEnabled else { return }
5554
navigationContextHintVC.configure(
5655
anchor: view,
5756
withArrowDirection: toolbarHelper.shouldShowNavigationToolbar(for: traitCollection) ? .down : .up,
@@ -94,7 +93,6 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
9493
guard let state = store.state.screenState(ToolbarState.self,
9594
for: .toolbar,
9695
window: windowUUID),
97-
isToolbarRefactorEnabled,
9896
isToolbarUpdateHintEnabled
9997
else { return }
10098

@@ -225,10 +223,8 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
225223
}
226224

227225
func dismissUrlBar() {
228-
if isToolbarRefactorEnabled, addressToolbarContainer.inOverlayMode {
226+
if addressToolbarContainer.inOverlayMode {
229227
addressToolbarContainer.leaveOverlayMode(reason: .finished, shouldCancelLoading: false)
230-
} else if !isToolbarRefactorEnabled, let legacyUrlBar, legacyUrlBar.inOverlayMode {
231-
legacyUrlBar.leaveOverlayMode(reason: .finished, shouldCancelLoading: false)
232228
}
233229
}
234230

@@ -353,8 +349,8 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
353349
}
354350

355351
private func getNewPrivateTabAction() -> PhotonRowActions {
356-
let isRefactorEnabled = isToolbarRefactorEnabled && isOneTapNewTabEnabled
357-
let iconString = isRefactorEnabled ? StandardImageIdentifiers.Large.privateMode : StandardImageIdentifiers.Large.plus
352+
let iconString = isOneTapNewTabEnabled ? StandardImageIdentifiers.Large.privateMode :
353+
StandardImageIdentifiers.Large.plus
358354
return SingleActionViewModel(title: .KeyboardShortcuts.NewPrivateTab,
359355
iconString: iconString,
360356
iconType: .Image) { _ in
@@ -366,9 +362,8 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
366362
}
367363

368364
private func getCloseTabAction() -> PhotonRowActions {
369-
let isRefactorEnabled = isToolbarRefactorEnabled && isOneTapNewTabEnabled
370-
let title = isRefactorEnabled ? String.Toolbars.TabToolbarLongPressActionsMenu.CloseThisTabButton :
371-
String.KeyboardShortcuts.CloseCurrentTab
365+
let title = isOneTapNewTabEnabled ? String.Toolbars.TabToolbarLongPressActionsMenu.CloseThisTabButton :
366+
String.KeyboardShortcuts.CloseCurrentTab
372367
return SingleActionViewModel(title: title,
373368
iconString: StandardImageIdentifiers.Large.cross,
374369
iconType: .Image) { _ in

firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+URLBarDelegate.swift

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)