Fandom Developers Wiki

This is the talk page for discussing improvements to the Global Lua Modules/Mbox page.

To-do/feature wishlist[]

The following features are "nice to have"s but not 100% necessary, so I'll put them here for now in case I ever decide to do it (or in case anyone else wants to do it):

  • Remove the × button if only header is used (because otherwise, the × button does nothing except rotate into a +)
  • Enable an easy config option so wikis can decide which elements (between image, header, text, comment, or aside) are hidden by the × button. By default, it hides everything except header (but in some wiki's cases, like Wookieepedia's, it'd be better if everything except text was hidden).
  • Instead of hiding image when × is clicked, it'd be nice if it was simply shrunk down to the size of a single text line. This would help the smoothness of the animation without the image taking up too much space. —User:Jak Himself (talk) 20:46, July 1, 2018 (UTC)

type not working[]

I'm not sure what changed, but this module is not using custom colors/types properly anymore on my wiki. See this template. When I inspect the element, the first line says this:

<div class="mbox" style="/* insecure input */">

Anyone got any clue? SlyCooperFan1 [message · contributions] 07:25, June 9, 2019 (UTC)

The inline use of
var(--type-
is now disallowed due to https://cras.sh/ --Pcj (T·C) 00:20, June 13, 2019 (UTC)
We've recently made changes to reflect the type param via a class on .mbox. We recommend you continue to use CSS variables, and add appropriate helper classes as shown in the docs; this gives us the most flexibility going forward. puxlit (talk) 19:26, December 4, 2019 (UTC)

Working examples for the var usage?[]

In the examples showing how to use the "type" parameter, the examples aren't actually working. Please add the appropriate css. Ferretwings (talk) 15:21, September 7, 2019 (UTC), CTM

We've recently made changes to reflect the type param via a class on .mbox. We recommend you continue to use CSS variables, and add appropriate helper classes as shown in the docs; this gives us the most flexibility going forward. puxlit (talk) 19:26, December 4, 2019 (UTC)

Wikitext display issues[]

I had something really strange happen where despite the wikitext looking visually correct it didn't want to display any of the text or image in the box for some reason. It was originally just copied and pasted in by another editor from where it was used elsewhere on the site I believe, and what seemed to fix it was removing the spaces in between the argument and equals sign.
What I found most strange though was how if I was to re-add the spaces it would still display correctly, so the only thing I can think of that might have caused it is some kind of inevitable/hidden characters that is messing up the wikitext.

If anyone is interested and wants to take a look at it for themselves here's a link to the previous version of the page where the mobx isn;t displaying correctly. w:c:sky-children-of-the-light:Special:PermanentLink/8635 Dave247 (talk) 03:20, May 31, 2020 (UTC)

Usage on mobile[]

To my understanding, and in my past wiki experience, "notice"-style templates can be set as Notice if they are aimed at editors (aka don't want mobile viewers to see: things like Stub templates) and set as Data if they are aimed at all readers (aka you want this template to show up on mobile: things like Spoiler templates where you really don't want to spoil your audience just because they happen to be reading from a phone...)

That being said, setting a template that uses this messagebox template as Data does not actually make it show up on mobile (unlike normal Data templates). I'm utterly unfamiliar with Lua and was wondering how to change this template so that I could get it to optionally show up on mobile and set it template-by-template.

Thank you! Kuhlau (talk) 16:20, December 7, 2020 (UTC)