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 {
1616 @State private var step = Step.welcome
1717 @State private var importing = false
1818 @State private var problem: String?
19 @Environment(\.accessibilityReduceMotion) private var reduceMotion
1920
2021 private enum Step: Int, CaseIterable {
2122 case welcome, folder, notifications, calendar, reminders
@@ -34,7 +35,7 @@ struct OnboardingScreen: View {
3435 }
3536 .frame(maxWidth: 500, maxHeight: .infinity)
3637 .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))
3839 .id(step)
3940 HStack(spacing: 8) {
4041 ForEach(Step.allCases, id: \.self) { s in
@@ -43,6 +44,7 @@ struct OnboardingScreen: View {
4344 }
4445 .accessibilityElement(children: .ignore)
4546 .accessibilityLabel("Step \(step.rawValue + 1) of \(Step.allCases.count)")
47 .padding(.top, 12)
4648 .padding(.bottom, 12)
4749 }
4850 .tint(model.theme.accentColor)
@@ -63,7 +65,9 @@ struct OnboardingScreen: View {
6365 }
6466
6567 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.") {
6771 VStack(alignment: .leading, spacing: 18) {
6872 feature("calendar", "The agenda", "Scheduled entries, deadlines and TODOs from all your files.")
6973 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 {
98102 next()
99103 }
100104 }
105 secondary("Not Now") {
106 model.set("reminders", to: .bool(false))
107 next()
108 }
101109 }
102110 }
103111
104112 private var calendar: some View {
105113 page(symbol: "calendar.badge.clock", title: "Calendar events",
106114 text: "Show events from Calendar among your agenda's entries. You can choose which calendars in Settings.") {
107 EmptyView()
115 needsPro
108116 } actions: {
109117 primary("Continue") {
110118 Task {
@@ -112,13 +120,14 @@ struct OnboardingScreen: View {
112120 next()
113121 }
114122 }
123 secondary("Not Now") { next() }
115124 }
116125 }
117126
118127 private var reminders: some View {
119128 page(symbol: "checklist", title: "Reminders app",
120129 text: "Show incomplete reminders with a due date from the Reminders app in your agenda, read-only.") {
121 EmptyView()
130 needsPro
122131 } actions: {
123132 primary("Continue") {
124133 Task {
@@ -126,6 +135,16 @@ struct OnboardingScreen: View {
126135 next()
127136 }
128137 }
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))
129148 }
130149 }
131150
@@ -135,7 +154,7 @@ struct OnboardingScreen: View {
135154 finish()
136155 return
137156 }
138 withAnimation(.snappy) { step = following }
157 withAnimation(reduceMotion ? .easeInOut(duration: 0.2) : .snappy) { step = following }
139158 }
140159
141160 // MARK: - Layout
@@ -144,18 +163,27 @@ struct OnboardingScreen: View {
144163 symbol: String, title: LocalizedStringKey, text: LocalizedStringKey,
145164 @ViewBuilder content: () -> Content, @ViewBuilder actions: () -> Actions
146165 ) -> some View {
147 VStack(spacing: 20) {
148 Spacer(minLength: 24)
149 Image(systemName: symbol)
150 .font(.system(size: 44, weight: .semibold))
151 .foregroundStyle(Color.accentColor)
152 .frame(width: 96, height: 96)
153 .background(Color.accentColor.opacity(0.12), in: Circle())
154 .accessibilityHidden(true)
155 Text(title).font(.title.bold()).multilineTextAlignment(.center)
156 Text(text).font(.body).foregroundStyle(.secondary).multilineTextAlignment(.center)
157 content()
158 Spacer(minLength: 24)
166 // The text scrolls at large text sizes; the actions stay below it.
167 let content = content()
168 return VStack(spacing: 20) {
169 GeometryReader { geometry in
170 ScrollView {
171 VStack(spacing: 20) {
172 Image(systemName: symbol)
173 .font(.system(size: 44, weight: .semibold))
174 .foregroundStyle(Color.accentColor)
175 .frame(width: 96, height: 96)
176 .background(Color.accentColor.opacity(0.12), in: Circle())
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 }
159187 VStack(spacing: 12) { actions() }
160188 }
161189 }
docs/manual/guide/14-ios.org +1 −1 · view
@@ -4,7 +4,7 @@
44
55* Overview
66
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:
88
99- Agenda :: the agenda over your folders, with capture.
1010- 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 @@
4043940439 }
4044040440 }
4044140441 },
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 },
4044240476 "Your org files on iPhone, in the folders where they already are.": {
4044340477 "localizations": {
4044440478 "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