diff --git a/DuckDuckGo/Common/Localizables/UserText.swift b/DuckDuckGo/Common/Localizables/UserText.swift index 8dab8e1a78..72788b4aaf 100644 --- a/DuckDuckGo/Common/Localizables/UserText.swift +++ b/DuckDuckGo/Common/Localizables/UserText.swift @@ -1101,6 +1101,7 @@ struct UserText { // MARK: New Tab // Context Menu static let newTabBottomPopoverTitle = NSLocalizedString("newTab.bottom.popover.title", value: "New Tab Page", comment: "Title of the popover that appears when pressing the bottom right button") + static let newTabMenuItemShowSearchBar = NSLocalizedString("newTab.menu.item.show.search.bar", value: "Show Search Field", comment: "Title of the menu item in the home page to show/hide search bar section") static let newTabMenuItemShowFavorite = NSLocalizedString("newTab.menu.item.show.favorite", value: "Show Favorites", comment: "Title of the menu item in the home page to show/hide favorite section") static let newTabMenuItemShowContinuteSetUp = NSLocalizedString("newTab.menu.item.show.continue.setup", value: "Show Next Steps", comment: "Title of the menu item in the home page to show/hide continue setup section") static let newTabMenuItemShowRecentActivity = NSLocalizedString("newTab.menu.item.show.recent.activity", value: "Show Recent Activity", comment: "Title of the menu item in the home page to show/hide recent activity section") diff --git a/DuckDuckGo/HomePage/View/HomePageView.swift b/DuckDuckGo/HomePage/View/HomePageView.swift index 95b95e1be6..dfde367500 100644 --- a/DuckDuckGo/HomePage/View/HomePageView.swift +++ b/DuckDuckGo/HomePage/View/HomePageView.swift @@ -220,6 +220,10 @@ extension HomePage.Views { @ViewBuilder func sectionsVisibilityContextMenuItems() -> some View { + if addressBarModel.shouldShowAddressBar { + Toggle(UserText.newTabMenuItemShowSearchBar, isOn: $model.isSearchBarVisible) + .toggleStyle(.checkbox) + } if model.isContinueSetUpAvailable { Toggle(UserText.newTabMenuItemShowContinuteSetUp, isOn: $model.isContinueSetUpVisible) .toggleStyle(.checkbox) diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index 5bfb975e0b..dec424a054 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -35109,6 +35109,18 @@ } } }, + "newTab.menu.item.show.search.bar" : { + "comment" : "Title of the menu item in the home page to show/hide search bar section", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Show Search Field" + } + } + } + }, "newTab.recent.activity.section.title" : { "comment" : "Title of the RecentActivity section in the home page", "extractionState" : "extracted_with_value", @@ -35169,6 +35181,18 @@ } } }, + "newTab.search.bar.section.title" : { + "comment" : "Title of the Search Field section in the home page", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Search Field" + } + } + } + }, "newTab.setup.default.browser.action" : { "comment" : "Action title on the action menu of the Default Browser card", "extractionState" : "extracted_with_value",