ios-app icon indicating copy to clipboard operation
ios-app copied to clipboard

Fix: Add sharing action to folder navigation bar menu

Open michaelstingl opened this issue 6 months ago • 2 comments

Description

This PR adds the "Sharing" action to the folder navigation bar's more menu (•••) to ensure consistency with the action menu shown for folder items in the file list.

Related Issue

Fixes #1469

Motivation and Context

Users expect the same actions to be available whether they access a folder's actions from:

  • The three-dots menu on a folder item in the file list
  • The three-dots menu in the navigation bar when inside that folder

Previously, the "Sharing" action was only available in the file list context menu but missing from the navigation bar menu.

How Has This Been Tested?

  • Tested on iPhone with iOS 18.5
  • Verified with both ownCloud 10 and ownCloud Infinite Scale servers
  • Confirmed that:
    • Sharing appears in regular folder navigation bar menus
    • Sharing is correctly hidden for OC10 root folders
    • Sharing is correctly hidden for oCIS virtual and personal space roots
    • Sharing is available for oCIS project space roots (when allowed by server)

Screenshots (if appropriate):

N/A - UI remains the same, just adds the missing menu item

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] Added an issue with details about all relevant changes in the iOS documentation repository.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [ ] Added changelog files for the fixed issues in folder changelog/unreleased

michaelstingl avatar Jun 04 '25 19:06 michaelstingl

Added a simple unit test in the second commit to verify the location is included. Happy to adjust or remove if you prefer a different approach!

michaelstingl avatar Jun 04 '25 20:06 michaelstingl

Thanks Michael for your contribution!! let's take a look into there ;)

jesmrec avatar Jun 05 '25 06:06 jesmrec

@felix-schwarz thanks for the review! You're absolutely right - the additional checks aren't necessary. I investigated why item.isShareable already handles all cases correctly:

What I found

The server returns the following WebDAV permissions for root folders:

  • ownCloud 10 root: RDNVCK (no S) → correctly not shareable ✓
  • oCIS personal space root: RDNVCKZP (no S) → correctly not shareable ✓
  • oCIS project space root: RDNVCKZP (no S) → not shareable

I initially expected project space roots to be shareable (since you can add members to a space), but I now understand that:

  • Space management (adding members) is conceptually different from file sharing
  • The web UI handles this with a dedicated "Members" panel instead of the regular sharing UI
  • This is similar to other space management features like quota configuration - they're web-only features, not available in mobile/desktop clients
  • The missing "S" permission for space roots is intentional

Conclusion

I'll remove the additional logic and keep only the .moreFolder addition as you suggested. The unit test isn't necessary either for such a simple change.

This means project space roots won't show the sharing option, which aligns with the server's permission model where space management is separate from file sharing.

michaelstingl avatar Jun 26 '25 21:06 michaelstingl

That's a good catch ;)

Fixed and approved from my side.

jesmrec avatar Jun 27 '25 11:06 jesmrec

@jesmrec Thanks for the quick QA! I also need your formal approval before I can merge this PR, however.

felix-schwarz avatar Jun 27 '25 12:06 felix-schwarz

Done!

jesmrec avatar Jun 27 '25 12:06 jesmrec