Remove page href from arrows

As having href causes arrows to be clickable before JavaScript
handler be loaded.

And since that disables visited logic, let's remove it.

Change-Id: Ice4c979d020342890fffd587bb5bee88fcc2a1ae
This commit is contained in:
Ebrahim Byagowi 2024-11-05 11:46:16 +03:30
parent cbde447eaf
commit 77b047b12b
3 changed files with 2 additions and 7 deletions

View file

@ -354,7 +354,6 @@ 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

@ -83,10 +83,6 @@
.CategoryTreeToggle { .CategoryTreeToggle {
transition: transform 250ms ease; transition: transform 250ms ease;
.expandable-arrow( @color-progressive ); .expandable-arrow( @color-progressive );
&:visited {
.expandable-arrow( @color-visited );
}
} }
.CategoryTreeEmptyBullet, .CategoryTreeEmptyBullet,

View file

@ -117,11 +117,11 @@ Tag with CategoryTree root and two subcategories
!! wikitext !! wikitext
<categorytree>CategoryTree root</categorytree> <categorytree>CategoryTree root</categorytree>
!! html/php !! html/php
<div class="CategoryTreeTag" data-ct-options="{&quot;mode&quot;:0,&quot;hideprefix&quot;:20,&quot;showcount&quot;:false,&quot;namespaces&quot;:false,&quot;notranslations&quot;:false}"><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeBullet"><a class="CategoryTreeToggle" data-ct-title="CategoryTree_root" href="/wiki/Category:CategoryTree_root" data-ct-loaded="1" aria-expanded="true"></a> </span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_root" title="Category:CategoryTree root">CategoryTree root</a></bdi></div><div class="CategoryTreeChildren"><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_1" title="Category:CategoryTree 1">CategoryTree 1</a></bdi></div><div class="CategoryTreeChildren" style="display:none"></div></div><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_2" title="Category:CategoryTree 2">CategoryTree 2</a></bdi></div><div class="CategoryTreeChildren" style="display:none"></div></div></div></div></div> <div class="CategoryTreeTag" data-ct-options="{&quot;mode&quot;:0,&quot;hideprefix&quot;:20,&quot;showcount&quot;:false,&quot;namespaces&quot;:false,&quot;notranslations&quot;:false}"><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeBullet"><a class="CategoryTreeToggle" data-ct-title="CategoryTree_root" data-ct-loaded="1" aria-expanded="true"></a> </span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_root" title="Category:CategoryTree root">CategoryTree root</a></bdi></div><div class="CategoryTreeChildren"><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_1" title="Category:CategoryTree 1">CategoryTree 1</a></bdi></div><div class="CategoryTreeChildren" style="display:none"></div></div><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_2" title="Category:CategoryTree 2">CategoryTree 2</a></bdi></div><div class="CategoryTreeChildren" style="display:none"></div></div></div></div></div>
!! html/parsoid !! html/parsoid
<div class="CategoryTreeTag" data-ct-options='{"mode":0,"hideprefix":20,"showcount":false,"namespaces":false,"notranslations":false}' typeof="mw:Extension/categorytree" data-mw='{"name":"categorytree","attrs":{},"body":{"extsrc":"CategoryTree root"}}'> <div class="CategoryTreeTag" data-ct-options='{"mode":0,"hideprefix":20,"showcount":false,"namespaces":false,"notranslations":false}' typeof="mw:Extension/categorytree" data-mw='{"name":"categorytree","attrs":{},"body":{"extsrc":"CategoryTree root"}}'>
<div class="CategoryTreeSection"> <div class="CategoryTreeSection">
<div class="CategoryTreeItem"><span class="CategoryTreeBullet"><a class="CategoryTreeToggle" data-ct-title="CategoryTree_root" href="/wiki/Category:CategoryTree_root" data-ct-loaded="1" aria-expanded="true"></a> </span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_root" title="Category:CategoryTree root">CategoryTree root</a></bdi></div> <div class="CategoryTreeItem"><span class="CategoryTreeBullet"><a class="CategoryTreeToggle" data-ct-title="CategoryTree_root" data-ct-loaded="1" aria-expanded="true"></a> </span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_root" title="Category:CategoryTree root">CategoryTree root</a></bdi></div>
<div class="CategoryTreeChildren"> <div class="CategoryTreeChildren">
<div class="CategoryTreeSection"> <div class="CategoryTreeSection">
<div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_1" title="Category:CategoryTree 1">CategoryTree 1</a></bdi></div> <div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet"></span> <bdi dir="ltr"><a href="/wiki/Category:CategoryTree_1" title="Category:CategoryTree 1">CategoryTree 1</a></bdi></div>