Last modified: 2014-09-24 00:05:47 UTC
Sometimes you want to see hidden categories of the article you're reading just for a moment. You don't want to navigate away to the preferences to change the hidden category setting then navigate back to the page you were reading. This especially happens for people that mostly just read but sometimes edit. Since the hidden categories are there just hidden by CSS it would be trivial to add a checkbox in JavaScript to toggle between display:none and display:block
I, too, would welcome our new hidden-category overlords. Andrew, maybe this would fit in with the category editing widget you were experimenting with?
(In reply to comment #1) > I, too, would welcome our new hidden-category overlords. > > Andrew, maybe this would fit in with the category editing widget you were > experimenting with? Possibly, although it'd be just as easy to add this separately.
Created attachment 10337 [details] It makes a link in the bottom of the page for the hidden category links Two changes have been made to achieve this effect : 1. Skin.php if ( isset( $allCats['hidden'] ) ) { .... ..... $s.='<a id="mw-toggle-cat" href="javascript:void(0)"><i>Show hidden categories</i></a>'; .... .... } This statement adds an anchor element just below the div(#mw-normal-catlinks) 2. Mediawiki.page.ready.js .... ... var toggleCatBool = true; $("#mw-toggle-cat").click(function(event){ $("#mw-hidden-catlinks").toggle(); var text=''; if(toggleCatBool) text='Hide Hidden Category Links'; else text='Show Hidden Category Links'; document.getElementById("mw-toggle-cat").innerHTML='<i>'+text+'</i>'; toggleCatBool=!toggleCatBool; }); .... .... This manages the toggling behavior of div(#mw-hidden-catlinks)
Akshay, please go ahead and submit this as a branch in Git. https://www.mediawiki.org/wiki/Git/Workflow That way it can get reviewed faster. Thanks.
> Akshay, please go ahead and submit this as a branch in Git. This patch would require a complete rewrite, no point in pushing it at the moment. * Unlocalised text. * Weird <a id="mw-toggle-cat" href="javascript:void(0)"><i>Show hidden categories</i></a> that will not work with JS disabled. Instead, JS should generate such links completely. * Mix of jQuery and raw JS. * Code style. * Messages must use sentence case.
Marking patch reviewed. Akshay, are you interested in rewriting to address Max's criticisms?
(In reply to comment #6) > Marking patch reviewed. Akshay, are you interested in rewriting to address > Max's criticisms? Okay , I would address the issues pointed out by Max and submit a new patch.
For the reference: https://www.mediawiki.org/wiki/Manual:Coding_conventions
(In reply to comment #5) > > Akshay, please go ahead and submit this as a branch in Git. > This patch would require a complete rewrite, no point in pushing it at the > moment. > > * Unlocalised text. > * Weird <a id="mw-toggle-cat" href="javascript:void(0)"><i>Show hidden > categories</i></a> that will not work with JS disabled. Instead, JS should > generate such links completely. > * Mix of jQuery and raw JS. > * Code style. > * Messages must use sentence case. I have committed the changes to gerrit. changeset link - https://gerrit.wikimedia.org/r/3981 It takes care of all the issues you pointed out earlier.
I have abandoned change 3981 for now so it does not clutter people dashboards. IF there is really an interest in such a feature and someone willing to continue this change, feel free to reopen it.