Guild Wars 2 Wiki talk:Popups

From Guild Wars 2 Wiki
Jump to navigationJump to search

Recap[edit]

1. The popups excludes the several element types, especially div (see here). Because the template {{quotation}} uses div, I created {{wikipopup}} and other templates) which are called in the infoboxes to display their quotation in a nice format. E.g. skill or equipment infoboxes mostly display their information in the template {{quotation}}, hence it's crucial to actually have this information in the popup. Otherwise, because some of them don't even have an additional intro text and the popup would have remained emtpy (preview: "..."). A full list which templates are using {{Wikipopup}} and co. can be found here.

2. Right now the wiki popups are displayed in plain text without any line break. However, adding the following CSS enables line breaks:

.mwe-popups .mwe-popups-extract {
 white-space: pre-line;
}

I have adjusted the infobox quotations s.t. we should be able switch it on without any further bigger adjustments; but I cannot give any guarantees what will happen to non-infobox pages. Only {{wikipopup prefix}} and {{wikipopup upgrade}} needs to be adjusted, their current separator can be either kept or replaced. Please note that it's a separator, hence it's not displayed as intro, required for weapon stats without description intro, e.g. Bonetti's Rapier.

3. The description of {{quotation}} is displayed in div tags, so we might encounter formats that can't be hidden by <span class="wikipopup" style="display:none">{{{description|}}}</span> (used by {{wikipopup}} to give the popup text). E.g. unordered or ordered lists (e.g. {{Gem store combo infobox}}) or double line breaks. {{wikipopup}} handles most of this cases but not all:

Examples
<span style="display:none">
Intro text
* Unordered list 1
* Unordered list 2
Outro text
</span>

Intro text

  • Unordered list 1
  • Unordered list 2

Outro text

{{wikipopup|Intro text
* Unordered list 1
* Unordered list 2
Outro text}}

<span style="display:none">
Intro text before double line break

Outro text after double line break


Outro text after triple line break
</span>

Intro text before double line break

Outro text after double line break


Outro text after triple line break

{{wikipopup|
Intro text before double line break

Outro text after double line break


Outro text after triple line break}}

In detail, {{wikipopup}} removes

  1. \n\n and replaces any occurence with  #&10 (breaking <span> otherwise)
  2. * and replaces any occurence with  #&10;•  (breaking <span> otherwise)
  3. \n and replaces any occurence with  #&10
  4. <br> and replaces any occurence with 

with #arraymap. Not sure if we should switch to #dplreplace for a cleaner and more general approach. --Tolkyria (talk) 15:44, 31 March 2020 (UTC)

Extension:PageImages[edit]

The mw:Extension:PageImages selction algorithm sometimes fails at daggers and swords (the individual dagger/sword pages, not the gallery pages itself); and almost always at all harpoon guns, spears and tridents due to:

The ratio of the image's width to height is considered $wgPageImagesScores['ratio'] 
   On Wikimedia wikis the best possible images are images where the height is half the width or the height is double the width. Any images for which the ratio is less than 0.5 will score negatively and be discarded.

Should we consider to decrease the ratio to display at least some of them. There are spears with a ration <0.1, e.g. File:Nitro.jpg, I guess such low ratio images can't be previewed reasonably at all, but maybe e.g. File:Bonetti's Rapier.jpg with a ration of ~0.28 theoretically can. --Tolkyria (talk) 15:56, 31 March 2020 (UTC)