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

Improve share link handling #2742

Closed
AndyScherzinger opened this issue Jun 21, 2018 · 18 comments
Closed

Improve share link handling #2742

AndyScherzinger opened this issue Jun 21, 2018 · 18 comments

Comments

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 21, 2018

as discussed in the forum with @jancborchardt and @jasonbayton: https://help.nextcloud.com/t/nextcloud-android-app-update-with-improved-user-interface-and-sharing/32900/15?u=jan

When a share link is created, copy it to the clipboard directly for fast sharing while not showing the "Send to" dialog anymore. This way the experience is smoother and the user can still edit the links permissions etc. without having to close the send action dialog but can do that anytime afterwards via the newly introduced menu item.

Upon initial creation when the link is auto copied into the clipboard show a Toast saying: "Share link copied"

@jancborchardt
Copy link
Member

Yup! And showing a toast/snackbar (always mixing up the names … :D) with "Share link copied" for feedback.

@jasonbayton
Copy link
Member

Yes! Far better, thank you!

@AndyScherzinger
Copy link
Member Author

AndyScherzinger commented Jun 21, 2018

Yup! And showing a toast/snackbar (always mixing up the names … :D) with "Share link copied" for feedback.

@jancborchardt I extended the issue's description

In this case it'll be a Toast since Android still uses a Toast for clipboard while all other places have been replaced Toast->Snackbar already :)

@AndyScherzinger
Copy link
Member Author

implemented via #2730 / #2739 shipping with 3.2.1

@jasonbayton
Copy link
Member

jasonbayton commented Jun 28, 2018

Nice one Andy!

@AndyScherzinger
Copy link
Member Author

Thanks @jasonbayton, let's see if it works the way everbody wanted it to be :)

@AndyScherzinger
Copy link
Member Author

Sorry, prematurely closed... the details view still launches the send link to dialog when activating share by link... :(

@ardevd
Copy link
Collaborator

ardevd commented Jul 13, 2018

@AndyScherzinger care to elaborate on what's not working as intended?

@tobiasKaminsky
Copy link
Member

  • open details on a file, e.g. an image
  • go to sharing tab
  • share a link
  • after successful link creating, a dialog is shown
    2018-07-13-113204
  • instead only a "Share link copied" should be shown.

@ardevd
Copy link
Collaborator

ardevd commented Jul 17, 2018

Hmm, I'm not able to reproduce this.

EDIT:

Showing file details first lets me reproduce the issue as you describe. The link is not copied to the clipboard though.

@ardevd
Copy link
Collaborator

ardevd commented Jul 17, 2018

It's the FileDisplayActivity that triggers the ShareLinkToDialog when a link is created. I'm assuming we dont want to use that dialog at all when a link is created?

The problem is that the method that triggers the dialog to appear is called regardless of whether a link is created (toggleShareByLink()) or explicitly sent (showSendLinkTo()). Need to find a way to differentiate between the two different operations because they currently both use ACTION_CREATE_SHARE_VIA_LINK

@tobiasKaminsky
Copy link
Member

@AndyScherzinger as you changed quite a lot there, maybe you have an hint, how to do this?

@AndyScherzinger
Copy link
Member Author

AndyScherzinger commented Jul 18, 2018

Well, @ardevd nailed it pretty much ;) Afaik @jancborchardt wanted

  • the ShareLinkToDialog to pop up in case the link is created via the bottom sheet and
  • copied to clipboard in case the link is created via the files details fragment.

So like @ardevd mentioned we would need to have to actions like ACTION_CREATE_SHARE_VIA_LINK_SEND_TO and ACTION_CREATE_SHARE_VIA_LINK_COPY_TP_CLIPBOARD :/

@tobiasKaminsky
Copy link
Member

Then let us wait for confirmation by @jancborchardt and then we have to do it this way and implement two actions…

@jancborchardt
Copy link
Member

jancborchardt commented Jul 19, 2018

We mostly talked about the detail view I think. For consistency reasons and to fit the expectations, it’s best to do it the same in either view. Or do you have other feedback?

And instead of only a toast saying "Link copied" we could show a snackbar saying "Link copied" which on the right has an action for "Send to", which would launch the share sheet (and can be used if needed). This would enhance the way we want to do it in the detail view, and also improve it if we want to use the same method when the link is created via share bottom sheet:

screenshot from 2018-08-09 16-45-15

And because the bottom sheet already has all these "Send to other apps" options listed below our "Share" and "Share link" icons, we don’t need to have the ShareLinkToDialog directly show when using the "Share link" way. (Because then it just seems like a weird 2-step process for sharing a link, where for sharing with another app you might as well just use those direct icons in the bottom sheet which share the file itself, not a link.)

Does that make sense?

@AndyScherzinger
Copy link
Member Author

Does that make sense?

Took me a while do understand it 😆 but makes sense to me now 👍

@jancborchardt
Copy link
Member

@AndyScherzinger also added a quick illustration of the Snackbar for better understanding. :D

@AndyScherzinger
Copy link
Member Author

Thanks @jancborchardt

@tobiasKaminsky @ardevd I am fine with Jan's proposal, well, I even think that is the best solution 👍

@tilosp tilosp self-assigned this Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants