Wikipedia talk:HiddenStructure

message: (moved from MediaWiki_talk:Common.css -- Netoholic @ 15:35, 27 January 2006 (UTC)
replies: text: Weeble needs an additional artificial parameter with name "if" that must be defined and empty on each call of a template that uses the weeble trick (written as "|=if"). --Ligulem 10:13, 17 January 2006 (UTC)
replies: text: So what "can't be done" with the 'Weeble' method (which has actually been around for a while... Template:If defined uses it) is to convert many templates to non-meta forms without changing the template calls. That being said... for alot of the more complicated templates the calls are being changed anyway. In such cases I think we should use Weeblecode since it's biggest drawback (having to update each call) is required anyway.Another option would be to decide that a few 'meta' aspects are 'ok'. If we can get rid of all the 'Boolean' and 'If' templates then is it really such a threat to have a few double transclusions that get used on a couple hundred pages? I don't think so and I don't think there will ever be a way to eliminate such. If some basic double transclusions are allowed then the '|if=' calls can be made in the top level templates... causing no change to many template calls. For instance, if Template:Language were changed to call Template:Infobox language, Template:Infobox Conlang, or Template:Infobox Sign language, depending on the type of language, then the calls to 'Language' on various pages could remain unchanged, the '|if=' conditions could be set in 'Language' before calling the sub-templates, and the different language templates could be customized more. This might also reduce load from changes by splitting out into sub-templates. However, it'd be a 'meta' (more accurately 'nested') template. Just barely, as it's only double transclusion, but others of this sort have recently been proclaimed 'anathema'... though many many more have been ignored / left in place. I think this is really the best solution currently available, but is it possible in the face of the 'meta-template jihad'? --CBD ☎ ✉ 12:10, 17 January 2006 (UTC)
replies: text:  That method first of all require 4 templates when 3 will do, just change the articles to call the right template (it's easy).  Your suggestion also breaks the intended purpose of Whatlinkshere.  What is so damn hard about manually keeping these three templates looking alike?  By splitting the templates, we can remove A LOT of the extraneous optional parameters, which cleans up the HTML source. -- Netoholic @ 20:42, 17 January 2006 (UTC)

text: I personally have nothing against weeble as we have now very strong opposition against CSS which only leaves the "remove calls" option on my beloved template book reference. BTW, does anyone of the experts know what google does for example with Died as can now be found in the html source of GWB  (see also below)? --Ligulem 12:25, 17 January 2006 (UTC)
replies: text: Why do book references need templates?  They're not going to change.  It seems to me unnecessary to use ugly (and they are ugly) methods when you can use simple, clean ones.  You can insert the reference in plain text.  Difficult?  I don't think so.  Sam Korn 20:48, 17 January 2006 (UTC)
replies: text: You are welcome to express your opinion on template talk:book reference. I have asked there how to proceed with that template. --Ligulem 21:40, 17 January 2006 (UTC)
thread_title:  Why Not Weeble? 

message: I have reservations about this page advocating this method without making it clear that it is undesirable, and should only be used where absolutely necessary, and only be considered an interim measure.  It is difficult to understand the implications of this technique without a solid understanding of wikitext, template programming, HTML, CSS and accessibility issues, and this knowledge could easily be misunderstood and misused to the detriment of Wikipedia.
I have already received comments from another editor who was under the impression that I was advocating accommodating an insignificant minority of "crippled" users while "crippling" Wikipedia for the majority; see  user talk:Mzajac#CSS and visually impaired.  —Michael Z. 2006-01-27 18:30 Z
:I started this page (under my user space and moved it to Wikipedia name space where Netoholic moved it to "HiddenStructure") just to document what is actually happening. This trick is simply spreading very fast (see :Category:Infobox templates) and despite my disliking of it I think it is good to have a decent documentation of it. So all involved parties should know what they are doing. Since the vaporization of WP:AUM there is not much motivation left to use that CSS hack (for me I see none). I would propose to use qif until we have conditionals in MediaWiki. qif produces decent html. --Ligulem 18:40, 27 January 2006 (UTC)
thread_title:  Advocacy 

message: I quick and dirty benchmark, using html tidy:
[0:0][azatoth@azabox tmp]$ time ./tidytest.sh test.html
real    0m10.612s
user    0m5.611s
sys     0m4.654s
[0:1][azatoth@azabox tmp]$ time ./tidytest.sh test2.html
real    0m10.224s
user    0m5.405s
sys     0m4.489s
[0:0][azatoth@azabox tmp]$ time ./tidytest.sh test2.html
real    0m10.250s
user    0m5.245s
sys     0m4.673s
[0:0][azatoth@azabox tmp]$ time ./tidytest.sh test.html
real    0m10.940s
user    0m5.619s
sys     0m4.712s
[0:1][azatoth@azabox tmp]$ cat tidytest.sh
#!/bin/bash
for i in {0..10000}; do tidy -config tidy.conf $1 2>&- 1>&-; done
[0:0][azatoth@azabox tmp]$ cat test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Tidy test</title>
</head>
<body>
  
    hello
  
</body>
</html>
[0:0][azatoth@azabox tmp]$ cat test2.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Tidy test</title>
</head>
<body>
  
    hello
  
</body>
</html>
[0:0][azatoth@azabox tmp]$ cat tidy.conf
drop-proprietary-attributes: true
quiet: true
→AzaToth 19:40, 28 January 2006 (UTC)
replies: text: Can guarantee that extra database calls to read even a single nested meta-template (Qif) results in a greater delay... by magnitudes.  Perhaps you should start going after people who use  vs  first? -- Netoholic @ 00:44, 29 January 2006 (UTC)
replies: text: I think Netoholic is correct here. I do not believe that tidy is any significant performance problem. It is called anyway and should run quite fast. The server load which qif does is a drawback and that's why we should have conditionals in MediaWiki. But I do not think that this server load of qif merits breaking accessibility of Wikipedia pages or the extinction of qif at any cost. A decent update mechanism for high use templates in MediaWiki would also be a great help so that editing a high use template no longer locks the database in the order of seconds. We simply do not need a light speed push up mechanism for high use templates. But even that does not merit the extinction of qif at any cost. At least not until we have conditionals in MediaWiki, which would eliminate all the forementioned drawbacks of qif. --Ligulem 09:44, 29 January 2006 (UTC)
thread_title:  benchmark 

message: Brion about Tidy: . In reply to . --Ligulem 10:44, 11 February 2006 (UTC)
replies: text: The hiddenStructure hack has nothing to do with tidy. I can't believe you're benchmarking tidy performance without even bothering to check that assumption. -- Tim Starling 02:58, 12 February 2006 (UTC)

text: I'm not able to find where I was told that Tidy handled that.  Maybe it did and is no longer the case?  -- Netoholic @ 04:58, 16 February 2006 (UTC)
thread_title:  Tidy on Wikitech-l 

message: The current Mfd / status actions might need some
new facts, I've seen a link to this page on Meta.
There are also some links here:
*
Omniplex  05:52, 17 March 2006 (UTC)
thread_title:  Links 

message: I believe it would be appropriate to tag this page as historical or rejected per the ongoing MFD. If nothing else though, we could customize  to state that the instructions are deprecated (and, possibly, direct people to WP:QIF). Thoughts? —Locke Cole • t • c 10:43, 19 March 2006 (UTC)
replies: text: Folks will (ab)use this CSS feature, for a tricky case see , where I got rid of it.  The article is IMHO quite clear why using this trick is an utter dubious idea, especially if it relies on the construction of class names that shouldn't exist. I'd draw the line at invalid XHTML, or any "must not exist" names. A pointer to  is okay, but this alternative isn't much better, it's only on a different layer. Some of these templates are really esoteric. How about developping this article into a guideline about avoiding display: none tricks? Omniplex 13:04, 19 March 2006 (UTC)
replies: text:  The hiddenStructure class is in the monobook skin by default, which is how it was found.  Disagree with the focus change.  -- Netoholic @ 08:18, 20 March 2006 (UTC)
thread_title: Deprecation

message: Here's the complete old content of the talk page (now redirected):
:"Use Weeble code (such as )." — What is Weeble code? Ardric47 07:11, 24 April 2006 (UTC)
replies: text: The ifu (if undefined) in Help:Array, I think. -- Omniplex 07:14, 1 May 2006 (UTC)
thread_title:  Merged 

message: That example used in the "See also" section was redirected to  by a Tfd, because it was at this time redundant. That's no longer the case, the latter template doesn't use #if: anymore. Therefore I've posted it on deletion review. -- Omniplex 20:36, 2 May 2006 (UTC)
replies: text: There's a straw poll at Template:Infobox seeing if people think conditionals should be included there or not (I think they should; there's little reason in spreading this stuff out). Though if that fails, then yes, Template:Infobox Conditionals should probably be brought back. —Locke Cole • t • c 22:40, 2 May 2006 (UTC)
replies: text: Probably we also need a WP:HIDE example, the "see also" links were meant to compare these techniques. An older version of Template:Infobox (the last using hiddenStructure) could do the trick. In theory m:Help:Array offers a comparison, but that's a simple DOW example, no infobox. The other template could be called "Infobox hideous" or similar. -- Omniplex 06:51, 3 May 2006 (UTC)
replies: text: Uhm... no. Why on Earth would we educate people on using WP:HIDE when it's so fundamentally flawed (except for a few rare situations)? —Locke Cole • t • c 11:00, 3 May 2006 (UTC)
replies: text: It will probaby take some time until we get rid of it everywhere, yesterday I killed another bunch of links in a horrible m:Help:Cascading style sheets page derived from m:Help:User style, and I fear the latter is still in circulation, maybe even here. Checking: yes, sigh. See the edit history of m:Help:Cascading style sheets for some non-encyclopedic comments. -- Omniplex 21:24, 4 May 2006 (UTC)
replies: text: Agreed that it'll take time to remove this from service (yet another example of why it never should have entered service to begin with...). Nice hatchet job on m:Help:Cascading style sheets, BTW. =) —Locke Cole • t • c 21:44, 4 May 2006 (UTC)
thread_title:  [[Template:Infobox Conditionals]] 

message: Since HiddenStructure is controversial and shouldn't be used, I added a form of the "rejected" tag, explaining why it shouldn't be used.  Please correct any factual errors I may have made, revert if necessary, etc.  Ral315 (talk) 01:25, 27 June 2006 (UTC)
replies: text: I've replaced "errors in browsers" by "browsers", not supporting CSS is no error, it's the essence of CSS to be optional, pages not working without CSS are erroneous. Of course there are also infamous browsers like Netscape 4.x, where the CSS is too broken to use it, so the best solution is to disable this wannabe-CSS. That was in one of the last episodes of the browser wars, Netscape had JSS based on JS, otherwise similar to CSS, and Lynx had some obscure LSS. Irrelevant today. -- Omniplex 11:03, 6 July 2006 (UTC)
thread_title:  Rejected-like tag.