The tab bar retires — boards are the app, settings behind the gear, recency the default order
The boards stack becomes the root screen: Settings moves from its own tab to a sheet behind a leading gearshape button, the sort pickers trade their text segments for symbols (hand.draw, textformat.abc, clock) with the words kept for accessibility, and every list now opens sorted by most recent change. UI tests re-aimed at the gear button and Done-button scoping fixed for the sheet-over-sheet nav bars — 4/4 green in the simulator. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -16,15 +16,15 @@ struct BoardScreen: View {
|
||||
|
||||
/// Persisted as its raw value, not the enum itself — same reasoning as `BoardsTabView`'s
|
||||
/// `sortOrderRaw`.
|
||||
@AppStorage("laneListSortOrder") private var sortOrderRaw = ItemSortOrder.manual.rawValue
|
||||
@AppStorage("laneListSortOrder") private var sortOrderRaw = ItemSortOrder.recent.rawValue
|
||||
|
||||
private var session: BoardSession { index.session(forBoardAt: boardRoot) }
|
||||
|
||||
/// The stored raw value as the enum, defaulting to `.manual` on anything the store didn't
|
||||
/// The stored raw value as the enum, defaulting to `.recent` on anything the store didn't
|
||||
/// write itself — an unset key or a stale raw value from a build that no longer has this case.
|
||||
private var sortOrder: Binding<ItemSortOrder> {
|
||||
Binding(
|
||||
get: { ItemSortOrder(rawValue: sortOrderRaw) ?? .manual },
|
||||
get: { ItemSortOrder(rawValue: sortOrderRaw) ?? .recent },
|
||||
set: { sortOrderRaw = $0.rawValue }
|
||||
)
|
||||
}
|
||||
@@ -83,9 +83,9 @@ struct BoardScreen: View {
|
||||
if case .ready = session.phase, let snapshot = session.snapshot, !snapshot.lanes.isEmpty {
|
||||
ToolbarItem(placement: .principal) {
|
||||
Picker("Sort", selection: sortOrder) {
|
||||
Text("Manual").tag(ItemSortOrder.manual)
|
||||
Text("Name").tag(ItemSortOrder.name)
|
||||
Text("Recent").tag(ItemSortOrder.recent)
|
||||
Label("Manual", systemImage: "hand.draw").tag(ItemSortOrder.manual)
|
||||
Label("Name", systemImage: "textformat.abc").tag(ItemSortOrder.name)
|
||||
Label("Recent", systemImage: "clock").tag(ItemSortOrder.recent)
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.frame(maxWidth: 260)
|
||||
|
||||
Reference in New Issue
Block a user