Skip to content

Example app: file import/export, delete, and UI polish - #192

Open
panfilov-vladislav wants to merge 4 commits into
masterfrom
swift-bindings
Open

Example app: file import/export, delete, and UI polish#192
panfilov-vladislav wants to merge 4 commits into
masterfrom
swift-bindings

Conversation

@panfilov-vladislav

Copy link
Copy Markdown
Collaborator

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

  • Import files into a repository: the + button opens the system file
    picker and streams each chosen file into the repo in 64 KiB chunks,
    with a progress overlay (nothing is loaded fully into memory).
  • On macOS, files can also be dragged in from Finder; the drop target
    highlights with a dotted-arrow icon.

Get files out

  • Export/download a file via .fileExporter, backed by a chunked
    downloadToTemp() helper that streams to a temp file and hands it to
    the exporter without buffering the whole file in memory.

Manage entries

  • Delete files and folders via swipe action and context menu, with a
    confirmation dialog (recursive delete for non-empty folders, called out
    in the warning).
  • Separate the old combined + action into a file import button and a
    folder-only create button (folder.badge.plus); drop empty-file
    creation and the text "write content" editor, since content now comes
    in via import.
  • Add swipe actions and a context menu to repository rows for share/delete,
    alongside the existing inline buttons.

UI polish

  • Native iOS create sheets: medium-detent Form with Cancel/Create pinned
    to a bottom bar, instead of full-height sheets with top toolbar buttons.
  • Disambiguated the import/export/share icons so they no longer collide.
  • Set the app's display name and utilities category.

Vlad Panfilov 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant