Remove gear button from header nav (#1901)

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jackandjack authored and GitHub committed 2026-11-26 17:34:58 -10:00
1 parent b7c75eb581
commit 58c5189461
5 files changed
+8 -65

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ final class AppChromeModel: ObservableObject {
}
/// Presents the App Info sheet. Pass a pane when the launching control
/// promises one (the header gear is labeled "settings"); nil keeps the
/// promises one (e.g., the gateway globe opens settings); nil keeps the
/// sheet's own sticky last-used pane.
func presentAppInfo(pane: AppInfoView.Pane? = nil) {
if let pane {
-36
View File
@@ -55939,42 +55939,6 @@
}
}
},
"content.header.settings" : {
"comment" : "Accessibility label and tooltip for the header gear button that opens the settings/app info sheet",
"extractionState" : "manual",
"localizations" : {
"ar" : { "stringUnit" : { "state" : "translated", "value" : "الإعدادات" } },
"bn" : { "stringUnit" : { "state" : "translated", "value" : "সেটিংস" } },
"de" : { "stringUnit" : { "state" : "translated", "value" : "einstellungen" } },
"en" : { "stringUnit" : { "state" : "translated", "value" : "settings" } },
"es" : { "stringUnit" : { "state" : "translated", "value" : "ajustes" } },
"fa" : { "stringUnit" : { "state" : "translated", "value" : "تنظیمات" } },
"fil" : { "stringUnit" : { "state" : "translated", "value" : "mga setting" } },
"fr" : { "stringUnit" : { "state" : "translated", "value" : "réglages" } },
"he" : { "stringUnit" : { "state" : "translated", "value" : "הגדרות" } },
"hi" : { "stringUnit" : { "state" : "translated", "value" : "सेटिंग्स" } },
"id" : { "stringUnit" : { "state" : "translated", "value" : "pengaturan" } },
"it" : { "stringUnit" : { "state" : "translated", "value" : "impostazioni" } },
"ja" : { "stringUnit" : { "state" : "translated", "value" : "設定" } },
"ko" : { "stringUnit" : { "state" : "translated", "value" : "설정" } },
"ms" : { "stringUnit" : { "state" : "translated", "value" : "tetapan" } },
"ne" : { "stringUnit" : { "state" : "translated", "value" : "सेटिङ" } },
"nl" : { "stringUnit" : { "state" : "translated", "value" : "instellingen" } },
"pl" : { "stringUnit" : { "state" : "translated", "value" : "ustawienia" } },
"pt" : { "stringUnit" : { "state" : "translated", "value" : "definições" } },
"pt-BR" : { "stringUnit" : { "state" : "translated", "value" : "ajustes" } },
"ru" : { "stringUnit" : { "state" : "translated", "value" : "настройки" } },
"sv" : { "stringUnit" : { "state" : "translated", "value" : "inställningar" } },
"ta" : { "stringUnit" : { "state" : "translated", "value" : "அமைப்புகள்" } },
"th" : { "stringUnit" : { "state" : "translated", "value" : "ตั้งค่า" } },
"tr" : { "stringUnit" : { "state" : "translated", "value" : "ayarlar" } },
"uk" : { "stringUnit" : { "state" : "translated", "value" : "налаштування" } },
"ur" : { "stringUnit" : { "state" : "translated", "value" : "سیٹنگز" } },
"vi" : { "stringUnit" : { "state" : "translated", "value" : "cài đặt" } },
"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "设置" } },
"zh-Hant" : { "stringUnit" : { "state" : "translated", "value" : "設定" } }
}
},
"content.help.verification" : {
"extractionState" : "manual",
"localizations" : {
+2 -2
View File
@@ -43,8 +43,8 @@ struct AppInfoView: View {
private static let selectedPaneStorageKey = "appInfo.selectedPane"
/// Overwrites the remembered pane so the next presentation opens there.
/// `selectedPane` is sticky by design; a caller whose control names a
/// specific pane (the header gear says "settings") uses this so the
/// `selectedPane` is sticky by design; a caller whose control promises a
/// specific pane (e.g., the gateway globe opens settings) uses this so the
/// sheet doesn't land first-time users on the Info default instead.
static func setSelectedPane(_ pane: Pane) {
UserDefaults.standard.set(pane.rawValue, forKey: selectedPaneStorageKey)
+3 -24
View File
@@ -65,10 +65,9 @@ struct ContentHeaderView: View {
// (next to the failed-wipe banner), not on this Text: a host
// that can be covered or removed could take the pending
// dialog down with it.
// The gear in the icon cluster is the discoverable entry
// point to App Info; the logo tap stays as a shortcut but
// reads as static text, so surface it. (The triple-tap panic
// wipe stays undiscoverable on purpose — it's destructive.)
// This is the primary entry point to App Info, but it reads as
// static text; surface the tap. (The triple-tap panic wipe
// stays undiscoverable on purpose — it's destructive.)
.accessibilityAddTraits(.isButton)
.accessibilityHint(
String(localized: "content.accessibility.app_info_hint", comment: "Accessibility hint on the bitchat/ logo explaining a tap opens app info")
@@ -313,26 +312,6 @@ struct ContentHeaderView: View {
? String(localized: "content.accessibility.peers_connected", comment: "Accessibility value when peers are reachable")
: String(localized: "content.accessibility.peers_none", comment: "Accessibility value when no peers are reachable"))
)
// Settings entry point new users can actually find; the
// logo tap remains as a shortcut for those who know it.
// Opens on the settings pane explicitly: the sheet's pane
// memory defaults to info, and a button labeled "settings"
// must not land there.
Button(action: { appChromeModel.presentAppInfo(pane: .settings) }) {
Image(systemName: "gearshape")
.font(.bitchatSystem(size: 12))
.foregroundColor(palette.secondary.opacity(0.9))
.headerTapTarget()
}
.buttonStyle(.plain)
.padding(.leading, 4)
.accessibilityLabel(
String(localized: "content.header.settings", defaultValue: "settings", comment: "Accessibility label and tooltip for the header gear button that opens the settings/app info sheet")
)
.help(
String(localized: "content.header.settings", defaultValue: "settings", comment: "Accessibility label and tooltip for the header gear button that opens the settings/app info sheet")
)
}
.layoutPriority(3)
.sheet(isPresented: $showVerifySheet) {
+2 -2
View File
@@ -494,8 +494,8 @@ struct AppArchitectureTests {
#expect(defaults.string(forKey: key) == AppInfoView.Pane.info.rawValue)
#expect(chromeModel.isAppInfoPresented)
// Controls that promise a pane (the header gear and the gateway globe
// both say "settings") must land there even against sticky memory.
// Controls that promise a pane (such as the gateway globe opening
// settings) must land there even against sticky memory.
chromeModel.isAppInfoPresented = false
chromeModel.presentAppInfo(pane: .settings)
#expect(defaults.string(forKey: key) == AppInfoView.Pane.settings.rawValue)