Need help with aligning collapsible sections

edit

Hi. I am clearly not proficient enough to know how to align collapsible sections on a template. I flipped the orientation of Template:Confederation Line to west to east since that appears to be the convention for routemaps, but in doing so, I was unable to get the collapsible segments to properly line up how they did prior to me flipping the diagram's orientation. Could someone with more experience help go in and fix it? Much appreciated. OrdinaryScarlett (talk) 12:09, 11 January 2025 (UTC)Reply

@OrdinaryScarlett: Unfortunately I have no idea. They seem to always be distorted either in the template or in the article. Because of that, I avoid them at all costs. The best solutions I can think of, assuming this is not fixed, is to remove the collapsible section(s) entirely or try to ignore it. Sorry I could not be of more help! Hotdog with ketchup (talk) 21:14, 11 January 2025 (UTC)Reply
No worries! OrdinaryScarlett (talk) 07:28, 14 January 2025 (UTC)Reply
Usually it's a matter of either making sure the column width of the collapsible section is the same as in the body, or setting the |tw= (text width) parameter value correctly. Useddenim (talk) 19:31, 6 July 2025 (UTC)Reply

Adding a new set color

edit

I've just been doing some maintenance work over at Commons on a new BSicon color, emerald. Could someone with template editor privileges please update your routemap to include | emerald = 006400 | ex_emerald = 64A064. Thanks for your help. VanIsaac, GHTV contrabout 01:04, 17 February 2025 (UTC)Reply

Is there consensus for this color value? I see a lot of back and forth. Pinging Useddenim, who participated in that discussion. – Jonesey95 (talk) 01:49, 17 February 2025 (UTC)Reply
Well, as you can see at Commons:Category:BSicon/railway/set emerald, they've already been created, and haven't been changed in the ensuing month and a half on the basis of the discussion. VanIsaac, GHTV contrabout 03:37, 17 February 2025 (UTC)Reply
My takeaway from the discussion was "Yes, we could use a darker shade of green, but  emerald  is too close to the existing   set f  ." I was going to delete emerald and suggest  Brunswick  as an alternative, but just haven't got to it yet. Useddenim (talk) 03:44, 17 February 2025 (UTC)Reply
@Jonesey95: See c:Talk:BSicon/Colors#Proposed new color. Useddenim (talk) 19:19, 20 February 2025 (UTC)Reply
I have said that I already read that discussion and saw a lot of back and forth, and I do not see any new comments since 4 January. Please be explicit about your request, if you have one. That discussion and the above discussion are both confusing to me. – Jonesey95 (talk) 19:28, 20 February 2025 (UTC)Reply
@Vanisaac and Jonesey95:   Done. Useddenim (talk) 01:57, 7 July 2025 (UTC)Reply

Dark mode-compatibility

edit

Hi, first of all, apologies if this isn't the right place to pose this question/suggestion. I would also like to thank the community for its efforts in maintaining this library; I find the possibilities stunning.

I tend to use dark mode wherever possible, and while looking at this diagram, I noticed a weird white square in the "Guadalete river" line. After looking into it, I think it's caused by the mask   (MASKr) icon, which was set to light gray, and I was expecting the background to be of that color.

I wondered if there was a way to change the SVG fill of masks or other overlapping icons with a hard-coded background depending on the user's skin. According to Recommendations for night mode compatibility on Wikimedia wikis#Apply filters to dark images with transparent background, the CSS class skin-invert should be used, and I think it could be included in line 39 of the Routemap module like so:

["cell-overlapicon-fmt"] = '<div class="RMic" style="%s">[[File:BSicon_%s.svg|x20px|link=%s|alt=|%s|class=skin-invert]]</div>',

I tested this with the diagram I linked before with a positive result. However, I'm not confident it won't break other things, as I'm unfamiliar with the Routemap inner workings. Thank you, cheers, Swaare (talk) 12:49, 25 February 2025 (UTC)Reply

Edit: I've just noticed this affects other icons as well, rendered with a white background or just virtually invisible like the Airport icon in the "Aeropuerto de Jerez" line. Swaare (talk) 12:54, 25 February 2025 (UTC)Reply

@Swaare: The alternative would be to have RDTs always display with the  light grey  background. Useddenim (talk) 00:07, 26 February 2025 (UTC)Reply

Improvement

edit

I have three suggestions for improving this module. I initially attempted to enhance it myself but had to pause due to its complexity.

  • Would it be better to move the i18n table into a configuration submodule? Also, should the odata table be placed in a subpage and accessed via the mw.loadData method?
  • I noticed that the current approach to generating tables involves concatenating wikitext directly, which appears unstructured. Would it be more appropriate to use the mw.html.create method to construct the table in a cleaner, more maintainable way?

I have a question:

  • Who is/are the author(s) of this module? Were they two Russian Wikipedians (According to Chinese WP)?
Hzt0208042508415531 tw (talk) 06:57, 26 June 2025 (UTC)Reply

Template-protected edit request on 28 June 2025 Comment

edit

Redundant items(at line 52, Module:Routemap):

...
["row-linfo3-fmt"] = '<div class="RMsi">%s</div> ',
["row-rinfo3-fmt"] = ' <div class="RMsi">%s</div>', 
...

Hzt0208042508415531 tw (talk) 08:26, 28 June 2025 (UTC)Reply

  Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate.. taavi (talk!) 14:05, 28 June 2025 (UTC)Reply
@Taavi: It's a module, not an article, so {{subst:ETp|xy}} isn't ideal - {{subst:ETp|sand}} would be better. This displays as follows:
  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. --Redrose64 🌹 (talk) 22:12, 28 June 2025 (UTC)Reply
In module,I would like to made the change to remove redundant key-value code.173.224.219.79 (talk) 15:58, 30 June 2025 (UTC)Reply
I do not see any change to Module:Routemap/sandbox. Without that, your proposal cannot be tested. --Redrose64 🌹 (talk) 07:43, 1 July 2025 (UTC)Reply
edit

Useddenim (talk) 00:38, 6 August 2025 (UTC)Reply

Template-protected edit request on 14 August 2025

edit

Template:RoutemapRoute's documentation mentions parameters |Llink=, |Lsize=, |Rlink=, |Rsize=. Therefore I suggest to make this change (line 1096 and 1097):

  • if args.l then args.l = p._rmri{args.l,args.llink,(args.lsize or args.size),' '}..'&nbsp;' else args.l = '' end to if args.l then args.l = p._rmri{args.l,args.llink or args.Llink,(args.Lsize or args.lsize or args.size),' '}..'&nbsp;' else args.l = '' end
  • if args.r then args.r = '&nbsp;'..p._rmri{args.r,args.rlink,(args.rsize or args.size),' '} else args.r = '' end to if args.r then args.r = '&nbsp;'..p._rmri{args.r,args.rlink or args.Rlink,(args.Rsize or args.rsize or args.size),' '} else args.r = '' end Repakr (talk) 07:53, 14 August 2025 (UTC)Reply
  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Please do not paste code blobs into a template's talk page. I do not see any change to Module:Routemap/sandbox. Without that, your proposal cannot be tested. --Redrose64 🌹 (talk) 21:17, 16 August 2025 (UTC)Reply

Template-protected edit request on 15 August 2025

edit

There is invisible text in Example 2.1, to fix it, the line 93 in module should be changed:

["colspan-fmt"] = '%s\n|-\n| colspan="7" style="background:%s;text-align:%s;%s"|\n%s',
+
["colspan-fmt"] = '%s\n|-\n| colspan="7" style="color:inherit;background:%s;text-align:%s;%s"|\n%s',

Repakr (talk) 15:07, 15 August 2025 (UTC)Reply

  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Please do not paste code blobs into a template's talk page. I do not see any change to Module:Routemap/sandbox. Without that, your proposal cannot be tested. --Redrose64 🌹 (talk) 21:17, 16 August 2025 (UTC)Reply

Template-protected edit request on 18 August 2025

edit

As per above I have made changes to sandbox. These changes, firstly, fix a problem with invisible text in dark mode as seen in Example 2.1 in template's documention, secondly they fix a problem of unworking parametrs, mentioned in Template:RoutemapRoute. (They are |Llink=, |Lsize=, |Rlink=, |Rsize=.) Repakr (talk) 07:55, 18 August 2025 (UTC)Reply