From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Mon, 25 Jun 2018 08:46:06 +0800 Subject: [PATCH v3 6/6] line-range-highlight: copy URL to clipboard on click In-Reply-To: <20180624160356.GO6584@john.keeping.me.uk> References: <152980795804.2873.3939128717470466784.stgit@mail.warmcat.com> <152980829459.2873.7085053956237952034.stgit@mail.warmcat.com> <20180624114233.GL6584@john.keeping.me.uk> <26302F2E-37BA-4457-8713-23B6372B8DBE@warmcat.com> <20180624133935.GN6584@john.keeping.me.uk> <20180624160356.GO6584@john.keeping.me.uk> Message-ID: <8C514D69-F11B-43BD-B9EE-EED92AE2CCDC@warmcat.com> On June 25, 2018 12:03:56 AM GMT+08:00, John Keeping wrote: >On Sun, Jun 24, 2018 at 11:06:45PM +0800, Andy Green wrote: >> On June 24, 2018 9:39:35 PM GMT+08:00, John Keeping > wrote: >> >On Sun, Jun 24, 2018 at 08:00:08PM +0800, Andy Green wrote: >> >> On June 24, 2018 7:42:33 PM GMT+08:00, John Keeping >> > wrote: >> >> >On Sun, Jun 24, 2018 at 10:44:54AM +0800, Andy Green wrote: >> >> >> Since the only reason to click on the line number links >> >> >> is to get the corresponding #URL to share, this patch >> >> >> makes that process more convenient by copying the >> >> >> highlit area, be it a single line or a range, to the >> >> >> clipboard on each click of the line number links. >> >> > >> >> >As a user, I'd find this surprising and probably quite annoying. >> >> > >> >> >I strongly prefer that software not overwrite the clipboard >contents >> >> >without an explicit request to do so. A quick survey suggests >none >> >of >> >> >GitHub, Gitlab or repo.or.cz (GitWeb) behave in this way. >> >> >> >> Is there another possible intention behind clicking on the line >> >number >> >> links I am missing? >> > >> >One I can think of (given your recent patches) is to highlight a >line >> >when pointing it out to someone else looking at the same display. I >> >have definitely used this with other web interfaces in the past. >> >> Well, ok, so he can click on it to show his buddy. He gets the URL >in >> his clipboard. But his buddy is there he doesn't need it. > >And what about the piece of code that was cut into the clipboard just >before the interruption? The guy is clicking the link to get a highlight... ... which is a new feature introduced in my patches last week and not in mainline... ... so this wasn't the first time he clicked on line-number links in the Dark Timeline where this patch was accepted... ... so a little animation of a clipboard icon fading out would be enough to have taught him highlight = clipboard now.