Template talk:Adjacent stations

Edit request 1 January 2024 : short line link?

edit

Description of suggested change: A short version of Template:Line link using the short name instead when available. Use case is similar to Line link, except when the short name is preferred. I'm not familiar enough with Lua, but I have tried implementing a version of it in sandbox based on the _box function in the module (which references the short name and extracts the link as well).

Diff: https://en.wikipedia.org/w/index.php?title=Module%3AAdjacent_stations%2Fsandbox&diff=1192925219&oldid=1192919681

- oahiyeel talk 02:26, 1 January 2024 (UTC)Reply

  Done I haven't exhaustively tested this code, but it seems vaguely reasonable to me and just adding new functions can't possibly break anything. * Pppery * it has begun... 15:51, 9 January 2024 (UTC)Reply

Edit request 13 February 2024

edit

Description of suggested change: Prague Metro has been using for years different logo which is now available through Commons --Bilykralik16 (talk) 00:22, 13 February 2024 (UTC)Reply

  DoneJonesey95 (talk) 01:02, 13 February 2024 (UTC)Reply

Adjacent stations/Maryland Transit Administration

edit

@Mackensen: I think some tweaking is needed following recent edits at Module:Adjacent stations/Maryland Transit Administration to avoid the error at {{Baltimore Transit}} ("Lua error in Module:Adjacent_stations at line 430: "title" is missing from the data page"). Johnuniq (talk) 23:27, 6 March 2024 (UTC)Reply

@Johnuniq Got it. I'll watch out for any others. Mackensen (talk) 23:31, 6 March 2024 (UTC)Reply

Disambiguation issues

edit

I found two disambiguation pages which are being linked to from this template. I may be mistaken, but I think that adding parenthetical disambiguators needs to be done within the template here (versus in the template call). I'm not sure how that would be done, but it seemed like this would be the place to ask about it?

Thanks! Cleancutkid (talk) 06:48, 15 April 2024 (UTC)Reply

  Fixed at Module:Adjacent stations/JR Kyushu. – Jonesey95 (talk) 14:44, 15 April 2024 (UTC)Reply

Another disambiguation request

edit

Sorry, I don't quiiite understand this template enough to try to edit it myself, but I found another station with an issue, this time in the M3 line of Module:Adjacent stations/Sofia Metro. The template goes to Teatralna Metro Station, but needs to instead go to Teatralna Metro Station (Sofia Metro). The error is visible from the articles for the adjacent stations, Orlov Most Metro Station and Hadzhi Dimitar Metro Station. Thank you! Cleancutkid (talk) 04:24, 30 April 2024 (UTC)Reply

I've updated it. -- WOSlinker (talk) 07:57, 30 April 2024 (UTC)Reply

Template-protected edit request on 6 May 2024

edit

Hello, can a module for Dreamstar Lines be added? Thank you! OrdinaryScarlett (talk) 20:58, 6 May 2024 (UTC)Reply

I don't see a need to add it until it proves to be anything more than vaporware. There's a nigh-endless stream of private companies that propose shiny new services and never go anywhere - Boston Surface Railroad, X Train, Z-Train, AmeriStar Rail, etc. Exactly one - Brightline - has actually gone through, and that was an existing railroad starting on its own property. I don't think we should clog up station infoboxes with services like these until it's clear they're actually going to happen. Pi.1415926535 (talk) 21:30, 6 May 2024 (UTC)Reply
  Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. — Martin (MSGJ · talk) 10:11, 7 May 2024 (UTC)Reply

Template-protected edit request on 21 May 2024

edit

For Missoula Montana's previous Amtrak station, an incorrect link is being used, it should be this page "Missoula station (Northern Pacific Railway)". Thanks! GusterPosey (talk) 02:36, 21 May 2024 (UTC)Reply

Bug fix required

edit

The optional |size= argument (see Template:Rail icon#Parameters) produces an error rather than changing the icon size. Useddenim (talk) 16:51, 24 June 2024 (UTC)Reply

Example of where it's broken? Mackensen (talk) 17:00, 24 June 2024 (UTC)Reply
How about right here: {{ric|Tyrol S-Bahn|S1|size=50px}}50px|S1? Useddenim (talk) 19:21, 24 June 2024 (UTC)Reply
Interesting. Seems to be limited to textual "icons"; for example, {{ric|Salzburg S-Bahn|S1|size=50px}}  works just fine. Given that there isn't an actual image, I suppose it should just do nothing in this case? Mackensen (talk) 20:42, 24 June 2024 (UTC)Reply
No, |size= should then scale the text. Useddenim (talk) 20:46, 24 June 2024 (UTC)Reply
The documentation appears to say that "size" will be ignored unless "system icon format" is set to "image". In this case, in Module:Adjacent stations/Tyrol S-Bahn, "system icon format" is set to route, but "size" is being passed through instead of discarded: all inputs except "alt" and "size" are passed through appropriately. That looks like a bug to me. (Edited to add: We should not pass along "size" to change the size of text in px values, IMO.)– Jonesey95 (talk) 22:49, 24 June 2024 (UTC)Reply
Is there a way that the size parameter could be figured as a percentage to then change the text-height? Useddenim (talk) 01:47, 25 June 2024 (UTC)Reply

Edit request 2024-07-04

edit

Please add notheme to the class attribute for 'body banner' on line 179 of Module:Adjacent stations (sandbox edit). This fixes an issue with the line colors not displaying on dark mode when embedded in {{{services}}} in {{Infobox station}}, compare current Helsinki Central Station with Special:Permalink/1232615211 of my sandbox using the sandbox version of this module. Thanks. Taavi (talk!) 17:26, 4 July 2024 (UTC)Reply

  Done myself. Taavi (talk!)

Edit request 9 July 2024

edit

Description of suggested change: Hey all, I need to change the style of a transit agency across all it's pages, because, due to a rebrand, the colors are now different, and I have no idea how to do it myself. If someone could help it'd be great!

Cloudsarepretty (talk) 04:52, 9 July 2024 (UTC)Reply

  Not done for now: There is no specific request here. Please link to an affected article and to a reliable source showing the new colors. – Jonesey95 (talk) 05:41, 9 July 2024 (UTC)Reply
Hi, sorry about that. The agency is SacRT and they recently updated their logo as seen on their website / social channels, therefore also updating their color scheme. The requested colors are: Background #00246A and Text #E0F0FF for visibility. Cloudsarepretty (talk) 08:46, 9 July 2024 (UTC)Reply
Just realized I forgot to actually include an article. You can see on any SacRT station article, (for example, Fruitridge station) that it still has the dark blue and gold color scheme. I have reached out to get the operator logo updated to the new one as well. Cloudsarepretty (talk) 08:51, 9 July 2024 (UTC)Reply
The module is at Module:Adjacent stations/SacRT. The background color seems to be the same, so you should just need to update the header text color. -- WOSlinker (talk) 11:29, 9 July 2024 (UTC)Reply
I have successfully changed it. How do I change the Rail-interchange icon? Cloudsarepretty (talk) 18:42, 9 July 2024 (UTC)Reply
In Template:Rail-interchange look for "File:Sacramento_Regional_Transit.svg" and replace with "File:Sacramento_Regional_Transit_2024.jpg". It's template editor protected though, so I've made the change for you. -- WOSlinker (talk) 19:06, 9 July 2024 (UTC)Reply
Amazing! Thanks So Much! Cloudsarepretty (talk) 19:27, 9 July 2024 (UTC)Reply
  Done Cloudsarepretty (talk) 19:28, 9 July 2024 (UTC)Reply

font-family specified in Module:Adjacent stations subpages

edit

I'm seeing font-family specified in about 300 subpages of Module:Adjacent stations. This appears to contradict MOS:FONTFAMILY. Some of them specify "sans-serif", which is possibly acceptable, but there are definitions like "Copperplate", "Arial", "Tahoma", "Times New Roman", and "Helvetica" that should probably be removed. – Jonesey95 (talk) 05:21, 10 July 2024 (UTC)Reply

dab fixes for Shimabara Railway

edit

I finally started to get comfortable adding disambiguators to the code here for JR Kyushu, but now am running into issues with how to do so for stations on the Shimabara Railway Line (at Module:Adjacent stations/Shimabara Railway). I think that the following list covers all of them:

I can do most of them if someone else can help me get started, or whatever is easiest. Thanks! Cleancutkid (talk) 06:23, 4 August 2024 (UTC)Reply

I've updated Module:Adjacent stations/Shimabara Railway. -- WOSlinker (talk) 08:12, 4 August 2024 (UTC)Reply
Thanks! Cleancutkid (talk) 22:58, 4 August 2024 (UTC)Reply

Capitalisation: Former Services

edit

Please update the template so that the column heading text "Former Services" (and anything similar, if applicable) uses sentence case, ie "Former services", per WP:HEADERS. Sample page that uses the template: Demondrille railway station. Mitch Ames (talk) 04:05, 15 August 2024 (UTC)Reply

That titling is specific to Module:Adjacent stations/State Rail Authority. Mackensen (talk) 10:36, 15 August 2024 (UTC)Reply
This has been fixed. Thank you for providing a link to an example page! It is always helpful. – Jonesey95 (talk) 00:49, 16 August 2024 (UTC)Reply

Accessibility issues created by the Rail color box template

edit

Adding {{Accessibility dispute}} to the {{Rail color box}} template documentation.

In brief, some of the parameters in that template facilitate the creation of inaccessible content due to insufficient contrast. They would best be removed and their values redirected to the accessible versions that are already provided by that template.

Here are the details:

I respectfully suggest that the following parameter values be retired and redirected to other values for accessibility reasons:

  • route
  • broute
  • croute
  • xroute

Additionally, the following may cause problems and need to be evaluated for removal and redirection as well:

  • link
  • ldot
  • lsquare

And as candidates for the accessible replacement values:

  • yes
  • small
  • dot
  • square

The issues are that:

  • Route logo colors often do not meet WCAG 2.1 AA for contrast. A logo itself does not need to meet contrast requirements, but when used for a text or graphic link, then it would need to meet contrast. Using yes, small, dot, or square allows the primary logo color but without harming accessibility.
  • Without a text link (as provided by yes, small, dot, square), the site visitor may not be able to read the link due to color blindness or low vision.
  • Further, the background may have insufficient contrast with the link underline, when provided, for the site visitor to be able to distinguish between links to pages that exist vs. links to pages which do not exist. If the visitor has their preferences set to always underline links, they may not be able to see the link underline.
  • link, ldot, and lsquare are accessible only if there is an accompanying text link. Since yes, small, dot and square automatically provide that text link, they are preferable to link, ldot, and lsquare.

Please consider this change. Thisisnotatest (talk) 07:35, 4 October 2024 (UTC)Reply

@Thisisnotatest just a note that {{Bahnlinie}} is an older template that delivers the croute option with no fallback. Mackensen (talk) 11:19, 4 October 2024 (UTC)Reply
@Mackensen: Thank you for the heads up. I've added the template to that post as well. Thisisnotatest (talk) 03:46, 8 October 2024 (UTC)Reply

Adjacent stations module appears not to respect WCAG 2.0 AA for contrast

edit

Adding the {{overcolored}} template to this module.

It appears that this module is not correctly calculating the text color for text over a route icon. For instance, Module:Adjacent stations/Buenos Aires Underground produces the following:

Correct colorations:

White text on a colored background where white is accessible:

 ,  ,  ,  

Black text on a colored background where black is accessible:

 

Incorrect colorations:

White text on a colored background where black is accessible but white is not (followed by the same line in accessible text):

  (A),   (B),   (G),   (I),   (P)

Conclusion:

If I examine the code for Module:Adjacent stations/Buenos Aires Underground, only the bubble color is shown. The text color is not. This implies to me that the text color is being calculated in {{Adjacent stations}} instead.

The algorithm needs to be changed to produce accessible color combinations between text and background.

Thisisnotatest (talk) 22:16, 19 October 2024 (UTC)Reply

Template-protected edit request on 26 November 2024

edit

I saw the following error message: Lua error in Module:Adjacent_stations at line 237: Unknown line "Hamilton-Allandale".. Please add the name of the system to this message - I did eventually find the source of the error (a subsequent musnumbered system parameter), but it would have been much faster if I could search for the system name. Animal lover |666| 17:28, 26 November 2024 (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. – Jonesey95 (talk) 18:34, 28 November 2024 (UTC)Reply
The error should say Unknown line "Hamilton-Allandale" in system "XXX", so that if the error is with the system parameter as opposed to the line parameter this fact will be easier to see. Animal lover |666| 01:05, 29 November 2024 (UTC)Reply
I have disabled this edit request, because there is no proposed, specific code change here, per the instructions in the edit request template. I believe that this error message lives in Module:Adjacent_stations/i18n, but I don't know Lua well enough to make the code change. Feel free to experiment in the sandbox. – Jonesey95 (talk) 16:16, 29 November 2024 (UTC)Reply