eleven / messenger Public

ios: align the group view picker's rows (#516)

* ios: align the group view picker's rows

Every row is a Label with the app's glyph in the icon slot — a plain Text row
sits on a different menu grid than the Label above it, so app names indented
past "Chat".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ios: SF-symbol icons for the group view picker (menus drop emoji Label icons)

The catalog gains an SF-symbol twin per app (checkmark/alarm/bookmark/lock) —
iOS menus align Labels on one grid but silently drop non-image icons, so the
emoji glyphs never rendered. Web glyphs stay everywhere else.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 8027bc4aea30f928d2e637e17dbd8a0555c4b12c parent a18577a
4 files changed, +20 −8
  • ios/LChat/Views/NativeChatScreen.swift +6 −1
  • ios/LChatCore/Sources/LChatCore/GroupApps.swift +12 −5
  • ios/LChatCore/Sources/LChatCore/GroupAppsSheet.swift +1 −1
  • ios/LChatMac/NewChatPopover.swift +1 −1
diff --git a/ios/LChat/Views/NativeChatScreen.swift b/ios/LChat/Views/NativeChatScreen.swift
index 5a48c61..c695b72 100644
--- a/ios/LChat/Views/NativeChatScreen.swift
+++ b/ios/LChat/Views/NativeChatScreen.swift
@@ -260,7 +260,12 @@ struct NativeChatScreen: View {
Picker("View", selection: groupViewSelection) {
Label("Chat", systemImage: "bubble.left").tag("")
ForEach(groupApps) { app in
- Text("\(GroupApps.glyph(app.id)) \(GroupApps.title(app.id))")
+ // Every row a Label with an SF-symbol
+ // icon: iOS menus align Labels on one
+ // grid but silently DROP non-image icons
+ // (the emoji glyphs never rendered).
+ Label(GroupApps.title(app.id),
+ systemImage: GroupApps.symbol(app.id))
.tag(app.id)
}
}
diff --git a/ios/LChatCore/Sources/LChatCore/GroupApps.swift b/ios/LChatCore/Sources/LChatCore/GroupApps.swift
index 6cb4524..a0e9114 100644
--- a/ios/LChatCore/Sources/LChatCore/GroupApps.swift
+++ b/ios/LChatCore/Sources/LChatCore/GroupApps.swift
@@ -38,11 +38,14 @@ public enum GroupApps {
/// The apps a group can add — the web's groupCapableApps() (apps declaring
/// groupCapable: true). Keep in sync with web/static/apps/*.js like
/// ThreadStore.appTitles.
- public static let catalog: [(id: String, title: String, glyph: String)] = [
- ("todo", "To-do", "✓"),
- ("remind", "Reminders", "⏰"),
- ("bookmarks", "Bookmarks", "🔖"),
- ("vault", "Vault", "🔒"),
+ /// `glyph` is the web's emoji face (avatars, the Mac dropdown); `symbol`
+ /// is the SF-symbol twin for iOS menus, which drop any Label icon that
+ /// isn't a real image.
+ public static let catalog: [(id: String, title: String, glyph: String, symbol: String)] = [
+ ("todo", "To-do", "✓", "checkmark"),
+ ("remind", "Reminders", "⏰", "alarm"),
+ ("bookmarks", "Bookmarks", "🔖", "bookmark"),
+ ("vault", "Vault", "🔒", "lock"),
]
public static func title(_ id: String) -> String {
@@ -53,6 +56,10 @@ public enum GroupApps {
catalog.first { $0.id == id }?.glyph ?? "▦"
}
+ public static func symbol(_ id: String) -> String {
+ catalog.first { $0.id == id }?.symbol ?? "square.grid.2x2"
+ }
+
/// The web's groupAppsFor filter: resolve folded items against the catalog —
/// a hostile or stale add naming anything else stays inert.
public static func known(_ items: [Item]) -> [Item] {
diff --git a/ios/LChatCore/Sources/LChatCore/GroupAppsSheet.swift b/ios/LChatCore/Sources/LChatCore/GroupAppsSheet.swift
index 9a208f0..eb3bd94 100644
--- a/ios/LChatCore/Sources/LChatCore/GroupAppsSheet.swift
+++ b/ios/LChatCore/Sources/LChatCore/GroupAppsSheet.swift
@@ -50,7 +50,7 @@ public struct GroupAppsSheet: View {
#endif
}
- private func row(_ app: (id: String, title: String, glyph: String)) -> some View {
+ private func row(_ app: (id: String, title: String, glyph: String, symbol: String)) -> some View {
let added = model.groupApps.contains { $0.id == app.id }
return HStack(spacing: 12) {
Text(app.glyph)
diff --git a/ios/LChatMac/NewChatPopover.swift b/ios/LChatMac/NewChatPopover.swift
index 210ee4f..b94d4c9 100644
--- a/ios/LChatMac/NewChatPopover.swift
+++ b/ios/LChatMac/NewChatPopover.swift
@@ -317,7 +317,7 @@ struct NewChatPopover: View {
// A tickable row for a shared app in group mode — same shape as personRow's
// multi-select, the app's glyph for a face.
- private func groupAppRow(_ entry: (id: String, title: String, glyph: String)) -> some View {
+ private func groupAppRow(_ entry: (id: String, title: String, glyph: String, symbol: String)) -> some View {
Button {
if selectedApps.contains(entry.id) {
selectedApps.remove(entry.id)