Template talk:Prefix display

From Guild Wars 2 Wiki
Jump to navigationJump to search

Linked format[edit]

Well, simply adding links... that's by far not enough. In fact, editing this template and changing the output format questions every other template that is related to equipment and prefixes and hence probably uses this template. In process of checking those templates one will stumble across deprecated prefixes, missing prefixes, etc... overall probably requiring several template adjustments and cleanups, most likely taking hours.

A quick five minutes check gave me the following results (there might be more):

  • At least two templates require unlinked plaintext prefixes (using the linked format there let us look like amateurs).
  • At least one prefix is missing here, returning the internal coded prefix (it's used only on a few pages, but nevertheless this template should handle it)
  • At least one prefix in this template redirects by appending "'s".

I would suggest to take one step back, actually check what a linked format actually means for all the other equipment and prefix templates, probably clean up other equipment templates and then add a linked format.

P.S. To be honest, if it would have been a simple edit I could have done it on my own, instead of refering to an according template talk page (see here) --Tolkyria (talk) 15:30, 6 June 2020 (UTC)

Internal coded prefix being wintersday stuff? -Chieftain AlexUser Chieftain Alex sig.png 18:11, 6 June 2020 (UTC)
Yeah it's not enough but it's a start. Responding to your points:
  1. Sorry, I didn't know some templates require the output of this template to be unlinked. Which ones are those? They should probably be documented on this template's page.
  2. This can be fixed by adding the missing prefixes to the switch statement. I'm not sure what's missing though.
  3. I don't particularly see using redirects as an issue but it could be fixed by removing the "'s" where applicable. This may also require edits to templates that use this template's output.
--BuffsEverywhere (talk) 18:32, 6 June 2020 (UTC)
  1. Template:Craft table row and Template:Equipment variant table row uses <div title="{{prefix display|{{#var:ct_attrprefix}}}}">{{prefix attributes|{{#var:ct_attrprefix}}}}</div>. The div title part, showing the prefix while hovering, now displays e.g. [[Berserker's]]. Related: however, Template:Loot variant table row doesn't use the template prefix display, imo the it should be consistently used everywhere.
  2. Yes, Alex, you are right, the one I found is "snowflake1" used on e.g. Copper Amulet, now displaying while hovering: [[Snowflake1]]. Not exactly sure, but snowflake2 and snowflake3 aren't used, these are changed to Giver's (actually giver2a/giver3a) in the Template:Craft table row.
  3. In my opinion it does matter, it's only one template edit. It's all about proper representation, showing that we are actually aware of what the correct page is. The first line states Giver instead of Giver's. Also, Marshal's seems to be missing too, as you already found out.
Furthermore, Template:Prefix attribute table needs a cleanup, only calling this template in the #switch default case, hence there will be some linked and some unlinked (inconsistent!). Probably most of them can be removed (all the "at" ones), and the others could be merged into this template (again, not sure about Snowflake).
Please note that I did not invest much time but still found several issues, there might be more. --Tolkyria (talk) 20:27, 6 June 2020 (UTC)
Good stuff, thanks for expanding. I would propose that this template is given a second parameter, which change the output beween showing text only (default) or a link (if second parameter is set to "link"). Then we can control precisely what receives a link or not. sandbox code example (propose using ifeq for each prefix since its easier to update, rather than having a switch for the entire thing and declaring each prefix on separate lines twice).
Looking at Template:Prefix attribute table (cough unknown source of inconsistency!) I think we can just replace that switch statement around {{#replace:@@@|'s|}} with Prefix display. -Chieftain AlexUser Chieftain Alex sig.png 22:15, 6 June 2020 (UTC)
In the Template:Prefix attribute table we could skip everything, simply {{prefix display|@@@}} does the job (the >'s< replace is handled here).
I'm not very fond the #ifeq calls, e.g. for each selectable equipment item that are 36 #ifeq calls bascially for nothing... on thousands of pages. I would prefer to keep it lightweight and suggest to either split this template (e.g. Template:Prefix display plaintext) or rewrite the two equipment variant rows (the new popups are blocking the hovering text anyways: the attributes are linked, i.e. popups, only the granted amount allows to hover it which is comparably small).
Summing up:
Hence, if we don't find any other template where plaintext is required, I would prefer to remove the two hovering div titles (nowadays very hard to see) and to not add the #ifeq link check. Keep it simple. --Tolkyria (talk) 22:57, 6 June 2020 (UTC)
I always thought it would only evaluate the ifeq's on the required path tbh. -Chieftain AlexUser Chieftain Alex sig.png 17:24, 8 June 2020 (UTC)
Oh, sorry, I wasn't precise, I was refering to e.g. {{prefix selection|all legendary}}, not the "Selectable" from the infobox. So, summing up, this template is called 37 times on such item pages. --Tolkyria (talk) 17:35, 8 June 2020 (UTC)
I see, you still want to keep the hovering. As suggested above, I would remove it (there's also a prefix column or we can add one), whenever I try it, the popup interferes, only in the small "+xx" part it's possible to actually get it. May I ask you to try it on a few pages and then if you still like it we can keep it. Otherwise, if even we (who are aware of the hovering text) aren't happy with it, then none of the wiki users will be (if they notice it at all). --Tolkyria (talk) 17:52, 8 June 2020 (UTC)
I do like the hovering, especially over tables with the icons and attribute values which already have too many columns. You can hide columns on Template:Equipment variant table row, so the prefix col might be hidden. For Template:Craft table row afaik the prefix is not always shown in the item name. -Chieftain AlexUser Chieftain Alex sig.png 18:03, 8 June 2020 (UTC)
Okay.
By the way, I totally forgot the four equipment infoboxes, all of them used title="{{prefix display|{{{prefix}}}}}". --Tolkyria (talk) 18:50, 8 June 2020 (UTC)
Good spot, that predates the addition of the prefix into the infobox. -Chieftain AlexUser Chieftain Alex sig.png 19:23, 8 June 2020 (UTC)