Forum:Add newlines to infobox page source

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Add newlines to infobox page source
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 13 March 2021 by IsobelJ.

Right now, page source for infoboxes is pretty hard to read when a page has a lot of versions. The typical code style is to put all the versions for a single parameter on the same line, and put a newline between each different parameter. This is usually fine when there's only 1 or 2 versions, but once the lines start wrapping it becomes difficult to maintain.

I propose we put a newline between every version and every parameter in the infobox. For an example, see the page source of Goblin vs. the page source on osrsw:Goblin. This proposal will not affect the way the infobox looks on the actual article, just the source.

Small example before:

{{Infobox Monster
|version1 = Level 2|version2 = Level 3
|name = Man
|image1 = [[File:Man 1.png]]|image2 = [[File:Man 2.png]]
}}

Small example after:

{{Infobox Monster
|version1 = Level 2
|version2 = Level 3
|name = Man
|image1 = [[File:Man 1.png]]
|image2 = [[File:Man 2.png]]
}}

For more examples, see any page on OSW with a switch infobox.

Discussion

Support - as nominator. Riblet15 (talk) 08:54, 28 February 2021 (UTC)

Support - I've been doing it like this and it's cleaner. Habblet (talk|c) 14:55, 28 February 2021 (UTC)

Support - I know I don't edit here much, but this is something that I would argue is better for newer editors. Having a single param per line is easier on the eyes, and I know that helped me get comfortable editing various infoboxes. I'd further argue that the advantages outweigh the one downfall of having to scroll farther perhaps for a certain param. -Legaia2Pla · ʟ · 17:04, 28 February 2021 (UTC)

Support - I've been using my bot to add spaces before and after the =. I'd have done this too if I knew how. Helps clarity on editing. Meeeeerds msg 17:09, 28 February 2021 (UTC)

Support - Cleaner and more user friendly particularly for less experienced editors. If we can bot it, all the better. That Goblin example is just ugly. Smithing.pngAescopalus talkCrafting.png 17:11, 28 February 2021 (UTC)

Support - It might make the source text a little longer but I'd argue that the cleanliness and readability far outweighs that. Lava hawk.png BlackHawk (Talk)    17:16, 28 February 2021 (UTC)

Support - Great idea by the Rib man. :) Farming-icon.png Salix of Prifddinas (Talk) Prifddinas lodestone icon.png 17:20, 28 February 2021 (UTC)

Support - easier for less experience editors and or consistency between wikis for people who edit both. Can you we bot correct all these? Magic logs detail.pngIsobelJTalk page 20:31, 28 February 2021 (UTC)

Support - Much easier to read. Find (\|\s*\w+\s*=([^{}[\]]|\{\{.*\}\}|\[\[.*?\]\])+?)\s*(?=\|\s*\w+\s*=) replace $1\n seems to do the trick so it's just an easy bot task. Invention.pngCephHunter talkSlayer.png 22:13, 28 February 2021 (UTC)

I have a bot that's a bit more context aware, since this proposal should only apply to infobox templates. Riblet15 (talk) 22:35, 28 February 2021 (UTC)

Support - Though I haven't edited much lately, the newlines make it far more readable to me, at least. So I support.  RS AdvLogMyles Prower  Talk 15:50, 6 March 2021 (UTC)

Closed - unanimous support for the proposal. Magic logs detail.pngIsobelJTalk page 20:06, 13 March 2021 (UTC)