Skip to content

Search results are missing copy to clipboard functionality #9

Closed
clooth opened this Issue Nov 25, 2013 · 11 comments

4 participants

@clooth
clooth commented Nov 25, 2013

Could be implemented using the ZeroClipboard by itself, or via the jquery.clipboard plugin wrapper.

I suggest we use a simplistic icon to indicate the copy action, or follow the example of the div.os style, except display it only on hover, and with eg. a lighter background.

@thomasgallagher

Really missing this feature, it's generally the primary reason for my visit.

@floere
CocoaPods member
floere commented Nov 26, 2013

@clooth Pull request? :)
@thomasgallagher Here you go http://cocoapods.org/old – will redirect as soon as beta.cocoapods.org works as well as we'd like it to (probably including copy/paste).

@thomasgallagher

Many thanks @floere

I'd submit the pull request myself but can't help out until client work settles down.

@floere
CocoaPods member
floere commented Nov 26, 2013

Thanks @thomasgallagher – the CP team is quite busy atm, which is why I am a bit pushy ;)

@orta
CocoaPods member
orta commented Nov 26, 2013

I don't have flash installed so I didn't even know this feature really existed. However, I don't have time to build & perfect this right now, so I've mocked up how it should work.

copy-to-clipboard

We have a 50% opacity icon that on hover uses the same popover that we use for the PR requests at the bottom of each page, note you have to manually activate the ability to show these popovers on divs.

If you have flash you can click on the clipboard to copy automatically, we may have to update to bleeding edge version of modernizr (Modernizr/Modernizr#48) to indicate this is possible, otherwise you can move the mouse up and copy yourself. You will have to do some JS to make this latter bit work correctly as it's not default behaviour to allow the mouse to go over the popover.

Putting it before the os notifier means consistency in the flow. Having the popover means we're showing exactly whats going in and is consistent with the rest of the sites.

The wording & icon aren't 100% but I think this is a solid start. Again, if you have flash installed we should say click, if not we should say something different.

@clooth
clooth commented Nov 26, 2013

Popovers are silly for single action buttons and/or links.

@floere
CocoaPods member
floere commented Nov 26, 2013

@clooth What would you do in case somebody does not have flash installed – any ideas?

@floere
CocoaPods member
floere commented Nov 26, 2013

@clooth Calling other people's idea "silly" is not the best way to go about it, by the way. It's better to make constructive suggestions.

@clooth
clooth commented Nov 26, 2013

Sorry, I actually got a notification on my phone about it and typed on my phone. Just came back for clarification. Copying to clipboard is supported in some browsers out of the box as well, but I don't know yet how it should be dealt with. I can take the ball on this and do some research.

@clooth
clooth commented Nov 26, 2013

For users without flash installed on their device, we can downgrade to a functionality that selects the copyable text in a box from where they can copy it to their clipboard. I think users without flash installed are, right now at least, a minority.

@mtitolo mtitolo referenced this issue in CocoaPods/CocoaPods Nov 27, 2013
Closed

Where is the copy button in the new website? #1625

@floere floere was assigned Nov 27, 2013
@floere
CocoaPods member
floere commented Nov 27, 2013

I've implemented this in a very simple style in 518f570. It works for both people with and without flash. The looks are still questionable, but the functionality is there.

@floere floere closed this Nov 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.