Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Unofficial Rhythm Doctor Custom Level Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module talk:InfoboxImage
(section)
Add topic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
Add topic
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Other size parameters cause upright to be ignored == With the current implementation of this module, the upright parameter is ignored if the maxsize or sizedefault parameters are defined. This appears to be because image syntax ignores upright if a size in pixels is defined. It means that if either of those parameters are used in an infobox template (see {{tl|Infobox bridge}} for example), then it's not possible to use the upright parameter at all in articles, which is not the intended behavior. I don't have the Lua skills to do so, but I think the module should be rewritten so that a pixel size is not passed if the upright parameter is used and the size parameter is not. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 03:27, 30 May 2025 (UTC) :I think there are two separate cases to consider: :# Both {{para|upright}} and either {{para|maxsize}} or {{para|sizedefault}} are specified :# Both {{para|upright}} and {{para|size}} are specified :In the first case, I think the current module behavior is likely incorrect -- the caller specified a size via {{para|upright}} and it's being handled as if no size was specified. The second case is less clear, because conflicting sizes are being provided. I'm reluctant to change the current behavior for the second case, because there may be unintended consequences to the 5M articles that use this module. :Of course, fixing the incorrect behavior also may have unintended consequences, also, so we should be careful. For example, the proposed behavior now allows people to set absurd values to {{para|upright}} and there is no check or limit. :I've modified [[Module:InfoboxImage/sandbox|the sandbox]] to fix the first issue, and updated [[Module:InfoboxImage/testcases|the tests]] to exercise the new code. {{Pinging|WOSlinker}} to see if they have any comments on the change: other editors are also welcome to comment. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:17, 30 May 2025 (UTC) ::Later: I added some logic to ensure that {{para|upright}} doesn't produce an image larger than {{para|maxsize}}, assuming the default user preference. This fixes one potential issue. Updated sandbox and testcases. I'm hoping some other templateeditor or admin takes a look at the [https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Module%3AInfoboxImage&page2=Module%3AInfoboxImage%2Fsandbox diff]. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 10:01, 30 May 2025 (UTC) :::@[[User:Hike395|Hike395]]: Thanks for looking into this! Just to clarify - will this still allow an image scaled with upright to be larger than maxsize if the user preference is set to a larger-than-default value? That seems important for accessibility reasons. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 16:09, 30 May 2025 (UTC) ::::Yes: if upright is specified, then maxsize will scale with the user's default image size. So if maxsize=300, and the user's preferred thumbnail size is set to 300px, then the output image will be limited to be less than 300*300/220 = 409px for that user. There's no way to avoid this. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 00:39, 31 May 2025 (UTC) :::::Great, that is the behavior I believe it should have. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 00:45, 31 May 2025 (UTC) :To the original observation {{tq|the upright parameter is ignored if the maxsize or sizedefault parameters are defined. This appears to be because image syntax ignores upright if a size in pixels is defined}}: this is expected behaviour, and is documented at [[WP:PICSIZE]], inside the "Implementation details" box ([[WP:EIS#Implementation details|direct link]]), last paragraph. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 13:39, 31 May 2025 (UTC) ::{{ping|Pi.1415926535|Redrose64}} Picking this back up. My sandbox edits do not contradict [[WP:PICSIZE]]. If a absolute size and an upright are both specified, then the absolute size is used. What I did was scale maxsize and sizedefault relative to the user preferred image size. Those two parameters are only defined in this module: [[WP:PICSIZE]] does not discuss them. ::Is it ok to promote the sandbox to main? I see that since this edit, Pi.14 has removed maxsize and sizedefault from a number of infoboxes. It would be good to restore those, if I can promote sandbox to main. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 08:48, 5 August 2025 (UTC) :::{{ping|Pi.1415926535|Redrose64}} Any comments or thoughts before I propose this as an edit? {{U|Pppery}} just [[WP:FULL|fully protected]] this Module, so I can no longer edit it, so even a simple support/agree would be helpful. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 14:46, 12 August 2025 (UTC) :::: To be clear, my full protection was completely unrelated to this dispute, which I didn't even know existed; if you look at my edits at the time I adjusted the protection level of hundreds of templates. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:35, 12 August 2025 (UTC) :::::If I'm understanding correctly what your edit does, I support it. I'm confused about your statement {{tq|Pi.14 has removed maxsize and sizedefault from a number of infoboxes}} - to my knowledge, I haven't edited any infobox templates to remove these. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 05:12, 13 August 2025 (UTC) ::::::{{ping|Pppery}} apologies. I didn't mean to imply causation here -- I just wanted to point out that I can no longer edit the template directly. ::::::{{ping|Pi.1415926535}} more apologies. I recall seeing edits to infoboxes which removed maxsize and sizedefault, but now I cannot find them to check who did them. β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 12:33, 13 August 2025 (UTC) ===Edit request=== {{FPER|answered=yes}} Please copy [[Module:InfoboxImage/sandbox]] to [[Module:InfoboxImage]] This is a change in handling the case where {{para|upright}} and either {{para|maxsize}} or {{para|sizedefault}} is specified. In this case, the sandbox version obeys {{para|upright}}, but if it exceeds <code>maxsize/220</code>, then it is set to <code>maxsize/220</code>. The current behavior is to ignore {{para|upright}} when either {{para|maxsize}} or {{para|sizedefault}} is specified, which is incorrect. This edit does not change any behavior if {{para|upright}} is not specified. Also, if {{para|size}} and {{para|upright}} are both specified, the behavior remains unchanged: {{para|size}} is obeyed in that case. :Are you sure that this description is correct? On the testcases page, I am seeing the Mustela image with <syntaxhighlight>upright=1.5|sizedefault=272|maxsize=300</syntaxhighlight>. The live module renders the image at 1.5x my thumbnail size. The sandbox image is rendered at 272px. This seems to be the opposite of the description above, if I am reading it correctly. It also seems to be a fix that helps the module to match normal image rendering (px is preferred over upright). Is this what you want? β [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:01, 15 August 2025 (UTC) ::You may be interpreting the unit tests backward? Here are the results when main and sandbox are called with the case that you are highlighting: :::<code><nowiki>{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}</nowiki></code> β [[File:Mustela erminea upright.jpg|272px|upright=1]] :::<code><nowiki>{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}</nowiki></code> β [[File:Mustela erminea upright.jpg|frameless|upright=1]] :::Here, the main module is generating a pic with size=272px, while the sandbox module is generating a pic with upright=1 (rendered at your preferred size). So the logic is correct. :::The logic has not changed when both size and upright are specified. They are both emitted and MediaWiki prefers size over upright: :::<code><nowiki>{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}</nowiki></code> β [[File:Mustela erminea upright.jpg|200px|upright=1]] :::<code><nowiki>{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}</nowiki></code> β [[File:Mustela erminea upright.jpg|200px|upright=1]] :::β [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 17:18, 15 August 2025 (UTC) ::::Indeed, I do not understand what "Expected" and "Actual" refer to on that page. I'm used to seeing the live template followed by the sandbox, with appropriate headers to match. In that case, and based on the apparent consensus above, I have no objections. It looks like this change will require an administrator, which I am not. β [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:25, 15 August 2025 (UTC) ::::: {{ping|Redrose64}} Do you object to this request? [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 19:48, 15 August 2025 (UTC) ::::::I'm not a Lua expert, and have never claimed to be. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 22:18, 16 August 2025 (UTC) {{Done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 04:35, 17 August 2025 (UTC)
Summary:
Please note that all contributions to Unofficial Rhythm Doctor Custom Level Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Module talk:InfoboxImage
(section)
Add topic