-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[9.2] Add clipboard button to public share link #25418
Conversation
@DeepDiver1975, thanks for your PR! By analyzing the annotation information on this pull request, we identified @PVince81, @jancborchardt and @MorrisJobke to be potential reviewers |
09814c6
to
c014092
Compare
In safari, the copied string is the path of the file, not the public shared link. Something like host/index.php/apps/files/?dir=/COSAS/SUBCOSAS&fileid=10 |
c014092
to
b3e202d
Compare
fixed |
strange 💩 |
Ideally the link should directly be copied to the clipboard as soon as you click »Share link«. That will make the flow even more seamless. Can you change it so that happens automatically? |
@jancborchardt I haven't seen that behaviour in any other app. It seems unnatural that clicking in the checkbox copies the text. What if the user unchecks it later? What would happen with the clipboard? In addition, users won't know that the link is copied unless they're told explicitly. If we don't use any kind of notification, this feature won't be used properly. So, where and how will the notification be placed in this case? Moreover, the previous clipboard contents will be overwritten. I'd rather have an explicit user interaction. We don't know what will the user do with the link, and we shouldn't suppose that he will want to copy the link. |
Notifications can be implemented using the tooltip - this should not be an issue. But I agree on the matter that the clipboard is overwritten which is somewhat unexpected and make the user angry if some valuable content is in there. |
But creating a link without copying it is kind of senseless, isn't it? I never created a link share (beside testing of the sharing app) and didn't copied it. |
I just have no thing in mind: sending it via email: but then there should be definitely something like a "guide": you created a share: What to do with this share? Send via email - copy link - ... |
There are for sure things which can be improved - let's for now just introduce the copy link button. |
a5d64bd
to
43e2af3
Compare
Yeah, let’s go step-by-step. I still think automatically copying it makes the flow even easier and reduces a step you are surely gonna take, which is copying the link. The clipboard button we need in any case for when you want to get an existing shared link quickly, so 👍 |
43e2af3
to
54a3ce1
Compare
54a3ce1
to
cc67547
Compare
@SergioBertolinSG safari has been fixed as far as technically possible. This is the way this works once the user with safari hits the button:
In addition on ipad and ihone the tooltiop will tell the user that it is not supported - maybe better in this case would be to simply not show the button - but this is a future improvment from my pov |
Works fine 👍 Tested on chrome, safari (with that workaround) and edge. |
clipboard.on('error', function (e) { | ||
$input = $(e.trigger); | ||
var actionMsg = ''; | ||
if (/iPhone|iPad/i.test(navigator.userAgent)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we ever want to reuse that button elsewhere, would be good to have all this logic in a central place, like js.js in OC.Util or so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do this once necessary - I have no clue what the perf impact is if we setup the clipboard instance in js.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Note that the way I see it is more like a method OC.Util.setupClipboard($inputField)
that does this lazily.
Anyway, let's merge this for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, let's merge this for now.
THX 🎉
Great, guys! For my Passwords app I really would like to have it in a global function. |
That's awesome! I'll let you know, thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
and I also moved the mail send button: