Last modified: 2014-09-23 19:49:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35863, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33863 - "[x]" (CategoryTreeEmptyBullet) should not be displayed when JavaScript is not loaded
"[x]" (CategoryTreeEmptyBullet) should not be displayed when JavaScript is no...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CategoryTree (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-21 15:24 UTC by vlakoff
Modified: 2014-09-23 19:49 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch proposal (722 bytes, application/octet-stream)
2012-01-21 15:24 UTC, vlakoff
Details
patch proposal v2 (788 bytes, patch)
2012-01-21 19:00 UTC, vlakoff
Details

Description vlakoff 2012-01-21 15:24:12 UTC
Created attachment 9881 [details]
patch proposal

When JavaScript is disabled, or when the script isn't loaded yet, "[+]" (CategoryTreeBullet) are hidden (inline CSS display:none), but "[x]" (CategoryTreeEmptyBullet) are visible. For consistency, the later shouldn't be displayed too.
Comment 1 vlakoff 2012-01-21 19:00:46 UTC
Created attachment 9882 [details]
patch proposal v2

Faster JavaScript in browsers that implement querySelectorAll()
Comment 2 Krinkle 2012-01-21 19:04:21 UTC
I suggest this is fixed by not outputting it from PHP at all (instead of a display:none placeholder).

Inject the element from JavaScript and use an event listener for the activity.
Comment 3 vlakoff 2012-01-21 19:29:00 UTC
I don't think it is worth it. The selection of the switch, [+] or [x], to use for each item is accomplished by the PHP; trying to do it with the JS would be harder and less reliable. Also, the JS would be slower (lots of DOM insertions).
Comment 4 Sumana Harihareswara 2012-02-10 20:42:39 UTC
vlakoff, thanks for your response.

Sorry for the wait; there's been a bit of a delay in the review of patches here -- as we prepare to get a new version out, we're in a "code slush" during which we concentrate on reviewing code that has already been committed to our source code repository (see http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/57950 for more details).

Krinkle's also been a bit busy with other commitments.  I presume that at some point he'll come back and respond to your reply.  But if, in the meantime, you'd like to straighten this issue out and get another opinion on how to proceed, come into our IRC chatroom, #mediawiki on Freenode IRC, and ask about this.  Thanks for the patch!
Comment 5 Krinkle 2012-03-05 06:12:40 UTC
A simple .client-nojs or .client-js style rule also works from the css file.
That saves outputting a bunch of inline style rules.
Comment 6 Sumana Harihareswara 2012-03-22 19:53:12 UTC
vlakoff, have you had time to consider Krinkle's comment?

Also, if you haven't already, please get a Gerrit account

https://www.mediawiki.org/wiki/Project:Labsconsole_accounts

and submit your change as a merge request into Git.  This'll make review a bit faster and help you in the future, as you can just put your patches into the same development workflow as all the other MediaWiki code.

https://www.mediawiki.org/wiki/Git/Workflow

Thanks!
Comment 7 Andre Klapper 2012-11-05 14:48:54 UTC
vlakoff, have you had time to consider Krinkle's comment?

Also, if you haven't already, please get a Gerrit account

https://www.mediawiki.org/wiki/Project:Labsconsole_accounts

and submit your change as a merge request into Git.  This'll make review a bit
faster and help you in the future, as you can just put your patches into the
same development workflow as all the other MediaWiki code.

https://www.mediawiki.org/wiki/Git/Workflow

Thanks!
Comment 8 This, that and the other (TTO) 2013-09-23 11:55:31 UTC
Clearing patch keyword, I'll take this trivial bug.
Comment 9 This, that and the other (TTO) 2013-09-26 11:00:46 UTC
I wrote a Git patch, but the more I think about it, the more this seems unnecessary. At the moment, this is the only useful thing CategoryTree gives to non-JS users, so I don't see why we need to take it away. 

I daresay as well that non-JS users will be used to inconsistency, and may even be able to make good use of it in this case (i.e. to quickly see which categories have no subcats).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links