Jump to content

Template talk:Multiple image

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Multiple image)


Dark mode support

[edit]

Implement changes in Module:Multiple image/sandbox, which fixes a bug to provide support for dark mode.

(Using nil for the value parameter causes the property to not be set at all. In the previous form, the div would have background-color set without a value, causing it to default to transparent.) Snowmanonahoe (talk · contribs · typos) 15:29, 6 May 2024 (UTC)[reply]

The new edit is included in this request. Snowmanonahoe (talk · contribs · typos) 17:04, 8 May 2024 (UTC)[reply]
 Done * Pppery * it has begun... 20:26, 10 May 2024 (UTC)[reply]

Is it possible to change the number of images per caption?

[edit]

@Frietjes: See the example below:

There is a large amount of empty space next to this caption. Is it possible to make this caption span the entire row of images, so that no space is left empty next to the caption?
This footer spans an entire row of images, unlike the caption above.

Jarble (talk) 18:46, 2 June 2024 (UTC)[reply]

Direction and image gap

[edit]

Regarding Module:Multiple image: if direction is vertical, then image_gap should be applied to margin-bottom, not margin-right. Probably needs new if-test and css adjustment just above line 266. First noticed at {{Austronesian ships}} in this diff. Mathglot (talk) 18:33, 17 June 2024 (UTC)[reply]

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 23:15, 17 June 2024 (UTC)[reply]
I'm confused; no changes to the template are needed; this is an issue with the module, but the module doesn’t have its own talk page, it redirects to here. I tried to find an '{{Edit module request}}' template, but couldn't find one, so used this one. Mathglot (talk) 00:21, 18 June 2024 (UTC)[reply]
It's the same edit request template, you just add the name of the page to be edited to the TPER (as I have done now). Jonesey95's message equally applies to "the [module]'s sandbox"; it's just a formulaic message ({{subst:ETp|sandbox}}) conveying that an edit request isn't really for when the edit isn't yet determined, tested, and ready to go. ("This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.") SilverLocust 💬 11:10, 18 June 2024 (UTC)[reply]
SilverLocust, thanks for fixing that. Yes, I appreciate that my description perhaps could have been more detailed, but I assumed my description of "image_gap should be applied to margin-bottom, not margin-right" via a new if-test, plus a link to the module line where the fix should be applied, was sufficient for anyone not familiar with the subject matter, as it specifies both the fix and its location, minus the actual Lua code required. If that isn't sufficient, please see my comment below, in pseudo-code. That's the best I can do. Mathglot (talk) 19:29, 18 June 2024 (UTC)[reply]
Editor Mathglot, know that I hold you in high esteem when I ask this... you are a TE and could edit the module yourself, so are you unsure as to how? or are you perhaps seeking a consensus? Can't you put what you want in the module's sandbox? I'm sorry, I jus' don' get it. P.I. Ellsworth , ed. put'er there 16:02, 18 June 2024 (UTC)[reply]
@Paine Ellsworth:, yes, I could (and TPE permissions are not required for the sandbox, so anybody could edit it) but the module is written in Lua, a language I don't know. It's sometimes not too hard to read a programming language you don't know in order to point to likely problem areas, especially when something is involved like a css property name, which is invariant regardless of programming language. Fixing such a problem is another matter. The change, in pseudo-code, would go something like this:
If image-direction == 'vertical' then
  margin = 'margin-bottom' 
else /* default (horizontal) alignment of images uses right margin */
  margin = 'margin-right'
endif
css = concat (margin, ':', imagegap, 'px')
but I don't know how to express that in Lua. No doubt I could find the Lua manual, read it, and hack something out in the sandbox, but that might take me some time, and I suspect a module writer could do it in their sleep. Meanwhile, there's a bug in the live version that needs attention, and if I get to it, it won't be anytime soon. If no one else complains about it, maybe it isn't prevalent enough to worry about, and this can just be closed and archived. Mathglot (talk) 19:14, 18 June 2024 (UTC)[reply]
I have the same situation with the Lua module language and cannot help there. One cannot always assess the bugfix value easily, as there could be hundreds or thousands of editors who want it fixed but who don't have a clue, for every one editor who has clue enough to know where to go for help. Or not. In any event this will stay open so that, hopefully, an awesome Lua expert will see it and respond. Thank you very much, editor Mathglot! P.I. Ellsworth , ed. put'er there 20:22, 18 June 2024 (UTC)[reply]
@Mathglot: Here's a sandboxed version if you want to check that {{multiple image/sandbox}} works how you want. There are no testcase issues. SilverLocust 💬 22:10, 18 June 2024 (UTC)[reply]
@SilverLocust: thanks for this. After you replied, I realized that the default alignment of images is probably horizontal, so I flipped the sense of the if condition in the pseudo-code above. I don't know if this changes anything for the sandboxed version, and also, I don't know for 100% sure what the default alignment is. Mathglot (talk) 23:08, 18 June 2024 (UTC)[reply]
 Done. When writing the sandboxed version, I had taken into account that the default is horizontal. SilverLocust 💬 00:03, 19 June 2024 (UTC)[reply]
Thanks. I can see from these sandbox edits that there were a bunch of other considerations and boundary conditions that made it more complicated than one would imagine at first blush. I really appreciate your effort on this; thank you! Mathglot (talk) 00:15, 19 June 2024 (UTC)[reply]

Dark mode and class=skin-invert-image

[edit]

Most of the time when I want to apply class=skin-invert-image to a {{multiple image}} I can do so using <div class="skin-invert-image>...</div> as recommended in [1], but there are niche scenarios like Glucose#Cyclic_forms where that is not appropriate and I would need to apply the filter to images individually. I could reformat the {{multiple image}} into a table to do that, but I wonder if support the 'class' property could be added to the template. If I knew more about Lua and CSS I would give this a shot, but at the moment this is out of my depth. ― Synpath 23:00, 21 November 2024 (UTC)[reply]

Show image

[edit]

This template has changed in the last few years. Formerly, when you tapped on the image, you went to its File page. Now you just see a thumbnail of the image, but can not access further detail about the image.-TonyTheTiger (T / C / WP:FOUR / WP:CHICAGO / WP:WAWARD) 08:04, 9 December 2024 (UTC)[reply]