Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share with user/groups #351

Closed
jesmrec opened this issue Apr 4, 2019 · 8 comments
Closed

Share with user/groups #351

jesmrec opened this issue Apr 4, 2019 · 8 comments
Assignees
Labels
Estimation - 8 (XL) 8 points feature:sharing p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@jesmrec
Copy link
Contributor

jesmrec commented Apr 4, 2019

As an user, i want to share my contents with other users or groups, in my owncloud server or in another one

AC (already defined in epic):

  • User can share any file or folder with other users and groups, by searching them (using patterns) and selecting the desired one
  • User will see if the file is shared and the list of sharees
  • Every share has its own attributes:
    • Permissions: edit and share in case of files. add, edit, delete and share in case of folders
    • Password: will be mandatory depending capabilities
    • Expiration date: will be mandatory depending capabilities
  • Federation will be allowed. with @ notation will be distinguished when the user is in a different oC instance (if capabilities allow it)

The capabilities affecting private sharing are:

  • "Allow apps to use the Share API" -> if false, sharing is not available
  • "Allow resharing" -> If true and the file is shared with the user, no sharing available
  • "Allow sharing with groups" -> if false, groups will not appear in searching
  • "Restrict users to only share with users in their groups"
  • "Restrict users to only share with groups they are member of"
  • "Exclude groups from sharing"
  • "Allow username autocompletion in share dialog. If this is disabled the full username needs to be entered."
  • "Default user and group share permissions"
  • "Extra field to display in autocomplete results"
  • Federation: allow federation,

Some UI drafts will be welcome to discuss implementation.

related: Public Share: #275

@jesmrec jesmrec added this to the 1.1.0-Next milestone Apr 5, 2019
@michaelstingl michaelstingl added the p2-high Escalation, on top of current planning, release blocker label Apr 8, 2019
@michaelstingl michaelstingl changed the title Private Share Share with user/groups Apr 8, 2019
@hosy hosy self-assigned this Apr 8, 2019
@hosy
Copy link
Collaborator

hosy commented Apr 11, 2019

I finished a first draft and I'm interested in your opinion.

Starting point is the Action-View, where you have action for an item and further informations like file name, file size, modifying date and file icon.
My thoughts was to show there if the item is shared. If the item is shared, you can see all recipients for the share. I decided to put the names one after the other without further informations and actions, because in this view it should only give a first overview and the view has not so much space for more actions.
If the item currently is not shared, you have an action to add a new share recipient.

IMG_8108-2 IMG_8105-2

If you tapped on the share recipients you will get a new sharing view, where you can see all recipients grouped by Users, Groups and Remotes. For every recipient you can see the granted permissions, without any need to look at each recipient in the detail view.
If you want to add a new share recipient, start typing into the search bar and after selecting the result the recipient a new share will be created for the item.

IMG_8107-2

If you want to change the permissions, select one and a new edit view will opened. Here you can change the permissions, get more informations like the creation date for the share, revoke the share or you can see the reshares for this item by the selected user.

IMG_8106-2

So, what do you think?

@jesmrec
Copy link
Contributor Author

jesmrec commented Apr 11, 2019

Some comments from my side:

  • If you share an item with several users (like in the screenshot), it seems a bit overloaded. For such aim, i'd go for a list set up like in the other screenshot, and remove the recipients from there, keeping the option. In the Sharing menu of the card, more options should be included, so i'd let there only the options and not the internal details of each one of them.
  • In the file list, some kind of icon should mark whether the item is shared or shared with me.
  • Revoke Sharing in the Sharing menu would be more straightforward (swipe option?) as in the permissions
  • I miss the Delete permission. Don't forget that the permissions are different for files and folders (files -> edit, share; folders -> create, edit, delete, share)

expecting your comments

@hosy
Copy link
Collaborator

hosy commented Apr 11, 2019

I have updated two screens. All screens are (working) design drafts, but not all features are implemented (permissions, etc.).

IMG_8112-2 IMG_8113-2

@felix-schwarz
Copy link
Contributor

felix-schwarz commented Apr 12, 2019

I really like what I see. A couple of thoughts from my side:

  1. I like the one line summary, especially when making it flexible:
  • in its place, the app should show a spinner while the app fetches the shares from the server
  • if no shares were retrieved, the space could turn into a "Share this file" / "Share this folder" "button" (the way the actions are currently styled in the card)
  • if shares were retrieved, create a summary like in the original approach and compute if it can be shown in full:
    • if it can be shown in full, show it
    • if it can't be shown in full, show a summary of the kind "6 recipients, 1 public link"
  1. I think the (+) button should be moved up from the summary line, to the right border of the "Sharing" header. And in the summary line, if there are any existing shares, a disclosure arrow to the right (like the next to "Felix" in the screenshot above) be shown. The (+) button, when tapped, should show the overview and focus on the search field.

  2. I find the current permission naming in ownCloud to be confusing. Without looking at the docs, I'd have a hard time to know what f.ex. the difference between "change" and "edit" is. The UX could be improved here, f.ex. by providing presets (think "read-only", "read, write", "read, write and share" "custom") and/or adding brief explanations directly below the names of the permissions so users know what the permissions mean.

  3. Regarding presets, this should become relevant again for public links. There may also be customers who'd like to configure their own presets - or which presets are available (@michaelstingl will know more about this).

  4. Maybe, instead of "Revoke sharing", use "Stop sharing" or "Delete share".

  5. Finally, a general thought on the space used by the actions:

We have a lot of whitespace around the action names right now. If we want to reclaim some of that space, one possible solution would be to turn them into icons (similar to the iOS share sheet) and layout them horizontally or as a grid.

Since we already have an Action class for every action, and also the ability to provide different images for different locations (toolbar, more card, …), this could be pretty straight forward.

Looking ahead and seeing the addition of more specialized actions (like "Scan document"), this would also scale better.

@michaelstingl
Copy link
Contributor

5. Finally, a general thought on the space used by the actions:

We have a lot of whitespace around the action names right now. If we want to reclaim some of that space, one possible solution would be to turn them into icons (similar to the iOS share sheet) and layout them horizontally or as a grid.

Since we already have an Action class for every action, and also the ability to provide different images for different locations (toolbar, more card, …), this could be pretty straight forward.

@felixboehm Could you provide a quick sketch to illustrate your idea?

@felix-schwarz
Copy link
Contributor

felix-schwarz commented Apr 12, 2019

@michaelstingl Sure. Here are two possible designs:

Grid layout Row layout
Actions Actions-2
  1. In a grid

  2. In one row:

  • placing the most frequently used/relevant actions first
  • if there are more actions than fit horizontally, indicate there are more actions by ensuring the last visible action is only partially visible

@hosy
Copy link
Collaborator

hosy commented Apr 12, 2019

@felix-schwarz thank you for your ideas. I more like version 1. in a grid. Because I don't like it to scroll until I see the action I need.
Space is better used and all actions are visible. The only thing I'm not sure about if labels working with long translations.

@hosy
Copy link
Collaborator

hosy commented Apr 12, 2019

I have added info messages for the permissions in edit view. These messages are hidden, until you tap on the Info button on the top right. If you do not need help, you have a clean UI, but if you need more informations, you can show the info messages.

IMG_8116-2

hosy added a commit that referenced this issue Jun 8, 2019
…roups and Remote Users, Public Links (#358)

* #351 added first draft of Sharing with users, groups, remotes

* - changes for shared with user handling
- new toggle action
- set permissions (unfinished)

* - added icon in file list, if item is shared
- handling shared by me and shared with me in file detail view
- disable permission editing, if user is not the owner
- delete receipient
- added sorting by "shared" in file list

* setting permissions is now working

* using correct sdk commit

* changed query, if item is shared

* - search for recipients
- add recipient to share

* removed deleted SharingSearchResults Controller

* - removed unneeded elements
- fixes for recipients search

* - fixed crash on adding recipient to share
- added header title to search recipients

* - added activity view when searching shares
- refactored code

* fixed Theming for searchBar and selecting rows

* - moved MessageView to own class
- fixed keyboard height constraint in MessageView
- added localization strings
- fixed updating shares handler

* - Add menu: left aligned text, added icons
- More menu: left aligned text, added icons
- fixes for UI glitches in more menu (correct height)
- fixed wrong table header height in MoreStaticTableViewController, for sections without section title
- close more menu before opening sharing overview

* - fixed missing sharing row
- fixed tint color for image

* - changed image alignment
- updated to new sharing SDK (which fixes update notification)

* - fixed wrong usage of Sharing SDK-API
- added delete recipient by swiping in overview

* - fixed delete recipient, only if user has permissions
- new function to detect if user can edit OCShare

* added activity indicator to searchbar

* - implemented public link sharing (WIP)
- updated localization

* - fixed date picker row disable handling
- fixed password row

* - using new SDK with support share.protectedByPassword
- code cleanup

* removed merging with master problems

* - password fixed
- setting permissons
- datepicker: themed, autolayout
- main thread fixes

* - fixed creating public link
- only show "Create Public Link" if item has sharing permission

* added capability support for sharing/public links

* - fixed missing expire date switch
- fixed deleting share receipients

* - fixed wrong sharing logic
- code cleanup

* - fixed keyboard focus for searchbar
- fixed first new public link share was not shown
- added expire date, protected by password in public link details

* - changed sharing icon
- new icon in file list for public links
- no longer use folder sharing icon in file list
- left aligned icons in action menu
- show always icons for sharing/public links in action menu

* code refactoring

* - using new SDK, which fixes URL encoding problems
- multiline for detailtext in table row

* - determine, if an item is shared by user or group
- removed share polling in Action
- stop share polling, if view was dismissed

* - added an action event, when the text field action should be performed
- perform password field action, if editing finished

* added action event for name text field

* - fixed, when showing share rows
- code refactoring

* code refactoring

* - fixed setting share permissions for edit row
- code refactoring

* - changed edit permissions handling (only show change, create, delete if edit is enabled)
- code refactoring
- removed unneeded code

* use correct new created share

* - added item header to sharing overview
- using new SDK with API v2 and additional receipient info

* fixed searchDisplayName

* - use new SDK, which supports pending shares, ...
- implemented pending shares
- new library tab bar item, which holds pending shares and all other shares as file list
- decline a share from sharing view

* set correct table row titles

* - changed Library to Quick Access
- added new Custom Filelist, to show items for custom OCQuery like Recents, Favorites, Images, PDFs, ...
- fixed crash

* - added pending cloud shares
- added search bar to customfilelist controller
- added message view to customfilelist controller
- fixed on main thread crash

* added accepted cloud shares, to "Shared with me"

* - using new SDK with fixed Favorite support
- added setting favorite state in MoreHeader
- added copy private link to public link view
- added refresh interval for OCShareQuery in library view
- code refactoring

* - fixed group sharing
- resolved merge problems
- do not auto add new public link
- removed message view

* fixed main thread crash

* - show shared items only unique, if it was shared to more receipients
- changed favorite button tint color

* code refactoring from code review

* code refactoring for code review

* - added missing localization strings
- removed swift lint warnings

* - subclass for ClientItemCell, which retrieves OCItem by OCShare path and tracks updates for OCItem
- added a represented object to send updated shares to an open SharesFilelistTableViewController

* - using new SDK with refresh for favorites support
- implemented favorites refresh on load and on pull to refresh
- set tint color for sectionIndex

* set default values from OCShare until OCItem is loaded

* - added themable background to custom file list
- removed iPad form sheet presentation style for sharing views
- fixed crash on BreadCrumb selection, if index does not exists

* code review changes

* - added header title to "Copy URL" table view row, to show the link URL (private and public)
- show a "Create Public Link" button row, if no public link exists in overview

* show header label as multiline, because of long urls

* - fixed setting favorite state
- code review changes

* fixed updating preferred content size in cardview for shares

* show image (group, person) for recipient search results

* added missing translation string from clear storage

* mostly retain cycles, fixed cardViewController content size, constraints fixed, clean up duplicated code

* new wording for sharing and some logical changes for sharing UI

* fixed failed merge conflicts

* - creating shares and public links needs confirmation, before creating
- fixed some wording
- fixed missing open-in image

* disable table scrolling for quick access view

* - fixed constraint problems
- auto updating share state in file list
- changed some sharing wording
- show rejected pending shares
- fixed initale share permissions

* If link will be created, share button is not needed

* - fixed wording
- setting default permissions for sharing
- do not show decline action for declined shares

* - Break various retain cycles

* - Add missing constraint to UITableViewController+Extension.swift

* - Refactor item lists to new class tree:
        - FileListTableViewController
                - SharesFilelistTableViewController
        - QueryFileListTableViewController
                - ClientQueryViewController
                - CustomFileListTableViewController
- Restructure source file locations

* - Adding missing copyright notes, minor improvements

* - Continue refactoring of file lists
	- move pull-to-refresh to root level (and add option to disable it)
		- add completion block for custom pull-to-refresh actions
	- move queryProgressSummary to root query level (and add option to disable it)
- Theme fixes

* - Fix accepted cloud shares being dropped if the list of items shared with the user changes
- Renamed updateLibrary() to setupLibrary() to emphasize the method's run-only-once character

* - Fix issues in LibraryTableViewController
	- fixed visibility of sharing section
	- fixed updates to sharing section
	- fixed merge of .sharedWithUser and .acceptedCloudShares queries
- Partial refactor of LibraryTableViewController
- Adding StaticTableViewSection.remove(rowWithIdentifier:)

* - simplify .filter() blocks
- fix refresh bugs in LibraryTableViewController
	- refactor around the concept of "views"
	- add LibraryShareList protocol and LibraryShareView class to LibraryTableViewController and
- LibrarySharesTableViewController
	- update to accept updates and update their content (via LibraryShareList conformance)
- PendingSharesTableViewController
	- update to accept updates and update their content (via LibraryShareList conformance)
	- fix filtering of pending and accepted shares
	- only pop view controller when there are no longer any shares in it (previously popped after every decision)
	- ask to confirm declines in all cases
	- rename declined to rejected shares
- Fix bugs in federated shares support
	- Action.shareRows() now shows "Shared by remote@host" for remote shares
	- OCCore.unifiedShares is now parallelized and also fetches accepted cloud shares
	- GroupSharingTableViewController now shows "Unshare" for remote shares as well
- Add support for unsharing accepted federated shares
- stop queries of SharingTableViewController subclasses on deist
- fix more retain cycles

* - Add "Pending" placeholder for negative item sizes

* - Rename CustomFileListTableViewController to LibraryFilesTableViewController
- Rename GroupSharingEditUserGroupsTableViewController to GroupSharingEditTableViewController
- Editing some OCSharePermissionsMask usages to be more Swifty
- Use instance variables for sections in GroupSharingTableViewController
- Move some additional code from GroupSharingTableViewController and PublicLinkTableViewController to SharingTableViewController
- Fix bug in GroupSharingTableViewController that failed to retrieve the correct share for a row (by using StaticTableViewRow.representedObject)
- Refactored PublicLinkTableViewController to use StaticTableViewRow.representedObject for shares as well
- Turn OCShare.permissionDescription into a property
- Fix a crash bug in StaticTableViewController and increase its swiftiness
- Improved some locales

* - Consolidate NSLayoutConstraint activation in HeaderActionTableViewCell.swift and MessageView.swift

* code review changes
- changed private link section
- public link row changed
- setting default permissions for new shares

* - Update SDK
- Add UIImage padding method to create padded versions of images easily
- Use new padding method to generate equally-width images for the More view

* - Remove non-existant TVG file references

* fixed QA finding (2):
- swipe card to top displaced icon on top and bottom menu item
- changed constraints

* QA finding (2)
- changed sticky table section header to non sticky by changing from plain to grouped table view
- remove footer view in MoreStaticTableViewController to remove gap between sections in grouped style

* QA finding (3) exclude current collaborators from recipient search

* QA finding (7) fixed setting edit permissions and hide/show/selecting the UI

* - Refactor ClientDirectoryPickerViewController to follow best practices and add support for a ClientDirectoryPickerAllowedPathFilter block to control which directories are selectable, and which are not
- Remove code to selectively show actions depending on whether the root directory contains folders

* QA finding (8): remove race condition for permission changes

* - Added ClientDirectoryPickerViewController.navigationPathFilter to allow applying additional constraints on which folders can be navigated to
- Add new convenience initializer to ClientDirectoryPickerViewController to avoid path conflicts - used by Copy and Move action

* QA finding (12) fixed inherit correct resharing permissions
- fixed showing reshares

* QA finding (13) fixed, long filenames and date is now visible

* - added "Invite Collaborator", if item is not shared to overview
- added Owner to share overview
- changed wording
- changed decline handling

* only show decline alert, if share is remote type

* - Fixing ClientRootViewController issues
	- not showing the bookmark editing UI when tapping "Edit" after being informed of authentication not being valid
	- closeClient() calling the completion handler when done, but before the presenting view controller could present the next view controller
- Update ios-sdk to address sharing requests ability to hinder OCCore from shutting down

* - Updated ios-sdk adding recursive deletion of items in the metaData cache

* - added possibility to retrieve more text field delegate actions
- setting default link fixed
- fixed crash on empty link name

* fixed wording

* - setting default expire date
- scroll date picker to visible index path

* changed wording "Save" to "Create"

* fixed removing expiration date

* - fixed counting default link name
- new label for copy links (not finished yet)

* fixed setting expiration date in create mode

* QA finding 25:  if password is required, hide password switch and show secure text field

* QA finding (12) fixed hiding UI elements, if resharing is not allowed
 - fixed pending badge (only count pending items)

* QA finding (15) (16) changed behavior of copy link

* new unshare extension, which is showing in card menu instead of delete menu item, if item is shared to user

* new wording for sharing an item

* fixed text color in search text field

* fixed disable password switch for initial setup, if password is enforced

* fixed enumeration of public link names

* if public link name is empty, use token as name in overview

* hide permission "Share" in description, if resharing capability is not enabled

* new SDK for fixing the default expiration date (was not set before in SDK)

* unshare cloud shares fixed

* update share queries, after accept/decline remote share

* new traitCollection for vertical compact size class, because labels were hidden in landscape view

* - fixed large titles in child view controller
- fixed header view color, when switching to a child view controller

* fixed adding default expiration dates to current date

* - Update ios-sdk to address issue (30) in #358

* - Fix issue (10) in #358 via SDK

* fixed QA finding (32), that only one pending invite was shown, if more exists

* fixed QA finding (27), MessageView has a left and right padding, which showed the content above

* - Correctly handle local user names ending with an "@" (via SDK update)

* - Added OCItem array extension .sharedWithUser
- Fixed retain cycle
- Code cosmetics

* - Added new OCItem.shareRootItem(from: core) and OCItem.isShareRootItem(from: core) methods
- Adapted DeleteAction and UnshareAction so that deletion is available inside shared folders where the owner allowed deletion

* fixed QA finding (35), show options, if not set in default permission list

* - enable "Links" menu item, if public link sharing is disabled
- disable public link section, if not enabled

* - only show link menu item, if bookmark is online
- do not show share menu item, if sharing api is disabled
@hosy hosy closed this as completed Jun 8, 2019
@jesmrec jesmrec mentioned this issue Jun 14, 2019
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Estimation - 8 (XL) 8 points feature:sharing p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

No branches or pull requests

4 participants