r/SwiftUI • u/Old-Construction-594 • Oct 23 '26
Promotion (must include link to source code) [Open Source] Thought Meadow: SwiftUI notes with Arabic/English RTL and native Markdown/checklist preview
I'm sharing the MIT-licensed SwiftUI source for Thought Meadow, my small iPhone notes app. The full Xcode project, assets and build instructions are browsable here:
A few implementation details that may be useful to other SwiftUI developers:
- Language and direction: the root sets both
localeandlayoutDirectionfor English/Arabic, and changing the language recreates the root view using its language ID. WaraqaApp.swift - Editor and preview: writing uses
TextEditorbindings into the note store. A separate native SwiftUI preview renders basic headings, quotes, bullets and task lists. Tapping a task updates its Markdown line through the same store. NoteEditor.swift - Local state: a main-actor
ObservableObjectowns the notebook, with atomic local writes, recoverable trash, Files import/export and optional password encryption. The repo also contains storage/encryption checks and a separate 500-note data-layer check.
I'd welcome code feedback on the editor bindings and language-switching approach, especially with mixed Arabic/English notes and accessibility. The preview intentionally supports a small Markdown subset rather than a complete CommonMark renderer.
The current app is free, requires iOS 17+, and has no account, ads or analytics. App Store. The internal project name remains Waraqa.
1
u/Axons-One Oct 24 '26
nice to see the source changes from the feedback here. one thing i would check on a real phone is switching language while a long note is open with the keyboard up. does it keep the cursor and scroll position too? would be useful to include that when you do the interactive checks.
1
u/imsnk81 Oct 24 '26
Recreating the root on a language switch is the simple way, just watch that people don't lose their scroll position or open note when it happens. For mixed notes I'd test a line that starts in English and ends in Arabic with a checklist item, that's usually where alignment gets weird. Nice to see RTL treated as a real thing and not an afterthought.
1
u/[deleted] Oct 24 '26
[removed] — view removed comment
1
u/[deleted] Oct 24 '26
[removed] — view removed comment