Final Fantasy Wiki
No edit summary
mNo edit summary
Line 221: Line 221:
   
 
most welcome. the XI template is still a total mess but this will have to do for now. ugh--[[User:Spira|Arciele Spira]] ([[User talk:Spira|talk]]) 17:45, April 4, 2014 (UTC)
 
most welcome. the XI template is still a total mess but this will have to do for now. ugh--[[User:Spira|Arciele Spira]] ([[User talk:Spira|talk]]) 17:45, April 4, 2014 (UTC)
  +
  +
:Messes happen while editing is taking place. I apologise you weren't told absolutely everything new that had happened here during your absence, but the rest of the templates are shaping up nicely through Techno's work and with some tweaking I'm sure XI's will look just as good after it's been worked on. My warning on the template talk page stands though. '''[[User:Tia-Lewise|<span style="color:#FF69B4">Tia-</span>]][[User talk:Tia-Lewise|<span style="color:#9932CC">Lew</span>]][[Special:Contributions/Tia-Lewise|<span style="color:#4B0082">ise</span>]]'''[[File:Rydia - Young battle.png|15px|link=Special:Editcount/Tia-Lewise]] 19:16, April 4, 2014 (UTC)

Revision as of 19:16, 4 April 2014

FFWiki forum logo
Forums: Index > Rin's Travel Agency > Archive > A meta-template for standardised navboxes



Hey guys;

As you can see here, I've created meta-template - basically a template of a template - to be used in the coding of navboxes. I created this because I feel the navboxes on the wiki are somewhat inadequate and limited, as well as slightly difficult to code. The navbox code I've created is flexible and can be used as the base for any navbox, be it one of the side or one at the bottom of pages. It allows for collaspible sections basically anywhere while still allowing to change colors based on the different game (the only issue I see is transferring some code that allows an easy way for it to recognize the different games, though I think that's certainly plausible with parser functions).

Essentially; an easier to code navbox, just as (if not more) flexible than the ones currently existing, not overly reliant on css and in my opinion easier to use. One key thing I'd like to point out; for instance with Template:FFVI, if I'm on a page for Abilities (like, say, Tools), then naturally I want to navigate to other Abilities articles, like Blitz. However, first I have to open the navbox at the bottom of Tools, and then scroll down to find the abilities, which aren't instantly obvious. With this navbox, the Abilities part would appear shown by default (once the rest of the template is shown), while the rest would be hidden. It just makes more practical sense for navigation, and that's only one thing that it can do. It allows the navboxes to look prettier in general, though they don't have to.

So what does everyone think? Should this be made official?--Technobliterator 22:24, February 25, 2014 (UTC)

LRFFXIII Fang Render
Technobliterator
FFVII Cait Sith Battle

Maybe this would be easier to judge if you actually gave an applicable example use. Like taking an existing page's navs and then re-creating it with the meta-template to show just how it would work. JBed (talk) 15:51, February 28, 2014 (UTC)

Technobliterator
Technobliterator

Ignoring that it looks inferior, to show the actual benefit of the template: Template:Navbox/FFVIalt Basically you can nest it inside a parent navbox.

Techno, create navs for Kefka in the alt-style (FFWiki-style). You can do your standard style too, but changing how navs display content is part of a separate discussion. Then transclude on here how you expect the nav to display on Kefka's page. Then I can make a better judgement on what amendments would need to be made or at least the problem we actually have. JBed (talk) 19:58, March 1, 2014 (UTC)

Technobliterator

I'll work on the JavaScript now. JBed (talk) 21:31, March 1, 2014 (UTC)

Ta-da! JBed (talk) 14:58, March 2, 2014 (UTC)

Technobliterator
Technobliterator
Beatrix-battle
Technobliterator
Technobliterator

Hang on, hang on. Before we make this a thing I would like my mind-settled on a few things.

First there is this:

"It allows for collaspible sections basically anywhere"

How do you think this will benefit people? If we used cookies to remember the state I could see it, but we're not going to do that.

The relevant-section-only-one-not-collapsed isn't in use, right? To clarify my position, I aim in the boat of "I'd prefer all the inner-things uncollapsed".

"Essentially; an easier to code navbox"

There is no evidence to suggest this. In this wiki tables are inevitability and almost everyone will learn the basics of how to use one. The Navs use this same coding so they are easier for people to use. They follow a logical structure that can be easily imagined, and aren't full of random parameter names.

"not overly reliant on css"

I don't know what that means. But that's the beauty of it. Everything is handled in CSS. One of the aims of this template is meant to be something like "change the template and you change them all", but that is demonstrably not true, or at least no more true than it is for the current system. You still have to input the game's class, you still have to input the name of the template.

Well, almost. I'll give you one thing, your template doesn't rely on cellpadding. But that one thing is all but lost when you know it uses dead columns and rows to produce the same result.

If this template truly allowed for a "change the template and you change them all" system it wouldn't rely on context-specific parameter names. There'd be "header#", "group#", and "content#". None of this "A1" "A2" stuff, because once you've done that you've stated the structure of the navbox.

And if this template was to change them all, then how comes we can't change the structure of the navboxes without editing them all? If I can't edit the template to turn this format into this format without having to edit every single navbox then this template simply does not deliver.

The other thing is the Kefka thing. Put navs in a collapsible. But there are few problems here. First: are we even going to use it? I still don't see the mass of navs on Cloud Strife as a problem, or at least not one solved by putting them in another collapsible. Second: CSS can solve the problem in the exact same way. Except with CSS there would be no need for the "nested" parameter to be added. And third: JS can solve it too! Detect how many navboxes are on the page, if more than x (and in mainspace) then wrap them in a navbox. It's not that hard, navboxes always go at the end of the article anyway, I can just create the new element, move the navboxes to that element, then append it at bottom of content.

So my problems:

  1. I don't see benefit in the additional collapsibles.
  2. I don't think it's easier to code.
  3. I don't think it is any better for changing all navs at once.
  4. We can do the nesting functionality without needing to edit a single navbox or article.

Don't get me wrong, there is benefit in meta-templates. If I was tasked to write one I would write mine differently. Not relying on a catch-all just so it can do Translations-style navs in the same template as footer-navs (better off with two). Giving /less/ flexibility in the transclusions (because we want uniformity, not flexibility), but /more/ flexibility in how the design can be changed.

So if we ever decide to change how our navboxes are created in the future, I would call on meta-templates. But not right now, I don't think we're making them easier and I don't think we're gaining anything in terms of a better structure.

Now I would like anyone (anyone!) to convince me that my points are wrong. Tell me the code would be easier to understand and write, tell me that there is benefit in the additional collapsibles, tell me where it could be used to change the appearance of navboxes where the current CSS system can't.

Because I don't see it. It looks like we're just gaining a few functions we're not going to use and be in no better position.

Also if we're going to go over to meta-template it might be wise to let someone write a RegEx script to handle it automatically. Or at least let someone try to write a RegEx script before they give up and let you do it manually.*(that someone would be me. unless someone else can)

/rant JBed (talk) 02:58, March 18, 2014 (UTC)

Technobliterator

You started talking about cellpadding and I got confused. The comment about cellpadding is related to the HTML attribute all tables have. They have a default of 2. And you can't simulate cellpadding in CSS (you can simulate cellpadding 0 which will override the default table amount). That is, unless you do what the meta-template does and add "dead cells", cells that contain no content but are set to a height or width. Which is a concept that I find offensive, probably more than I should.

"but in the hypothetical scenario that we ever had to make new css classes the navbox had to use, or that we wanted to make the borders round, for instance, then the metatemplate can handle it."

Yeah, right. That is my point. It has the same flexibility-in-terms-of-modifying-the-base as the solely CSS-managed system at the moment.

"Except we can. It's a simple task that AWB and/or copypasting could handle with no major flaws."

Right. Same story with the current system. But that's not important:

"There's also no reason why you can't edit the template to change the formats, either."

No, if we use the same meta-template for both the Translations nav and the footer nav you lose any possibility of doing that. You'd have to make further templates specific to both formats that would embed {{Navbox}}.

"As for metatemplating it all, I don't think a RegEx script is even necessary. I can edit everything just fine, it would just take a while."

*raises eyebrow*... and I can write a script in a shorter time and save you the long while it would take. Scripts and bots are never necessary. How can you say all this about AWB but then say that? AWB probably uses RegEx itself, or if the user doesn't see it then the user probably interacts with an interface that itself interacts with RegEx.

"Yes, but is it as simple to do? Is it as easy as writing "|nested"? Because I highly doubt it is. Yes, it's doable, and I can see how it would work, but it doesn't seem as simple."

... Yes. Because it doesn't require editing any pages bar Common.js (and a minor addition to Wikia.js to call it from the preview panel). I could write the script in five minutes.

Your comments about subjectivity... The meta-template is objectively better in only some small ways, while it is objectively worse in some ways that in the grand scheme of things are small. This is why I implored anyone to convince me otherwise. Almost everything is built upon subjectivity. If people are going to be using the system then I'd like to hear those people telling me which code style they prefer, and if anyone does see benefit in additional collapsibles. JBed (talk) 19:47, March 18, 2014 (UTC)

I did a benchmark test that suggests the meta-template takes 0.0265 seconds longer to load (per nav template). (I don't know how temporary these page are: [table+class], [meta-template+class]. I didn't do thorough tests, you could probably get a different result. ParserSpeed puts less than 6 seconds between them (4.174 s v. 10.043 s, so that's 0.06 per template).

Wildly different figures. ParserSpeed sometimes outputs random numbers so it could be put down to that. But I'm not sure how reliable WebPageTest is. JBed (talk) 20:17, March 18, 2014 (UTC)

Technobliterator
ACRudeBox
Technobliterator
Itadaki-Tidus


ACRudeBox


Template:Spira

Technobliterator

most welcome. the XI template is still a total mess but this will have to do for now. ugh--Arciele Spira (talk) 17:45, April 4, 2014 (UTC)

Messes happen while editing is taking place. I apologise you weren't told absolutely everything new that had happened here during your absence, but the rest of the templates are shaping up nicely through Techno's work and with some tweaking I'm sure XI's will look just as good after it's been worked on. My warning on the template talk page stands though. Tia-LewiseRydia - Young battle 19:16, April 4, 2014 (UTC)