Skip to content

feat: rebuild the Share Extension with SwiftUI - #4430

Merged
marinofaggiana merged 51 commits into
masterfrom
share-review-ext
Nov 12, 2026
Merged

marinofaggiana merged 51 commits into
masterfrom
share-review-ext

Conversation

@marinofaggiana

@marinofaggiana marinofaggiana commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Replaces the legacy Share Extension with a new SwiftUI interface and revised input preparation, account selection, and upload conflict handling.

  • Adaptive layout for portrait, landscape, iPad, and iPhone Duo.
  • Folder tree with favorites first and the last three upload destinations.
  • Account menu with avatars and aliases.
  • File thumbnails, renaming, removal, and upload count.
  • Revised item-provider loader with representation fallbacks, cancellation, and explicit import errors.
  • Dedicated conflict handling: replace or keep both for a single file, and unique copy names for multiple files.
  • Capabilities loaded from the database first, with a server fallback, plus offline feedback.

Adds unit tests for input loading, conflict naming, and recent destinations. Device testing and broader validation are still ongoing.

🤖 AI

  • The content of this PR was partly or fully generated using AI.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Host Share sources in app Debug builds with SHARE_PREVIEWS and exclude them from Release builds. Gate preview code and document the required scheme.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Persist the last three successful upload destinations per account and validate folders before selection. Add unit tests for recent destination storage.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Require server capabilities before browsing or uploading, with loading states and retry support. Fall back to usable text when other shared representations fail, including attributed text, and add import regression tests.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana marinofaggiana self-assigned this Oct 28, 2026
@marinofaggiana
marinofaggiana marked this pull request as draft October 28, 2026 17:23
@marinofaggiana marinofaggiana linked an issue Oct 28, 2026 that may be closed by this pull request
Centralize account readiness checks and pass capabilities explicitly through upload preparation and staging.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Distinguish recent-folder selection from tree selection, streamline the folder and file lists, and show a pluralized file count on the upload button.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Refresh folders asynchronously and consolidate share status indicators into a single prioritized view.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Replace the account picker sheet with a menu showing avatars and account aliases. Add cached Quick Look thumbnails with file-type icon fallbacks, and enlarge file and folder rows.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Block network actions while offline and retry loading on reconnect. Adapt the Share extension to compact landscape layouts and show loading progress beside the account menu.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Place the folder header and upload button across both columns, let the file list fill available height, and round selected folder highlights.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Add an explicit cancel action and refine folder label colors and selection padding.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Show favorite folders first with accessible star badges, and scale file thumbnails to fill their frames.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana marinofaggiana changed the title Share review ext feat: rebuild the Share Extension with SwiftUI Oct 29, 2026
Process only directories without replacing cached file metadata. Refine landscape layout, cap Dynamic Type scaling, and show conflict checks in the upload button.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Show errors inline with retry or acknowledgment actions, and block uploads while the destination is loading or has failed.

Label recent and all folders, and use English (US) for previews and debug launches.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Delete obsolete UIKit sources and storyboard, remove their Xcode project references, and drop the unused animated GIF bridging import.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Remove unused sources, resources, and package dependencies from the Share target. Refresh README guidance for SPDX headers, Xcode setup, and test servers.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana
marinofaggiana marked this pull request as ready for review October 31, 2026 07:32
Initialize the folder browser before fetching server capabilities, then refresh folders once capabilities load. Show progress or errors while the share view initializes.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@mpivchev

mpivchev commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
  1. Choosing a folder results in loading always.

You can only do the network requests after pressing Upload?

  1. The toolbar title should not be changed. Use "Save to Nextcloud". There doesn't seem to be enough space so you can remove the name of the account from the tab bar. Only use avatar.

  2. Screenshot 2026-11-03 at 17 39 28

Icon is too small. Use the basic ... icon (without circle) to match other parts of the app.

  1. Remove the "No folders in here" item. It's not needed.

  2. Selecting a folder should automatically expand it, not only by pressing the arrow.

  3. Creating a folder should automatically select it and scroll to it.

  4. Sometimes pressing "Create folder" would close the whole share sheet. Not sure how to reproduce it yet. You can bug hunt with Claude.

@mpivchev

mpivchev commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator
Screenshot 2026-11-03 at 17 58 18

This screen seems too complicated. No need for it IMO.

  1. For a single file, just add an alert saying if you want to "replace" "keep both" or "cancel"

  2. For multiple files, just keep both always if there is a conflict. No need to ask user to micromanage many files.

Dropbox does it like this and personally I'm a big fan. Really simple.

@kra-mo @jancborchardt @nimishavijay what do you think?

@mpivchev mpivchev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check comments

Preserve folder content during account switches and select and reveal newly created folders. Unify loading feedback, keep file extensions visible, and strip bidirectional controls from displayed filenames.

Tie folder dialog validation to the text field lifetime to avoid retaining alerts.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Clear pending uploads and authentication state when no account is available, and suppress upload UI updates after cancellation.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Derive account and folder readiness from existing state, keep upload data local, and silently remove unavailable recent folders.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Strengthen rich-text sharing coverage to verify the original RTF data is preserved.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Keep conflict actions visible below the file list, clarify button labels, and reuse a shared upload button.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana

Copy link
Copy Markdown
Member Author

@mpivchev pls review

Present the passcode within the Share panel and start biometrics after presentation completes. Add the Face ID usage description and resume authentication after upload confirmation is dismissed.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Provision passcode test accounts from launch environment credentials in debug builds, while keeping browser authentication as the default for other UI tests.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Increase the test job timeout to 60 minutes and the Xcode test timeout to 45 minutes.

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Run the presented-sheet passcode test once to validate the timeout.

Assisted-by: Codex:gpt-6
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Assisted-by: Codex:gpt-6
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana
marinofaggiana merged commit 2f9f0ef into master Nov 12, 2026
5 checks passed
@marinofaggiana
marinofaggiana deleted the share-review-ext branch November 12, 2026 08:32
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.

Review and modernize the Share Extension UI

2 participants