User talk:Tiddlywinks/Archive 4: Difference between revisions

(4 intermediate revisions by 2 users not shown)
Line 271: Line 271:


Do you mind intervening on [[Cress's Panpour]], please? [[User talk:Pikablu|Pikablu]] refuses to listen to me when I point out that the trivia they added break policy, and they're persistently edit warring to reinstate the trivia. Thanks. [[User:Pumpkinking0192|Pumpkinking0192]] ([[User talk:Pumpkinking0192|talk]]) 01:13, 18 June 2017 (UTC)
Do you mind intervening on [[Cress's Panpour]], please? [[User talk:Pikablu|Pikablu]] refuses to listen to me when I point out that the trivia they added break policy, and they're persistently edit warring to reinstate the trivia. Thanks. [[User:Pumpkinking0192|Pumpkinking0192]] ([[User talk:Pumpkinking0192|talk]]) 01:13, 18 June 2017 (UTC)
== Template questions ==
Hey, I've got a few questions regarding templates:
* Are we expected to avoid images in (high-use?) templates? Is there any (server-related) issues?
* Do you know whether the software evaluates all branches of ifs, and whatever will not display due to "display:none"? Or, in other words, is there a reason to nest ifs of subsets within each other (e.g., <code>if a<100 then ((if a<50 then x) y)</code> rather than <code>if a<50 then x; if a<100 then y</code>)?
* You seemed to be eager to wrap what currently is "display:none" entirely in ifs. I believe wiki syntax does not provide that functionality to wrap entire tables in ifs (expression error for me), but it may be possible with HTML. Is there a particular reason to try that (seeing how Wikipedia [https://en.wikipedia.org/wiki/Wikipedia:Conditional_tables#Plan_C suggests] using "display:none")? (Possibly the above point!?)
Of course, it's related to [[User:Nescientist/Template:MoveInfobox|this]] (in particular, the damage category icons and the contest stats). Thanks in advance! [[User:Nescientist|Nescientist]] ([[User talk:Nescientist|talk]]) 10:46, 24 June 2017 (UTC)
:Abstract issues don't always work well for me... What makes you apprehensive about images?
:Similar to above... I'm going to go with, I don't know, what's your issue?
:Firstly, Wikipedia doesn't exactly "suggest" display:none, it has it as an option (which perhaps notably comes ''after'' wrapping content in #if). I suggest it because display:none very explicitly ''hides'' content. Take a look at [[Special:WhatLinksHere/Cacophony_(Ability)]]: perhaps ''every'' species page links there because that's a default value in the Pokemon infobox, but it's hidden&mdash;it's still ''part of the page'', it's just not ''visible''. This is just, in general, a less than ideal problem (preferably only "valid" links would show up), but more to the point, there's cases where it can very explicitly cover something else you want to find. Suppose there's a parameter that, if set, shows a line with a link to "page", and if it's not set, that's just hidden. Based on the output, you might imagine you could check What links here for "page" to see where the parameter is set, but in truth, it wouldn't be any use to you; and it should be. I couldn't say for what, but I'm fairly sure I ran into just that problem for something in the move infobox. (FWIW as well, instead of very obliquely referring to "You seemed to be eager", being very specific about exactly where you get something like that from can only help. At least, that's true for me. Even if I did&mdash;eventually&mdash;realize what you were talking about here.)
:[[User:Tiddlywinks|Tiddlywinks]] ([[User talk:Tiddlywinks|talk]]) 13:41, 24 June 2017 (UTC)
::It's because very few templates seem to make use of images/icons. For example, [[User:MisterE13/Villain templates|these]] look so much better than the current templates IMO, and also nobody seems to have added the category icons to the move infoboxes although they existed way before the template was designed, and that made me wonder whether that's due to images (in templates) stressing servers or anything. I [[User talk:Nescientist/Template:MoveInfobox|included them]], but if use of images were a reason to reject template proposals, that'd be good to know (in general/"abstract").
::Thanks, I didn't think of "What links here", I just thought of categories, and none were added in that "display:none" parts. But thanks for pointing it out&mdash;{{m|Floral Healing}}, for example, currently links to [[Appeal]], and it really shouldn't. So I shall try to avoid "display:none", even if that involves some HTML workaround I guess. (Correct?)
::Example is the contest data within the move infobox; if a move needs no "Contest Spectacular", it needs neither "Super Contests" nor "Contests" and so on. If the software was smart and only evaluated what it really needs to (much like most "normal" programming languages/parsers), in most cases, it would need to evaluate less parser functions if those were nested, it wouldn't need to query some color templates, etc. So, I shall try to have them nested I guess. (At least I can't see any real drawback, now that I need to wrap entire tables instead of simply using "display:none" anyway.)
::I parsed your intention from [[User talk:Tiddlywinks/Template:MoveInfobox#To do|here]]. [[User:Nescientist|Nescientist]] ([[User talk:Nescientist|talk]]) 15:11, 24 June 2017 (UTC)
:::I don't know if there's ''no'' case where images would be a problem, but I don't know how. In this particular case, if those icons ''would'' be any sort of problem, they'd be very simple to remove, so that certainly wouldn't be grounds to reject everything.
:::You don't need to use HTML&mdash;and shouldn't, really. We're a wiki. We can expect people to know/learn wikicode. HTML can only complicate things. Just stick with wikicode.
:::The only generic argument I could make about nesting would be readability (counting brackets is annoying). There's probably documentation that could tell you. I rarely have the stomach to really digest things as dense as that tends to be, though.
:::[[User:Tiddlywinks|Tiddlywinks]] ([[User talk:Tiddlywinks|talk]]) 15:28, 24 June 2017 (UTC)
::::As I said, I believe the wiki syntax doesn't allow for wrapping entire tables in ifs (specifically, I'm having problems with the opening and closing <nowiki>{| and |}</nowiki>), so I would need to use HTML (<nowiki><table></nowiki>) as a workaround. I'll try to see if I'm mistaken and/or can make it work somehow. I know using HTML it's bad.
::::Exactly, yes. But I think it's minor, especially when I'll try to intend properly. (And I think expansion depth can be a problem, but only if we get like a dozen more contests.)
::::Thanks. [[User:Nescientist|Nescientist]] ([[User talk:Nescientist|talk]]) 15:43, 24 June 2017 (UTC)