Commit a4c47682fd

a4c47682fdd3b6a6149391da61c9d14460e3483d

parent: 1527fb06c1

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-25 23:45 UTC

iOS onboarding: scrolling pages, skippable permissions

Pages scroll at large text sizes with the actions below them. Notifications,
Calendar and Reminders have Not Now, and Calendar and Reminders say when
they need orgstar+. The welcome page says iPad on iPad, the page dots sit
clear of the buttons, and Reduce Motion cross-fades between pages.

Ref #221

Layout: unified · split

Changed files (3)
Sources/OrgstarMobile/OnboardingScreen.swift +45 −17 · view
@@ -16,6 +16,7 @@ struct OnboardingScreen: View {
16 @State private var step = Step.welcome 16 @State private var step = Step.welcome
17 @State private var importing = false 17 @State private var importing = false
18 @State private var problem: String? 18 @State private var problem: String?
19 @Environment(\.accessibilityReduceMotion) private var reduceMotion
19 20
20 private enum Step: Int, CaseIterable { 21 private enum Step: Int, CaseIterable {
21 case welcome, folder, notifications, calendar, reminders 22 case welcome, folder, notifications, calendar, reminders
@@ -34,7 +35,7 @@ struct OnboardingScreen: View {
34 } 35 }
35 .frame(maxWidth: 500, maxHeight: .infinity) 36 .frame(maxWidth: 500, maxHeight: .infinity)
36 .padding(.horizontal, 28) 37 .padding(.horizontal, 28)
37 .transition(.asymmetric(insertion: .move(edge: .trailing), removal: .move(edge: .leading)).combined(with: .opacity)) 38 .transition(reduceMotion ? .opacity : .asymmetric(insertion: .move(edge: .trailing), removal: .move(edge: .leading)).combined(with: .opacity))
38 .id(step) 39 .id(step)
39 HStack(spacing: 8) { 40 HStack(spacing: 8) {
40 ForEach(Step.allCases, id: \.self) { s in 41 ForEach(Step.allCases, id: \.self) { s in
@@ -43,6 +44,7 @@ struct OnboardingScreen: View {
43 } 44 }
44 .accessibilityElement(children: .ignore) 45 .accessibilityElement(children: .ignore)
45 .accessibilityLabel("Step \(step.rawValue + 1) of \(Step.allCases.count)") 46 .accessibilityLabel("Step \(step.rawValue + 1) of \(Step.allCases.count)")
47 .padding(.top, 12)
46 .padding(.bottom, 12) 48 .padding(.bottom, 12)
47 } 49 }
48 .tint(model.theme.accentColor) 50 .tint(model.theme.accentColor)
@@ -63,7 +65,9 @@ struct OnboardingScreen: View {
63 } 65 }
64 66
65 private var welcome: some View { 67 private var welcome: some View {
66 page(symbol: "star.fill", title: "Welcome to orgstar", text: "Your org files on iPhone, in the folders where they already are.") { 68 page(symbol: "star.fill", title: "Welcome to orgstar",
69 text: UIDevice.current.userInterfaceIdiom == .pad ? "Your org files on iPad, in the folders where they already are."
70 : "Your org files on iPhone, in the folders where they already are.") {
67 VStack(alignment: .leading, spacing: 18) { 71 VStack(alignment: .leading, spacing: 18) {
68 feature("calendar", "The agenda", "Scheduled entries, deadlines and TODOs from all your files.") 72 feature("calendar", "The agenda", "Scheduled entries, deadlines and TODOs from all your files.")
69 feature("hand.tap", "Tap to edit", "Change an entry's state, dates, tags and notes in place. Swipe to finish or reschedule.") 73 feature("hand.tap", "Tap to edit", "Change an entry's state, dates, tags and notes in place. Swipe to finish or reschedule.")
@@ -98,13 +102,17 @@ struct OnboardingScreen: View {
98 next() 102 next()
99 } 103 }
100 } 104 }
105 secondary("Not Now") {
106 model.set("reminders", to: .bool(false))
107 next()
108 }
101 } 109 }
102 } 110 }
103 111
104 private var calendar: some View { 112 private var calendar: some View {
105 page(symbol: "calendar.badge.clock", title: "Calendar events", 113 page(symbol: "calendar.badge.clock", title: "Calendar events",
106 text: "Show events from Calendar among your agenda's entries. You can choose which calendars in Settings.") { 114 text: "Show events from Calendar among your agenda's entries. You can choose which calendars in Settings.") {
107 EmptyView() 115 needsPro
108 } actions: { 116 } actions: {
109 primary("Continue") { 117 primary("Continue") {
110 Task { 118 Task {
@@ -112,13 +120,14 @@ struct OnboardingScreen: View {
112 next() 120 next()
113 } 121 }
114 } 122 }
123 secondary("Not Now") { next() }
115 } 124 }
116 } 125 }
117 126
118 private var reminders: some View { 127 private var reminders: some View {
119 page(symbol: "checklist", title: "Reminders app", 128 page(symbol: "checklist", title: "Reminders app",
120 text: "Show incomplete reminders with a due date from the Reminders app in your agenda, read-only.") { 129 text: "Show incomplete reminders with a due date from the Reminders app in your agenda, read-only.") {
121 EmptyView() 130 needsPro
122 } actions: { 131 } actions: {
123 primary("Continue") { 132 primary("Continue") {
124 Task { 133 Task {
@@ -126,6 +135,16 @@ struct OnboardingScreen: View {
126 next() 135 next()
127 } 136 }
128 } 137 }
138 secondary("Not Now") { next() }
139 }
140 }
141
142 /// Calendar and Reminders in the agenda are orgstar+ features.
143 @ViewBuilder
144 private var needsPro: some View {
145 if !ProAccess.shared.isUnlocked {
146 Label { Text("Needs orgstar+") } icon: { PlusBadge(size: 22) }
147 .font(.subheadline.weight(.medium))
129 } 148 }
130 } 149 }
131 150
@@ -135,7 +154,7 @@ struct OnboardingScreen: View {
135 finish() 154 finish()
136 return 155 return
137 } 156 }
138 withAnimation(.snappy) { step = following } 157 withAnimation(reduceMotion ? .easeInOut(duration: 0.2) : .snappy) { step = following }
139 } 158 }
140 159
141 // MARK: - Layout 160 // MARK: - Layout
@@ -144,18 +163,27 @@ struct OnboardingScreen: View {
144 symbol: String, title: LocalizedStringKey, text: LocalizedStringKey, 163 symbol: String, title: LocalizedStringKey, text: LocalizedStringKey,
145 @ViewBuilder content: () -> Content, @ViewBuilder actions: () -> Actions 164 @ViewBuilder content: () -> Content, @ViewBuilder actions: () -> Actions
146 ) -> some View { 165 ) -> some View {
147 VStack(spacing: 20) { 166 // The text scrolls at large text sizes; the actions stay below it.
148 Spacer(minLength: 24) 167 let content = content()
149 Image(systemName: symbol) 168 return VStack(spacing: 20) {
150 .font(.system(size: 44, weight: .semibold)) 169 GeometryReader { geometry in
151 .foregroundStyle(Color.accentColor) 170 ScrollView {
152 .frame(width: 96, height: 96) 171 VStack(spacing: 20) {
153 .background(Color.accentColor.opacity(0.12), in: Circle()) 172 Image(systemName: symbol)
154 .accessibilityHidden(true) 173 .font(.system(size: 44, weight: .semibold))
155 Text(title).font(.title.bold()).multilineTextAlignment(.center) 174 .foregroundStyle(Color.accentColor)
156 Text(text).font(.body).foregroundStyle(.secondary).multilineTextAlignment(.center) 175 .frame(width: 96, height: 96)
157 content() 176 .background(Color.accentColor.opacity(0.12), in: Circle())
158 Spacer(minLength: 24) 177 .accessibilityHidden(true)
178 Text(title).font(.title.bold()).multilineTextAlignment(.center)
179 Text(text).font(.body).foregroundStyle(.secondary).multilineTextAlignment(.center)
180 content
181 }
182 .padding(.vertical, 24)
183 .frame(maxWidth: .infinity, minHeight: geometry.size.height)
184 }
185 .scrollBounceBehavior(.basedOnSize)
186 }
159 VStack(spacing: 12) { actions() } 187 VStack(spacing: 12) { actions() }
160 } 188 }
161 } 189 }
docs/manual/guide/14-ios.org +1 −1 · view
@@ -4,7 +4,7 @@
4 4
5* Overview 5* Overview
6 6
7On first launch, a few screens introduce the app, ask for the folder of org files, and offer notifications, Calendar events and Reminders; each permission is asked for only when you choose it, and every one can be changed later in Settings. The app has three tabs, and opens on Folders until a folder has been added: 7On first launch, a few screens introduce the app, ask for the folder of org files, and offer notifications, Calendar events and Reminders. Each permission is asked for only when you tap Continue on its screen; Not Now skips it, and every one can be changed later in Settings. The Calendar and Reminders screens say when the feature needs orgstar+. With Reduce Motion on, the screens fade into each other instead of sliding. The app has three tabs, and opens on Folders until a folder has been added:
8 8
9- Agenda :: the agenda over your folders, with capture. 9- Agenda :: the agenda over your folders, with capture.
10- Folders :: the folders of org files you added. Each shows its subfolders and org files; tap a subfolder to open it. 10- Folders :: the folders of org files you added. Each shows its subfolders and org files; tap a subfolder to open it.
l10n/Localizable.xcstrings +34 · view
@@ -40439,6 +40439,40 @@
40439 } 40439 }
40440 } 40440 }
40441 }, 40441 },
40442 "Your org files on iPad, in the folders where they already are.": {
40443 "localizations": {
40444 "de": {
40445 "stringUnit": {
40446 "state": "translated",
40447 "value": "Deine Org-Dateien auf dem iPad, in den Ordnern, in denen sie schon liegen."
40448 }
40449 },
40450 "es": {
40451 "stringUnit": {
40452 "state": "translated",
40453 "value": "Tus archivos Org en el iPad, en las carpetas donde ya están."
40454 }
40455 },
40456 "fr": {
40457 "stringUnit": {
40458 "state": "translated",
40459 "value": "Vos fichiers Org sur l'iPad, dans les dossiers où ils se trouvent déjà."
40460 }
40461 },
40462 "ja": {
40463 "stringUnit": {
40464 "state": "translated",
40465 "value": "iPadでOrgファイルを、今あるフォルダのまま利用できます。"
40466 }
40467 },
40468 "pt-BR": {
40469 "stringUnit": {
40470 "state": "translated",
40471 "value": "Seus arquivos Org no iPad, nas pastas onde eles já estão."
40472 }
40473 }
40474 }
40475 },
40442 "Your org files on iPhone, in the folders where they already are.": { 40476 "Your org files on iPhone, in the folders where they already are.": {
40443 "localizations": { 40477 "localizations": {
40444 "de": { 40478 "de": {
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form