Template talk:Taxobox/Archive 2
Eliminating meta-templates
editNetoholic created a new version of this page that didn't use meta-templates. This is, of itself, a good thing. Unfortunately the new version didn't work properly; for pages with subdivision lists, like Percolozoa, it created a duplicate of the list above the table. I don't know enough about the alternate syntax to fix the problem, so for the time being I've done a complete revert. However, it would be better if it could be fixed. Thanks, Josh
This is cause by a flaw in the way the template was inserted into the articles. From Percolozoa, the source shows this:
| subdivision = Acrasidae<br> Gruberellidae<br> Lyromonadidae<br> Vahlkampfiidae It should be: | subdivision = Acrasidae<br>Gruberellidae<br>Lyromonadidae<br>Vahlkampfiidae
Please correct any occurences of this poor formatting, just like this, but meta-templates are a much bigger problem and we need to move away from them agressively. -- Netoholic @ 19:25, 24 December 2005 (UTC)
- follow-up: I ran a bot process and I think all of these occurences are fixed. -- Netoholic @ 20:15, 24 December 2005 (UTC)
- The page states that meta templates should be avoided, but they should not be avoided at any cost, your CSS hack totally breaks layout in browsers that don't support CSS, which we aim to support. —Ævar Arnfjörð Bjarmason 19:52, 24 December 2005 (UTC)
- Read the talk page and look especially for comments from Jamesday. He has asked us to actively remove meta-templates, and Taxobox is the worst offender I've seen. CSS is a reasonable approach which works without straining the servers. As far as CSS support, I have read nothing that we "aim to support" people without it, and every major template relies on CSS. Even still, it won't break for that one guy without CSS, he will simply see all the rows, most empty. -- Netoholic @ 20:00, 24 December 2005 (UTC)
- Your "reasonable" approach inserts a lot of irrelivant garbage into the XHTML output which looks horrid in browsers that don't support CSS, and presumably also screws with screen readers. —Ævar Arnfjörð Bjarmason 20:19, 24 December 2005 (UTC)
- It does look horrible in Lynx and possibly worse in Links. I shudder to think what a screen reader would make of it. But there should be a way to do it without, ahh, conditional templates ;-D At least partially - David Gerard 20:28, 24 December 2005 (UTC)
- I'm sure if there is something more current, but Wikipedia:Browsers says links/lynx is about 0.03% of our readers as of Feb 2004. Every infobox (converted or not) will look bad on them. Oh well. -- Netoholic @ 20:38, 24 December 2005 (UTC)
- I think that's extremly arrogant of you, IMO having the page works properly (i.e. not contain lots of garbage content) and be accessable in all browsers is more important than shaving a few milliseconds off execution time. Accessability *is* important, whether you think people should just use another browser or magically gain eyesight or whatever *annoyed*. —Ævar Arnfjörð Bjarmason 02:51, 25 December 2005 (UTC)
- Agreed. I'm all for reducing server load, but not at the expense of editors or visitors. I'm tempted to revert back to your version based upon the screenshot you provided alone. —Locke Cole 05:58, 26 December 2005 (UTC)
Just one question Netoholic: there apppears to be a small white space right around the picture - any way to get rid of that? Also, don't forget about Template:Taxobox begin. --Khoikhoi 20:21, 24 December 2005 (UTC)
- I changed the table to use em rather than px as a better way to support various local font setting. I can fill the space with the {{{color}} if that's better. -- Netoholic @ 20:38, 24 December 2005 (UTC)
- What about having the image fit so there is no whtie space? --Khoikhoi 20:41, 24 December 2005 (UTC)
- By hard-coding the width in pixels, you restrict what a hard-of-sight person can do. They may run their fonts very large locally, yet the table won't adjust. Using em avoids this. -- Netoholic @ 20:43, 24 December 2005 (UTC)
- What about having the image fit so there is no whtie space? --Khoikhoi 20:41, 24 December 2005 (UTC)
- Ok, it's fine how it is now, then. --Khoikhoi 22:57, 24 December 2005 (UTC)
Netoholic, having the template work properly is more important than having it follow efficiency guidelines. I'm glad you found a work-around for the subdivision problem, but we need a way to split the lists over multiple lines, as some of them are extremely long. I'll try some experiments when I have more time; but ultimately, if meta-templates are the only way to do this, we are going to need meta-templates, plain and simple. Unless we wanted to go back to using Template:Taxobox begin.
In the mean time, I'll leave the new version, but it would be nice if you could try to address Ævar's problems. Also, I'm going to restore Yath's formatting, as the new formatting is plainly disputed above and nobody was consulted before changing it. Josh
- Is there any way to get rid of Yath's formatting? I've been trying for 10 minutes. --Khoikhoi 03:47, 25 December 2005 (UTC)
- Can you explain what you mean? Josh
- Yes, on pages such as Orca there is an extra line in-between the species name and its status. How does one remove that? --Khoikhoi 05:52, 25 December 2005 (UTC)
- I see User:UtherSRG has been trying to do the same thing. Does anyone know how? --Khoikhoi 17:50, 25 December 2005 (UTC)
Remove the < br> in the template. Ucucha (talk) 19:52, 25 December 2005 (UTC)
- Where? The only place I can find < br> is further down. --Khoikhoi 20:58, 25 December 2005 (UTC)
- Yes, I see. The Dutch template did have a < br> ;-). I don't know. Ucucha (talk) 07:27, 26 December 2005 (UTC)
Shouldn't it be a good idea to have a separate template (Template:taxobox2 or so) to test changes before they are changed here? This is a very important template; I think it's better not to fight revert wars on it. Ucucha (talk) 07:27, 26 December 2005 (UTC)
- So wait, no one knows how to remove the line between Name and Status? --Khoikhoi 07:36, 26 December 2005 (UTC)
I tried in taxobox2. Ucucha (talk) 07:44, 26 December 2005 (UTC)
Voalavo antsahabensis Temporal range: Holocene
| |
---|---|
Not extinct
| |
Scientific classification | |
Binomial name | |
Voalavo antsahabensis Goodman et al., 2005
|
- Thank you so much! --Khoikhoi 16:54, 26 December 2005 (UTC)
I am in fact wholly unconvinced that it is important to have this template working perfectly - at least, that it is more important than not crushing the servers under painful load. We got by for quite some time without pretty boxes on our taxonomy articles. Perhaps we need to simply return to that time. Alternatively, if Aevar and others were to join in trying to find a good solution instead of shooting solutions down, that would be helpful. Phil Sandifer 23:38, 26 December 2005 (UTC)
- Maybe you missed it, but WP:AUM stands for Avoid using meta-templates, not Never use meta-templates. There should almost never be a situation where the quality of the encyclopedia suffers because of developer constraints– this is precisely such a situation where WP:AUM likely does not apply because the alternative is demonstratably worse. —Locke Cole 23:58, 26 December 2005 (UTC)
- Exactly. Our goal is to create an encyclopedia, not to make life easier for the BOFHs. Firebug 01:00, 27 December 2005 (UTC)
- And, quite obviously, the solution is to add inherent support for infoboxes (including optional parameters) to the MediaWiki engine, thus avoiding the need for any template hacks. In case you ask why I don't do this myself, it's because my programming skills are in C and assembly, not PHP, and because I don't know how to use a CVS database nor have a server available for testing any modifications to the software. Firebug 01:02, 27 December 2005 (UTC)
It's plainly important to have things work properly. Anybody who changes the taxoboxes without that in mind may as well be vandalizing them, for all the good they're likely to do. That said, the concerns expressed in AUM are worth keeping in mind. I appreciate the work Netoholic has done in letting the taxoboxes confrom to his new version. However, there are three main problems:
- It doesn't work on some browsers;
- It doesn't accept multi-line inputs, which will make lists all but impossible to maintain;
- It messes up some of the formatting.
If anyone has solutions to these, excellent, but I get the impressions none exist. The hidden table sections are simply not as powerful as meta-templates, and we have to decide what to do until we get something that is. These are the three options:
- Keep using the new version, despite its problems;
- Revert to the old version, despite the server strain;
- Revert back to the multi-template system using Template:Taxobox begin, until a better solution emerges.
This is what I think. The meta-template version is definitely the best to use, but if it really consumes signficiant time and money, I don't think we can expect the rest of wikipedia to indulge it. I wouldn't have written it if I though it would be a serious issue. The multi-template system is harder to edit, but at least it works on all computers and didn't require lists stuffed in a single parameter. It's still used on most articles, and I'd suggest we go back to it, until developers add proper infobox support. Thoughts? Josh
- Perhaps a compromise? Use the CSS / hidden table stuff where it works, but put in meta-templates/other solutions just for the things CSS doesn't cover right. Are multi-line inputs required in every section of the taxobox or just a few? Could a change be made for the 'standard.css' (or whichever skin) of users with older browsers to strip out undefined items in CSS-style infoboxes? Et cetera. There are going to be issues with any new implementation. Given that this does have performance issues (though I still have no clear idea of how significant they are) we should see if solutions to these glitches can be worked out. --CBD ☎ ✉ 11:39, 27 December 2005 (UTC)
- That's the problem, the CSS/hidden table stuff doesn't work anywhere. Frankly this WP:AUM crusade Netoholic is on is really bad for the Wiki, far worse than the performance hit IMO. We should wait until there's a viable alternative to templates such as {{if}} and {{qif}} before killing them off (the author of {{qif}} has some code on meta that may help here, but I haven't heard where that's going). —Locke Cole 11:54, 27 December 2005 (UTC)
Hi folks. I've brought this discussion over to WP:AUM (Wikipedia talk:Avoid using meta-templates#Section "Alternatives": Problem with CSS). The problem is that Neto is correct because, sadly for me too WP:AUM stands (It's a real pain in my arse but that does not matter). And WP:AUM is backed by an important developer (Jamesday). I know it myself because I'm also an aficionado of qif (I worked on template:book reference, still hoping that can survive) and I would be very glad if developers could implemement something like that in code. I know it's very sad. I've come myself to the conclusion that we better break lynx for now than being without any conditionals in templates. See also that whole discussion on WP:AUM. (Updated) Adrian Buehlmann 15:00, 27 December 2005 (UTC)
{{Taxobox begin | name = Percolozoa | color = khaki}} {{Taxobox begin placement | color = khaki}} {{Taxobox regnum entry | taxon = [[Protist]]a}} {{Taxobox phylum entry | taxon = '''Percolozoa'''}}<br><small>[[Thomas Cavalier-Smith|Cavalier-Smith]] 1991</small> {{Taxobox classis entry | taxon = '''Heterolobosea'''}}<br><small>Page & Blanton 1985</small> {{Taxobox end placement}} {{Taxobox section subdivision | plural_taxon = Typical families | color = khaki}} Acrasidae<br> Gruberellidae<br> Lyromonadidae<br> Vahlkampfiidae {{Taxobox end}}
It seems a lot of people commenting here are talking about AUM in general, but here we're concerned about taxoboxes in particular. In this case, we can use the old multi-template system, as shown on right. It's comparatively clunky, but it doesn't use meta-templates and works properly on all systems. I think it's the best compromise. Would anyone else who actually uses these things object to reverting to this standard, at least until a real alternative to if templates appears? Josh
- I really prefer the newer format for adding taxoboxes. But perhaps we can use a bot to change all existing new-format taxoboxes to old-format ones periodically? If necessary, I can write such a bot. Eugene van der Pijll 20:01, 27 December 2005 (UTC)
It would be great if you could. In the mean time, important pages like dinosaur and protist have been broken trying to figure out how to compress the subdivision lists. So the current version is creating serious problems, and the meta-template version would need to be rewritten, since the conditionals have been removed. As such, I think we have to go back to the multi-template system, and I'm marking this template as deprecated. Josh
- Mr. Weeble has come up with a way of doing old-style conditionals without meta-templates. Info on it can be found at Template_talk:Infobox_TV_channel. The basic structure is: {{{dummy parameter{{{Variable|}}}|Text and wikimarkup to be printed if Variable exists}}}. If 'Variable' is passed in to the template then the text is printed, otherwise it isn't. This may be adaptable to fix the subdivision problems with the CSS version. --CBD ☎ ✉ 19:03, 31 December 2005 (UTC)
- I went ahead and put in this code for the subdivision section. Seems to work ok. Take a look and let me know what you think. --CBD ☎ ✉ 20:25, 31 December 2005 (UTC)
It looks good to me, and it does indeed handle multi-line inputs. If it still uses CSS, of course, it won't work on all browsers, but that can probably be fixed the same way. Josh
- There are basically four ways of handling text suppression currently;
- Conditional meta-templates: Strongly discouraged under WP:AUM.
- CSS trick: Breaks multi-line text, problems with non-CSS browsers, et cetera.
- WeebleCode: Requires a dummy parameter be set blank in the call or prints {{{Parameter}}} for any parameters not included in call.
- Blank default parameter: Can only be used to suppress unpassed parameters, not header text related to them.
- This template is currently using the last of those, {{{subdivision|}}}, to get around the multi-line problem. It uses CSS for everything else. WeebleCode might be a viable alternative to CSS throughout, but all calls to the template would need to have a '|weeble=' line or somesuch or they'd print any parameters not passed in. The conditional meta-template method is the only one which works in all cases, but it ought to be possible to mix and match the other three to come up with something servicable in most cases. Or we could wait for some hypothetical change to the MediaWiki software. --CBD ☎ ✉ 20:59, 1 January 2006 (UTC)