Make category links arrow link to actual categories

I believe having arrows linked to the actual pages can
be much more useful than linking to '#' of the same
page. Linking to the correct page makes user to notice
if the page is already visited also using color of
the arrow.

If we didn't like link visited logic to be not used we
could've used a different link rather than color of links
and going makes us able to :visited logic of
If8b2b45b24351ee5c8fc9ee1380563f5d5b88678 also.

Personally however I'm in believe that having a useful
link that can be opened on a different tab using
Ctrl (or long click on phones) is always more useful.

Change-Id: Ib56fad0b711853d67b2d55617b36deff56141c74
This commit is contained in:
Ebrahim Byagowi 2024-10-05 00:33:58 +03:30
parent b1e3b5f06d
commit fcc3334125
2 changed files with 1 additions and 1 deletions

View file

@ -372,6 +372,7 @@ class CategoryTree {
// href and role will be added client-side // href and role will be added client-side
'class' => 'CategoryTreeToggle', 'class' => 'CategoryTreeToggle',
'data-ct-title' => $key, 'data-ct-title' => $key,
'href' => $title->getLocalURL(),
]; ];
if ( $children === 0 ) { if ( $children === 0 ) {

View file

@ -90,7 +90,6 @@
$content.find( '.CategoryTreeToggle' ) $content.find( '.CategoryTreeToggle' )
.on( 'click', handleNode ) .on( 'click', handleNode )
.attr( { .attr( {
href: '#',
role: 'button', role: 'button',
title: function () { title: function () {
return mw.msg( return mw.msg(