Forum:Portable Infoboxes

From Yugipedia
Revision as of 10:17, 4 January 2016 by FishTank (talk) (Discussion)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


We’re reaching out to a few of our top communities, hoping to get you on board with the migration to the new infobox markup. And we have tools to help!

Why we’re doing this

Simply put: Most current infobox structure translates very poorly to mobile experiences, and indeed any device that doesn’t use desktop-style displays. On desktops and laptops, they often look amazing. The problem is that Wikia’s traffic is trending mobile.

There is an important graph from our forum post about infoboxes a couple weeks back, and I want to share it here as well:

Wikia mobile traffic growth.jpg

Mobile is the future. Not just for Wikia, but for the web as a whole. Take a look at the recent trends and future growth predictions for mobile traffic - it's staggering.

We partnered with the Wikia community to create this new markup to make sure that your hard work can be displayed on mobile devices (as well as any future technologies) easily and without any new coding conventions. It’ll take some effort up front, to be sure, but we’re here to help, and the work you put in now will pay for itself tenfold in the future.

Tools we’ve designed to ease the process

We’ve enabled two new features on your community. One is a tool for migrating the “old” infobox code to the new markup. It identifies templates on your wikia that look like infobox templates and places a box on the right rail of the template page. When you click the “Generate draft markup” button in this box, it opens a new tab containing a draft of your infobox using the new markup.

The second is a new feature on Special:Insights that will highlight which infoboxes on your wikia have not been migrated to the new infobox markup. It’s fairly intuitive - you can click on the infobox title link itself to see the old markup, or simply click the “Convert!” button on the right, which performs the same action as the “Generate draft markup” button.

This is our help page for the new markup. I’ll help get things rolling by converting a template or two as an example if you want as well as watching this forum post for any questions. --DaNASCAT<staff /> (help forum | blog) 21:20, July 21, 2015 (UTC)

Discussion[edit]

Hey Tim, thanks for posting this and helping us out! We currently use Wikipedia's {{Infobox}} metatemplate for our newer infoboxes (though there's a lot of old stuff that hasn't been converted yet), so right now my main question is how difficult it would be to develop a drop-in replacement (there's a lot of functionality we don't actually use in there, too, and nothing would be lost by not translating it to the Portable Infoboxes system). If this was done right, we could then just update {{Infobox}} itself and immediately get the benefits across the dozen or so infobox templates using it (with, hopefully, only minimal tweaks required of them). ディノ千?!? · ☎ Dinoguy1000 23:23, July 21, 2015 (UTC)

It shouldn't be overly difficult. I literally just created a draft here. There are probably two things we'll have to do which is make sure image styling is done correctly (that's probably the biggest thing we're trying to improve about the infobox conversion tool) and then figure out what classes should be included and where to do inline CSS using the <format> tags. I'd encourage you all to play around with the Draft tonight just to get a feel for syntax and how to improve it. I'm going to carve out an hour of my schedule tomorrow and I can do some dedicated work on that draft too. --DaNASCAT<staff /> (help forum | blog) 23:35, July 21, 2015 (UTC)
Cool, I'm looking forward to seeing what you do tomorrow. =) In the meantime, I've played around enough to get the headern, labeln, and datan parameters displaying as they should, though I'm worried about whether it's possible to properly emulate their original behavior: headern and labeln/datan are mutually exclusive, with headern overriding labeln/datan, and when headern isn't used, labeln can be omitted to have datan use the full row (see {{Infobox/row}} for the actual code there, which also shows how classn and rowclassn are used).
Another thing I noticed is that subst: doesn't work in at least some parts of the markup (I didn't systematically test it, but I know it doesn't work in the <label/> tags). This is something most editors will probably never notice, but I definitely did myself when I was merging the labeln and datan lines, and to a lesser extent when I was converting the headern lines to use <header/> tags.
One last thing, the help page should show that parameter syntax ({{{param}}}) can be used with <header/>, since it currently gives the impression that markup doesn't work in that tag at all. ディノ千?!? · ☎ Dinoguy1000 00:57, July 22, 2015 (UTC)
Also, it appears that implementing child infobox functionality is going to be impossible without developing a Lua module (which I'd like to do anyways if for no other reason than to be able to abstract away the data rows, but I don't have a good enough grasp of Lua yet to do so), which is a problem since we definitely use that functionality. ディノ千?!? · ☎ Dinoguy1000 03:12, July 22, 2015 (UTC)
Before you start implementing anything here, I realize it may be a different format; but there are some problems with the new infoboxes over on Rangerwiki http://powerrangers.wikia.com/wiki/Thread:89147. You might want to consider further beta testing and fine tuning before implementing these changes community wide. That said, it's highly arguable that Mobile's the future. I see it as a fad because people check on mobile more than they edit, but you guys do what you gotta. --Rocket.knight.777 (talkcontribs) 03:34, July 22, 2015 (UTC)
Ignoring your comments related to mobile views (since they have already been extensively rebutted elsewhere, and are even more extensively refuted by the above image), let me be the first to assure you that nothing is being rushed into here. Any conversions to this new system will be done first on /Draft subpages that are not live, and will not be copied to the live templates until they satisfactorily work and support current uses. The complaints on the Power Rangers wiki are ones I'm already aware of: fine-grained control over the styling of infoboxes, via both inline styles and custom classes, is vital for several of our current infoboxes, so nothing will be getting changed until satisfactory support for such custom style is present or satisfactory alternatives are developed. And in the absence of any further information, I would assume the premature replacement of the infoboxes on the Power Rangers wiki came down to an overeager staffer and nothing more; while I'm sure Tim is just as eager to get things moving here, I can't see him proceeding with such replacements here without first being sure there are no legitimate, substantial objections. ディノ千?!? · ☎ Dinoguy1000 07:39, July 22, 2015 (UTC)
Just wanted to make sure there wasn't trouble on two fronts. As for the above image, it doesn't show how much of that traffic is just viewing, and how much is actual editing; and rebuttal aside, I'm still entitled to my own opinions. --Rocket.knight.777 (talkcontribs) 14:21, July 22, 2015 (UTC)
The ratio of views to edits is irrelevant: all editors are by definition also viewers, and all improvements to the mobile experience are targeted at viewers, short those that are explicitly editing-related improvements. Therefore all mobile traffic benefits from improvements, not just some subset representing specifically viewers (which as I pointed out isn't distinguishable from the set of all mobile traffic) or specifically editors. This is how it should be, as well, since on any wiki with a healthy flow of traffic, views are going to completely dwarf edits - the ratio on this wiki, for example, is often better than 1000 views per edit. ディノ千?!? · ☎ Dinoguy1000 15:27, July 22, 2015 (UTC)
Look, all other things aside, I just want to make sure that the Main Wiki staffers make sure that Mobile compatible still means desktop compatible. --Rocket.knight.777 (talkcontribs) 02:17, July 23, 2015 (UTC)
The new infoboxes won't do anything to disrupt the experience on a traditional computer, we can still edit and do things like we always have, but the infoboxes do make things easier on mobile viewers and editors. --Dark Ace SP (TalkPage) 15:18, July 23, 2015 (UTC)
Hey, so I've started off with the Album Infobox, something simple. I would see what you think of the look - It's pretty easy to add some extra styling with .portable-infobox class - before we look at some of the more complex templates. --DaNASCAT<staff /> (help forum | blog) 00:10, July 28, 2015 (UTC)
To be perfectly honest, styling has never been my forte; while I can fudge up passable styles with some trial and error, I usually leave any actual skinning to more competent people (for example, most of the CSS used by the new card table templates is Deltaneos' work, with the majority of my contributions to it consisting of tweaks, fixes, and minor extensions/additions). =)
My concern so far hasn't been customizing styles in a general, site-CSS-file-level sense, but rather specifically via a mechanism akin to the various style parameters present in {{Infobox}}. I also still would prefer to get Infobox itself converted to the new format (if it can be), since I have no interest in wrangling with the markup directly on each infobox template. If it's necessary to achieve the functionality we want here, I would be willing to look at implementing something at the level of the underlying markup, assuming that markup is now relatively stable and the necessary tags/attributes have been whitelisted for use on Wikia; I don't think it should be that much work to adapt Wikipedia's Module:Infobox for this purpose, especially since I would have switched us over to it sooner or later regardless (though I'm not yet very familiar with Lua, so famous last words, etc. etc.). If this can be successfully done, it'll mean we don't have to worry about converting any individual infobox template - the ones that currently use Infobox would automatically get switched to the new system, and the ones that don't could be switched to the new system just by converting them to use Infobox (which would have happened eventually regardless). ディノ千?!? · ☎ Dinoguy1000 04:52, July 29, 2015 (UTC)
I totally see your point on Infobox itself. I always like doing a simple template on a wikia and then getting more complicated. Re: Lua, we don't have support for that in portable infoboxes at this moment and honestly I'm not sure how much those two platforms will merge. At this time, we feel as though the portability goal is far more important to keeping and attracting readers and contributors to Wikia than slight upticks in the performance speed that Lua brings. I will go ahead and merge that template I did in and start to dissect Infobox later this week. --DaNASCAT<staff /> (help forum | blog) 22:15, July 29, 2015 (UTC)
While it's definitely a plus, I'm not looking at Lua because of the performance improvements associated with it, but rather because it's far more flexible (and easier to read and write) than the wikimarkup and parser functions that templates are built with. But this does have me thinking: what does PI mean for the slightly older but also Wikia-developed and -pushed InfoboxBuilder system? Will the two perhaps eventually be merged, or has this even been considered yet? (While I ask, I can't actually offer any thoughts on it since I never got around to trying InfoboxBuilder myself.)
As to Infobox, keep in mind that I've already started work on a PI port of it at Template:Infobox/Draft (I've noted a few things that need some work/thought in its history, too); I think this showcases another reason I'd like to get something going with Lua: replacing the need to hardcode each of 80 sets of parameters (and thus both massively duplicating code, and forcing an artificial limit on the number of rows) with a single routine that can produce any number of rows as needed. A Lua module would also allow support to be added for the groups PI features (though there would still be questions of syntax for actually using them). ディノ千?!? · ☎ Dinoguy1000 22:54, July 29, 2015 (UTC)

As a heads up, these are issues that I'm currently looking into. Please bear with me as I get up to speed. At present, Cardtable is not something I'm concerned with. Thanks! FishTank <staff /> (wall) 10:17, January 4, 2016 (UTC)