Wikipedia talk:Route diagram template

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This page is of interest to the following WikiProjects:
WikiProject Trains (Rated NA-class)
WikiProject icon This page is within the scope of WikiProject Trains, an attempt to build a comprehensive and detailed guide to rail transport on Wikipedia. If you would like to participate, you can visit the project page, where you can join the project and/or contribute to the discussion. See also: WikiProject Trains to do list
 NA  This page does not require a rating on the project's quality scale.
WikiProject UK Waterways (Rated NA-class)
WikiProject icon This page is within the scope of WikiProject UK Waterways, a collaborative effort to improve the coverage of UK Waterways on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 NA  This page does not require a rating on the project's quality scale.
WikiProject Germany (Rated Project-class)
WikiProject icon This page is within the scope of WikiProject Germany, a collaborative effort to improve the coverage of Germany on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Project  This page does not require a rating on the project's quality scale.
Taskforce icon
This page is supported by German transportation task force.
BSicon CONTg.svg
BSicon KINTACCe.svg
Before making icon requests, please check the Catalog of pictograms or Tuvalkin’s index to BSicons as it may already exist. If the required icons are not available, please make your request at Commons:Talk:BSicon/New icons and icon requests. BSicon uKBHFa.svg
BSicon uENDEe.svg

UK Road[edit]

Isn't UK-Motorway-M25.svg right here?

When editing Template:Crossrail RDT User:Bazza 7 has reverted has reverted use of the { { UK road|M25 } } template as shown here in Wikipedia:Route diagram template#UK Road "This template displays a small icon with an appropriate link for A and B roads and Motorways in Great Britain". User:Bazza 7 is correclty citing Manual of Style#Avoid entering textual information as images "Textual information should almost always be entered as text rather than as an image. " . Which is correct? It is Wikipedia:Route diagram template that is in error here? Thanks  BRIANTIST  (talk) 04:28, 22 June 2016 (UTC)

{{UK road}} or any similar templates are not part of the Route Diagram Template project and should only be used when it outweighs the benefit of using text, such as infobox title or dedicated list of UK roads. -- Sameboat - 同舟 (talk · contri.) 05:01, 22 June 2016 (UTC)
Also please note that Template:Crossrail RDT is a rail diagram, any roads should be kept to a minimum, and the use of {{UK road}} icons is a visual distraction drawing attention away from the primary features - these are the railway lines and stations. This has been discussed several times, such as at Wikipedia talk:WikiProject UK Railways/Archive 35#Road numbers in RDTs. --Redrose64 (talk) 08:17, 22 June 2016 (UTC)
(copied from Template_talk:Crossrail_RDT#Isn.27t_right_here.3F) The MoS is very clear, and gives good reasons why. I would go for accessibility (especially as the image doesn't have a usable "alt" attribute) and textual indexing over the needs of diagram template. There are occasions (such as tube line symbols) where space dictates otherwise, but in the case of roads, M25 and M25 motorway are not too different size-wise than UK-Motorway-M25.svg. I have seen a good compromise for B-roads (such as  B123 ) but it's not available for other classes. I'd support using that style for other road classes should it become available. Reinstating the image was a bit premature as I'd given a good reason for reverting your edit, but I will delay reverting again in case there's more discussion.
I've been working on revised code so that A and M roads behave in the same manner as B roads, but am hung up on two issues:
  1. being able to correctly place the motorway symbol as a graphic; and
  2. finding either a table or an algorithm for determining which A roads use  yellow on green  and which are  black and white .
    Useddenim (talk) 00:03, 23 June 2016 (UTC)
@Useddenim the Green/Yellow combinations is used when a road is a Trunk Route. Some A-roads are 100% trunks, others are sometimes. You can't look it up AFAIK.  BRIANTIST  (talk) 09:56, 12 July 2016 (UTC)
See Roads in the United Kingdom#Primary destinations  BRIANTIST  (talk) 12:57, 13 July 2016 (UTC)
A-roads are divided into three groups: Trunk, Primary and the rest. Trunk and Primary A-roads get the green/yellow signs; the rest of the A-roads get white/black. On an Ordnance Survey map, the Trunk and Primary A-roads are marked in green; the rest of the A-roads are marked in magenta. Any given A-road number may belong to more than one of these three groups at different parts of its length. --Redrose64 (talk) 23:07, 13 July 2016 (UTC)
The motorway symbol is so small it's blurry at that size: I would ignore it. There is no algorithm other than a look-up table, which would require updating periodically as roads' statuses change from time to time. On reflection of my comment above, and observations made by other contributors, I'm now thinking that this is a development to be avoided, and text-only should be the norm for all non-rail items in the RDT description column(s). Bazza (talk) 10:18, 23 June 2016 (UTC)
The discussion which Redrose64 gives above supports this view. Bazza (talk) 10:14, 22 June 2016 (UTC)

Auxiliary templates[edit]

I've modified {{BSto}}, {{BSsplit}}, {{BScvt}} and {{BSsrws}} so that they now run via Module:Routemap (credits to Sameboat for creating the original Module:BSto). There should be no changes in functionality, except that all the templates can now have background coloration and custom formatting, and that the separating line of {{BScvt}} is fixed. This should enable faster loading of both {{Routemap}}- and {{BS-map}}-based diagrams. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:48, 24 June 2016 (UTC)

{{Routemap}} vs {{BS-map}}[edit]

The subject has come up again, this time at WT:UKT#SEML diagram. Useddenim (talk) 10:33, 30 June 2016 (UTC)

Mobile view (edit request)[edit]

As a fix to the issue with RDTs on mobile view, please can {{BS-overlap}} be edited like this diff in the sandbox? Thanks :D fahadsadah (talk,contribs) 17:33, 10 July 2016 (UTC)

The "padding:0" part looks good. The "!important"s seem to be unnecessary, and can probably be reduced to "border:0; padding:0;" so they don't clobber user CSS. Matt Fitzpatrick (talk) 04:16, 11 July 2016 (UTC)
Sorry to inform you that, even with !important, the default table cell padding of mobile view can't be overridden no matter what: same RDT map with BS-overlap/sandbox and BS-overlap under mobile view. You may ask @Edokter and Mr. Stradivarius the rationale for the compulsory padding. -- Sameboat - 同舟 (talk · contri.) 04:43, 11 July 2016 (UTC)
I don't think I've been involved with this one. Which compulsory padding are you talking about? — Mr. Stradivarius ♪ talk ♪ 05:06, 11 July 2016 (UTC)
@Edokter and Mr. Stradivarius: Precisely it's because of the "bs-overlap" class in {{BS-overlap}} which inherits ".content table.infobox td" and mandates "padding: .2em" under mobile view. I honestly have no idea where all these CSS classes locate under the mediawiki namespace. -- Sameboat - 同舟 (talk · contri.) 06:28, 11 July 2016 (UTC)
@Sameboat: I don't know... It worked for Module:Routemap (although it took a lot more than just one padding: 0 !important); except that in narrow windows (i.e. on most smartphones) all of the icons are left-aligned so they don't match up, and collapsing doesn't work. You might also need to modify some of the Superimpose templates. (Maybe change Mediawiki:Common.css and whatever the mobile CSS is?) Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:02, 11 July 2016 (UTC)
Also I think Edokter retired after his Main Page RFC, so it's probably best not to ping him. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:04, 11 July 2016 (UTC)
@Jc86035: Routemap doesn't use "bs-overlap" class hence it works for Routemap RDTs. If admins refuse to help, it just give us an extremely good reason to convert all remaining RDTs from BS-map to Routemap. -- Sameboat - 同舟 (talk · contri.) 09:36, 11 July 2016 (UTC)
No objection to that. Useddenim (talk) 10:26, 11 July 2016 (UTC)
@Sameboat, Jc86035, and Matt Fitzpatrick: This is starting to look like a request to update MediaWiki:Mobile.css. If that's the case, this request should perhaps be toggled...? It currently looks a bit unclear whether a change here will solve the mobile problem. — Andy W. (talk ·ctb) 23:24, 11 July 2016 (UTC)
No. This request can be closed now because there is a fix I've tested in {{BS-map/sandbox}} which just avoids infobox class altogether. -- Sameboat - 同舟 (talk · contri.) 23:32, 11 July 2016 (UTC)
Avoiding the infobox class would make sense - while route maps are often seen in the top-right corner of articles, they aren't the same thing as infoboxes. If you want specific styles for them, we can always style another class in MediaWiki:Common.css and/or MediaWiki:Mobile.css. Just ask. :) I've closed the request, but feel free to reopen it if necessary. Also, there's no problem with you closing requests yourself if they don't need implementing any more. — Mr. Stradivarius ♪ talk ♪ 23:44, 11 July 2016 (UTC)
@Mr. Stradivarius and Andy M. Wang: Please see Template:BS-map/testcases on mobile view. When the diagram is placed inside another infobox (usually {{infobox railway line}}), a very common practice, the padding: .2em again affects the diagram cellpadding. -- Sameboat - 同舟 (talk · contri.) 23:58, 11 July 2016 (UTC)
@Sameboat: I see another problem with the mobile view in that the number "2" is not larger in the sandbox version, but is in the live version. Don't know if that was intentional. If we are still experiencing problems with {{BS-map}}, I honestly suggest an update to the csses mentioned above. — Andy W. (talk ·ctb) 00:05, 12 July 2016 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────@Andy M. Wang: Previously I added "font-size:90%" to mimic infobox class in the sandbox version and then {{infobox railway line}} imposed another "font-size:90%" via the actual infobox class. In the live version the repeated infobox classes don't stack the font-size factors multiplicatively. I fixed it by voiding the initial "font-size:90%" when "inline" parameter is active.
Now the actual classes which mandate padding: .2em comes from .content table.infobox as I check with the "inspect elements" function of my browser. These CSS classes don't present on desktop view, so I have no idea where to make the request for reversing the damage caused by these classes. -- Sameboat - 同舟 (talk · contri.) 01:32, 12 July 2016 (UTC)

@Sameboat: I made some reasonable syncs of various live templates and sandbox calls for {{BS3-startCollapsible}} and {{BS3}}. Can you check Template:BS&WR route map/sandbox in mobile view and see if the issue has changed?
(Also, how sure are you that the original suggested change will not solve the problem? Sorry I still don't have enough context to tell where you arrived at that conclusion.)
As for the issue you might still be seeing, the only recent change to MediaWiki:Common.css is Special:Diff/728892313, which doesn't remotely look relevant. There hasn't been anything recent at MediaWiki:Mobile.css or Module:Infobox. The padding: 0.2em is coming from MediaWiki:Common.css (search .infobox), and looks like it's been there for a while. There doesn't seem to be an equivalent padding at MediaWiki:Mobile.css for .infobox. — Andy W. (talk ·ctb) 03:43, 12 July 2016 (UTC)
LOL. I didn't see that BS3/sandbox used live BS-overlap instead of the sandbox version. So yes, the edit request of BS-overlap should be reopened. -- Sameboat - 同舟 (talk · contri.) 03:46, 12 July 2016 (UTC)
I had a prejudice that !important wouldn't work because few years ago it indeed didn't work against mobile view class and then most participants just gave up on RDT on mobile view. -- Sameboat - 同舟 (talk · contri.) 03:50, 12 July 2016 (UTC)
"border: 0; padding: 0;" still looks fine to me in mobile view. "!important" still appears unnecessary. I don't see any "!important" border or padding declarations applied, so "border: 0; padding: 0;" gets priority because it's inline. Also, "!important" on an inline style is rarely — if ever — a good idea. Matt Fitzpatrick (talk) 04:47, 12 July 2016 (UTC)
Done. Ping if there are any issues. — Andy W. (talk ·ctb) 04:48, 12 July 2016 (UTC)
Re !important - what Matt Fitzpatrick said. The thing about !important is that it artificially increases the specificity of a CSS declaration - but a declaration applied through a style= attribute always has higher specificity than any declarations applied through style sheets, whether those declarations have selectors that match particular elements, classes, ids or some combination of those. See Selectors Level 3, 9. Calculating a selector's specificity, last line, which refers back to Cascading Style Sheets Level 2 6.4.3 Calculating a selector's specificity. --Redrose64 (talk) 07:57, 12 July 2016 (UTC)
@Sameboat: This edit is having adverse effects - RDTs are now sitting just to the left of infoboxes, instead of below them, and so are crushing the opening sections of articles like Monkton Combe Halt railway station. --Redrose64 (talk) 11:15, 14 July 2016 (UTC)
@Redrose64: Forgot to add "clear" attribute. This should fix its behavior in most articles. Now you can use "float" parameter to align the template to left or center without the "wrapped by another table" hack. -- Sameboat - 同舟 (talk · contri.) 11:27, 14 July 2016 (UTC)

{{BStext}} functionality in {{Routemap}}[edit]

Example (sandbox)
wide n
Bold font

(pinging Sameboat, Useddenim) I've added the functionality of the BStext series of templates to Module:Routemap/sandbox; {{BS4text|A|B|C|D}} = *A\*B\*C\*D. In addition, because the text formatting is confined to a single cell, text can be in the same row as icons, and can also be overlaid over icons (and vice versa). (Widths of d, b, c and cd can be added before the asterisk.) Comments? (Is this intuitive/simple enough, and should the asterisk be changed to something else?) Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:38, 18 July 2016 (UTC)

Brilliant! Potentially saved lot of unnecessary icons with text to be created. -- Sameboat - 同舟 (talk · contri.) 14:51, 18 July 2016 (UTC)
Any way of adding bold and italic options? Useddenim (talk) 16:53, 18 July 2016 (UTC)
Couldn't be simpler than using the usual wiki markup of bold or italic and you can add span style even though it's slightly complicating. -- Sameboat - 同舟 (talk · contri.) 03:46, 19 July 2016 (UTC)
@Sameboat and Useddenim: For the whole row, we could add it to the ~~bg=#123abc of the fifth tilde, apace-separated like HTML attributes (i=1, b=1 like BSsplit). Maybe also a --bg=#abc colour=#fff i=1 align=r valign=top for individual icons, text cells and overlays as well. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 12:34, 19 July 2016 (UTC)
Excellent idea! Useddenim (talk) 13:57, 19 July 2016 (UTC)