List for cgit developers and users
 help / color / mirror / Atom feed
* Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
@ 2024-02-03 17:20 Loïc
  2024-02-03 20:20 ` Christian Hesse
  2024-04-10 13:29 ` Christian Hesse
  0 siblings, 2 replies; 5+ messages in thread
From: Loïc @ 2024-02-03 17:20 UTC (permalink / raw)
  To: cgit

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hi all,

When I create a reference to a precise line in a file (for instance a 
hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a 
visual feedback, on the line I want to highlight.

To implement this feature, I suggest to add a curved arrow ahead of the 
line number.
That could be done by adding the following stylesheet to cgit.css

    div#cgit table.blob td.linenumbers a:target:before {color: 
red;content: "\2BA9";}

(patch attached)

Thank you for your attention
Regards
Loïc

[-- Attachment #2: 0001-Add-a-curved-arrow-ahead-of-the-line-number.patch --]
[-- Type: text/x-patch, Size: 855 bytes --]

From 8dd54834a1fec71b4b278fe137bc1856ea6b41cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <lagiraudiere+cgit@free.fr>
Date: Sat, 3 Feb 2024 15:59:57 +0100
Subject: [PATCH] Add a curved arrow ahead of the line number, to highlight the
 line specified in the URL.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Loïc <lagiraudiere+cgit@free.fr>
---
 cgit.css | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cgit.css b/cgit.css
index 1b848cf..f5b41ba 100644
--- a/cgit.css
+++ b/cgit.css
@@ -330,6 +330,11 @@ div#cgit table.ssdiff td.lineno a:hover {
 	color: black;
 }
 
+div#cgit table.blob td.linenumbers a:target:before {
+	color: red;
+	content: "\2BA9";
+}
+
 div#cgit table.blame td.hashes,
 div#cgit table.blame td.lines,
 div#cgit table.blame td.linenumbers {
-- 
2.40.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
  2024-02-03 17:20 Enhancement request : ui-blob: Make the target line of a link, visually identifiable Loïc
@ 2024-02-03 20:20 ` Christian Hesse
  2024-04-10 13:29 ` Christian Hesse
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Hesse @ 2024-02-03 20:20 UTC (permalink / raw)
  To: Loïc; +Cc: cgit

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Loïc <lagiraudiere+cgit@free.fr> on Sat, 2024/02/03 18:20:
> Hi all,
> 
> When I create a reference to a precise line in a file (for instance a 
> hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a 
> visual feedback, on the line I want to highlight.
> 
> To implement this feature, I suggest to add a curved arrow ahead of the 
> line number.
> That could be done by adding the following stylesheet to cgit.css
> 
>     div#cgit table.blob td.linenumbers a:target:before {color: 
> red;content: "\2BA9";}

Pushed here, but I can not tell if or when this will see any more attraction:

https://git.zx2c4.com/cgit/log/?h=ch/highlight-line
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
  2024-02-03 17:20 Enhancement request : ui-blob: Make the target line of a link, visually identifiable Loïc
  2024-02-03 20:20 ` Christian Hesse
@ 2024-04-10 13:29 ` Christian Hesse
  2024-04-14 21:56   ` Loïc
  1 sibling, 1 reply; 5+ messages in thread
From: Christian Hesse @ 2024-04-10 13:29 UTC (permalink / raw)
  To: Loïc; +Cc: cgit

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Loïc <lagiraudiere+cgit@free.fr> on Sat, 2024/02/03 18:20:
> Hi all,
> 
> When I create a reference to a precise line in a file (for instance a 
> hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a 
> visual feedback, on the line I want to highlight.
> 
> To implement this feature, I suggest to add a curved arrow ahead of the 
> line number.
> That could be done by adding the following stylesheet to cgit.css
> 
>     div#cgit table.blob td.linenumbers a:target:before {color: 
> red;content: "\2BA9";}

I really like that functionality, though the curved arrow is really
inconspicuous. Wondering if something like "large red circle" (or "large
black circle", colored in red) would be a better match...
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
  2024-04-10 13:29 ` Christian Hesse
@ 2024-04-14 21:56   ` Loïc
  2024-04-15  8:45     ` Christian Hesse
  0 siblings, 1 reply; 5+ messages in thread
From: Loïc @ 2024-04-14 21:56 UTC (permalink / raw)
  To: Christian Hesse; +Cc: cgit

Le 10/04/2024 à 15:29, Christian Hesse a écrit :
> Loïc <lagiraudiere+cgit@free.fr> on Sat, 2024/02/03 18:20:
>> Hi all,
>>
>> When I create a reference to a precise line in a file (for instance a
>> hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a
>> visual feedback, on the line I want to highlight.
>>
>> To implement this feature, I suggest to add a curved arrow ahead of the
>> line number.
>> That could be done by adding the following stylesheet to cgit.css
>>
>>      div#cgit table.blob td.linenumbers a:target:before {color:
>> red;content: "\2BA9";}
> I really like that functionality, though the curved arrow is really
> inconspicuous. Wondering if something like "large red circle" (or "large
> black circle", colored in red) would be a better match...

Unfortunately, the size is constrained by the underlying font.

Initially, I searched for a character like "BLACK RIGHT POINTING 
BACKHAND INDEX" or "LINK SYMBOL", but it was even smaller. I also tried 
to change the font size but it didn't produce a good result either since 
it changes the line height.

So, feel free to change the mark to something more convenient. The 
"large black circle" (\2B24), colored in red seems fine. (I prefer the 
"BLACK LARGE CIRCLE" colored in red over the "LARGE RED CIRCLE" because 
it makes it easier to change the color)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
  2024-04-14 21:56   ` Loïc
@ 2024-04-15  8:45     ` Christian Hesse
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Hesse @ 2024-04-15  8:45 UTC (permalink / raw)
  To: Loïc; +Cc: cgit

[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]

Loïc <lagiraudiere+cgit@free.fr> on Sun, 2024/04/14 23:56:
> Le 10/04/2024 à 15:29, Christian Hesse a écrit :
> > Loïc <lagiraudiere+cgit@free.fr> on Sat, 2024/02/03 18:20:  
> >> Hi all,
> >>
> >> When I create a reference to a precise line in a file (for instance a
> >> hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a
> >> visual feedback, on the line I want to highlight.
> >>
> >> To implement this feature, I suggest to add a curved arrow ahead of the
> >> line number.
> >> That could be done by adding the following stylesheet to cgit.css
> >>
> >>      div#cgit table.blob td.linenumbers a:target:before {color:
> >> red;content: "\2BA9";}  
> > I really like that functionality, though the curved arrow is really
> > inconspicuous. Wondering if something like "large red circle" (or "large
> > black circle", colored in red) would be a better match...  
> 
> Unfortunately, the size is constrained by the underlying font.

Ah sure... Experience may differ depending on font.

> Initially, I searched for a character like "BLACK RIGHT POINTING 
> BACKHAND INDEX" or "LINK SYMBOL", but it was even smaller. I also tried 
> to change the font size but it didn't produce a good result either since 
> it changes the line height.
> 
> So, feel free to change the mark to something more convenient. The 
> "large black circle" (\2B24), colored in red seems fine. (I prefer the 
> "BLACK LARGE CIRCLE" colored in red over the "LARGE RED CIRCLE" because 
> it makes it easier to change the color)

After all Jason has to decide...
Let's hope we will see any activity soon.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-15  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03 17:20 Enhancement request : ui-blob: Make the target line of a link, visually identifiable Loïc
2024-02-03 20:20 ` Christian Hesse
2024-04-10 13:29 ` Christian Hesse
2024-04-14 21:56   ` Loïc
2024-04-15  8:45     ` Christian Hesse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).