Button to reliably copy secret URLs

Bug #1314890 reported by shanen
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Nigel Cunningham

Bug Description

Hi Team!
Another Wishlist item - this time regarding copying secret URL's.
At the moment we rely on students and staff to accurately select all of the secret URL as seen in attached screenshot.

This can be a hit and miss affair and leaving off even one character results in a broken link.

My wish is for a "Copy link to clipboard" button - to make the select/copy process simple and painless.

This feature can be seen on any Web2 app where someone has to copy embed code (eg. youtube, prezi) and just makes it easy.

Thanks very much.
Shane.

Mahara 1.8

Revision history for this message
shanen (shane-nuessler-canberra) wrote :

screenshot!

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 1.10.0
tags: added: usability
Changed in mahara:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Huh, I thought for sure I'd already filed a wishlist about this one myself, but I can't find one, so maybe I forgot.

I have definitely researched this one before. My favorite choice was zeroclipboard (http://zeroclipboard.org/), which I seem to recall is what github uses. There's even a handy jQuery library for it to make it easier: http://www.steamdev.com/zclip/

I also looked into what gerrit uses, but that wasn't as satisfactory because it was an older library that was no longer being updated. I think it also didn't support translations as well either.

Interestingly, YouTube doesn't have a "copy" button like github and gerrit. Instead in YouTube, when you bring up the "share" dialog, the URL or embed iframe code are within a text field where the text is already selected and you just have to hit Control-C to copy it. So that's another way we could go.

Revision history for this message
shanen (shane-nuessler-canberra) wrote :

Hi Aaron,
Thats true, sorry, youtube just selects. Which as you point out would solve the core issue.
Perhaps a button next to each URL that just says "Select" so then the user could copy using whatever platform specific way they want to use.

In youtube there is only one link to select, but in Mahara there can be multimple URL's, hence the button approach to make a selection.

Thanks,
Shane.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Ah, you're right, YouTube only ever has to show one thing at a time, which is why they can get away with only doing selection instead of copying. Since we have multiple, we'll need a button anyway, so it may as well copy the text. The ZeroClipboard library should make that relatively easy.

Revision history for this message
shanen (shane-nuessler-canberra) wrote :

I wonder if there are any other areas in Mahara where you could use that library, to get most value out of it.
Nothing comes immediately to mind though ???

(Emoticon support in this editor would be cool.)

Changed in mahara:
assignee: nobody → Nigel Cunningham (nigelc-g)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3502

Revision history for this message
Nigel Cunningham (nigelc-g) wrote : Re: wishlist: button to reliably copy secret URLs

Subscribing Kristina and Evonne as I need a new button image for this bug.

I've prepared a new patch (in Gerrit), and am currently using another button, just for testing. I've spoken to Evonne, who requested that I ask Kristina to add this to the to-do list she has for Evonne. Hope that makes sense! :)

Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Evonne Cheung (evonne) wrote :

Hi Nigel

Sorry this took a while, give this icon button a try and let me know if you need something different.

Cheers!

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3502
Committed: http://gitorious.org/mahara/mahara/commit/7f276caa05bad2d718af767865339aecb980d7ab
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 7f276caa05bad2d718af767865339aecb980d7ab
Author: Nigel Cunningham <email address hidden>
Date: Tue Jul 22 10:02:37 2014 +1000

Copy secret URLs to clipboard button (Bug 1314890)

This patch adds a new button that allows the user to copy
secret URLs to the clipboard without having to manually
select the URL text (a process prone to error). Since
Javascript can't do this directly, it uses the ZeroClipboard
library's Flash based implementation, which adds an invisible
'movie' over the button.

The patch includes error handling, so that if Flash is disabled
or Zeroclipboard is unable to run for some other reason, the
buttons are automatically hidden. Note that if Adobe is set to
ask whether to allow flash to run, the buttons are enabled and
there's no way for us to detect if the user then denies permission.
Since they're explicitly refusing permission and there's nothing
we can do, I'm just documenting the fact here.

Change-Id: Idf6a408b77adc3f5401192688046d8aaa9e125ae
Signed-off-by: Nigel Cunningham <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3504
Committed: http://gitorious.org/mahara/mahara/commit/1b90876febdcb3a56d593307a874e877783acef5
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 1b90876febdcb3a56d593307a874e877783acef5
Author: Nigel Cunningham <email address hidden>
Date: Tue Jul 22 10:02:37 2014 +1000

Add Zeroclipboard library for copy-to-clipboard (Bug1314890)

Add the Zeroclipboard library, for use in the next patch,
which adds a button for copying secret URLs to the clipboard.

Change-Id: I73ac2db677107787f9be0cc3c0d5f5d54bfb3958
Signed-off-by: Nigel Cunningham <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
shanen (shane-nuessler-canberra) wrote : Re: wishlist: button to reliably copy secret URLs

This is great, thanks Robert, Aaron, Nigel, Evonne!

tags: added: nominatedfeature
summary: - wishlist: button to reliably copy secret URLs
+ Button to reliably copy secret URLs
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Aaron Wells (u-aaronw) wrote :

See also Bug 1513665, for subsequently replacing this with an HTML5 equivalent. (Since I keep coming across this page in Google while looking for the other one.)

Revision history for this message
Niranjan (niranjan528) wrote :

Precondition:

1. Normal users ‘User one’ and ‘User two’ should exist.
2. A Page ‘Page 01’ should exist.
3. Share ‘Page 01’ access with ‘User two’

Steps to reproduce:

1. Log in as a ‘User one’.
2. Navigate to Main menu > Portfolio > Shared by me.
3. Click the ‘Secret URL’ icon for ‘Page 01’.
4.* *Click the ‘New secret URL’ button.
5. Click the ‘Copy secret URL to the clipboard’ icon.
6. Open a new tab and paste the secret URL.

Expected result: ‘Page 01’ should be displayed.

6. Log out as ‘User one’.
7. Log in as ‘User two’.
6. Open a new tab and paste the secret URL that is copied at step 5.

Expected result: ‘Page 01’ should be displayed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.