#4645 [UX / Frontend] Clone SSH url is not selected entirely (missing ssh://)
Closed: Fixed 4 years ago by jlanda. Opened 4 years ago by dreua.

You will need a repository with write access to reproduces this.

When trying to clone a repository I want to copy and paste the ssh url from pagure / src.fedoraproject.org but when I single-click nothing is selected and on double click the url is selected without the leading ssh://. This of course leads to errors on the clone which are not that obvious in the worst case but at least very annoying. It's the same on 'source code', 'issues' and 'pull requests' repositories.

I just tried this with Firefox - I hope there is some JavaScript that works on all browsers.

Interestingly, git clone git@pagure.io:requests/testprojectasfd.git works without ssh://. (Needs to replace the slash after pagure.io with a colon.)

ssh_url.png


Double click selection behaviour is from the browser and it means word selection, so it stops on punctuation signs. On firefox, you can change the behaviour on about:config, key layout.word_select.stop_at_punctuation or you could use triple click to select whole paragraph and get the whole url as you want.

We could add a dblclick javascript event listener to change the default behaviour, but I'm not sure if we want to

I was raising this issue because I believe that I'm not the only one having that problem and I would like to improve the user experience for everyone, maybe with a bit of focus to new packagers, therefore advice to change the browser configuration is not a solution for me.

I think selecting everything on single click would be good while I don't understand why it shouldn't select everything on double click too. At the very least the the textbox must be large enough so that users can see what's going on. (On src.fedoraproject.org the urls tend to be longer and the ssh:// is almost always invisible.)

I like the idea but not so much the proposed execution...

What about auto-selecting all the string when the input box get focus? That way would be even easyer to select all the url and we don't have to change the double click default behaviour

Metadata Update from @jlanda:
- Issue tagged with: JS, easyfix

4 years ago

That's a great idea!
I was thinking from the user perspective when talking about "single click" since that is the way a text field usually gets focus. Considering the technical side and also different use cases (people might use the tab key instead of clicks or they want to select a part of the url) @jlanda's idea is the best solution imo.

Metadata Update from @jlanda:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 4 years ago View Comment
Related Pull Requests
  • #4659 Merged 4 years ago