Example app: file import/export, delete, and UI polish - #192
Open
panfilov-vladislav wants to merge 4 commits into
Open
Example app: file import/export, delete, and UI polish#192panfilov-vladislav wants to merge 4 commits into
panfilov-vladislav wants to merge 4 commits into
Conversation
added 4 commits
September 3, 2026 13:20
Add a file export/download action to FileView using .fileExporter, backed by a chunked downloadToTemp() helper that streams the repository file into a temporary file without loading it into memory. Remove the text "write content" editor (pencil button and WriteContentSheet), since file content now comes in via import rather than typed text.
Add file import to FolderView: the + button opens a file picker and streams each chosen file into the repository in chunks with a progress overlay; on macOS files can also be dragged in from Finder (drop target highlights with a dotted-arrow icon). Add delete for files and folders via swipe actions and context menu, with a confirmation dialog (recursive for non-empty folders). Replace empty-file creation with a folder-only create button (folder.badge.plus) and a native iOS new-folder sheet.
Add swipe actions and a context menu to repository rows for sharing and deleting, alongside the existing inline buttons. Restyle the create-repository sheet on iOS as a medium-detent Form with Cancel/Create pinned to a bottom bar, instead of a full-height sheet with top toolbar buttons.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rounds out the iOS/macOS OuiSync example app with the file-management
operations it was missing, plus some platform-appropriate UI cleanup.
No changes to the OuisyncLib bindings — this is example-app only.
What's new
Bring files in
+button opens the system filepicker and streams each chosen file into the repo in 64 KiB chunks,
with a progress overlay (nothing is loaded fully into memory).
highlights with a dotted-arrow icon.
Get files out
.fileExporter, backed by a chunkeddownloadToTemp()helper that streams to a temp file and hands it tothe exporter without buffering the whole file in memory.
Manage entries
confirmation dialog (recursive delete for non-empty folders, called out
in the warning).
+action into a file import button and afolder-only create button (
folder.badge.plus); drop empty-filecreation and the text "write content" editor, since content now comes
in via import.
alongside the existing inline buttons.
UI polish
Formwith Cancel/Create pinnedto a bottom bar, instead of full-height sheets with top toolbar buttons.