Module talk:Main page image
![]() | Module:Main page image is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit.
|
Calculate by area
ProcrastinatingReader, now that we have overcome the challenge of adoption. I wonder if there is not a better way of calculating size. The best way to calculate the image size is actually by area. Could you rewrite this module to calculate the width size that would return an image occupying a surface area equal to 140x140 = 19,600? Note, this is approximately the same size as 120x160 or 160x120 = 19,200. --- C&C (Coffeeandcrumbs) 15:37, 11 August 2020 (UTC)
- Coffeeandcrumbs, sorry, I don't quite follow. How would this work? And what's the visible difference over the current way of doing it? And how would it know whether to be upright or not since both 120x160 and 160x120 are 19,200 pixels? ProcrastinatingReader (talk) 11:06, 12 August 2020 (UTC)
- ProcrastinatingReader, I created Module:Main page image/sandbox to show how it could work. My hope is to address cases where the image is very wide or very tall. --- C&C (Coffeeandcrumbs) 17:25, 12 August 2020 (UTC)
- ProcrastinatingReader Did you have a chance to review the new code in the sandbox. If you have no objections, I am going to make a request to implement it. --- C&C (Coffeeandcrumbs) 19:24, 13 August 2020 (UTC)
- Coffeeandcrumbs, yes, sorry. I was fiddling around with how it would look with the TFA yesterday, see User:ProcrastinatingReader/sandbox3. Code wise it's fine. Functionality wise, I'd only note that a) it can result in varying widths (which I suppose is the point) and b) for some dimensions, like the example in sandbox, can be fairly small and result in the caption looking a bit messy (seems to vary for different browsers, looks worse in Safari than Chrome for me). ProcrastinatingReader (talk) 19:39, 13 August 2020 (UTC)
- ProcrastinatingReader, I recommend you install User:SD0001/sandbox4.js. It will let you preview template changes on live pages without having to create such sandboxes.
- As for your sandbox3, note that I manipulated that original TFA blurb using
<br />
andwidth=x222
. We will have to continue using your override feature to address such extreme cases. --- C&C (Coffeeandcrumbs) 19:59, 13 August 2020 (UTC)- Fair point. Code wise looks fine to me - good work, and nice formula! I've made a very small edit (since the variable is already declared). ProcrastinatingReader (talk) 20:07, 13 August 2020 (UTC)
- Coffeeandcrumbs, yes, sorry. I was fiddling around with how it would look with the TFA yesterday, see User:ProcrastinatingReader/sandbox3. Code wise it's fine. Functionality wise, I'd only note that a) it can result in varying widths (which I suppose is the point) and b) for some dimensions, like the example in sandbox, can be fairly small and result in the caption looking a bit messy (seems to vary for different browsers, looks worse in Safari than Chrome for me). ProcrastinatingReader (talk) 19:39, 13 August 2020 (UTC)
- ProcrastinatingReader Did you have a chance to review the new code in the sandbox. If you have no objections, I am going to make a request to implement it. --- C&C (Coffeeandcrumbs) 19:24, 13 August 2020 (UTC)
- ProcrastinatingReader, I created Module:Main page image/sandbox to show how it could work. My hope is to address cases where the image is very wide or very tall. --- C&C (Coffeeandcrumbs) 17:25, 12 August 2020 (UTC)
Request
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please replace the current code with the version in the sandbox: Module:Main page image/sandbox. --- C&C (Coffeeandcrumbs) 20:23, 13 August 2020 (UTC)
- I think, since this would result in a visual change to the Main Page (ie, in image sizes), this may require a discussion at Talk:Main Page. ProcrastinatingReader (talk) 14:57, 28 August 2020 (UTC)
- I have posted a notice at Talk:Main Page. --- C&C (Coffeeandcrumbs) 22:04, 28 August 2020 (UTC)
- Disabled request pending outcome of dicussion — Martin (MSGJ · talk) 20:19, 29 August 2020 (UTC)
- MSGJ and ProcrastinatingReader, it would appear no one else cares. The notice was archived after three days. --- C&C (Coffeeandcrumbs) 18:43, 1 September 2020 (UTC)
- I've implemented the change in the sandbox — Martin (MSGJ · talk) 06:52, 8 September 2020 (UTC)
- MSGJ and ProcrastinatingReader, it would appear no one else cares. The notice was archived after three days. --- C&C (Coffeeandcrumbs) 18:43, 1 September 2020 (UTC)
- Disabled request pending outcome of dicussion — Martin (MSGJ · talk) 20:19, 29 August 2020 (UTC)
- I have posted a notice at Talk:Main Page. --- C&C (Coffeeandcrumbs) 22:04, 28 August 2020 (UTC)
Fix some script errors
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please pull in changes from sandbox (specifically Special:Diff/977330810/986765585) to fix some script errors, e.g., to remove Portal:California/Selected article/Layout from Category:Pages with script errors. Thank you, —Uzume (talk) 21:53, 2 November 2020 (UTC)
Done — Martin (MSGJ · talk) 13:48, 4 November 2020 (UTC)
wierd problem
@ProcrastinatingReader: take a look at Special:PermaLink/995467810 with Firefox if you can? The first image (which is on MP right now) looks horrible on my screen, see screenshot below. Not using this module seems to make the problem go away.