Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Search results are missing copy to clipboard functionality #9

Closed
clooth opened this Issue · 11 comments

4 participants

@clooth

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
Owner

@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
Owner

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

@orta
Owner

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

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

@floere
Owner

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

@floere
Owner

@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

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

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
Closed

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

@floere floere was assigned
@floere
Owner

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
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.