Wikipedia talk:Route diagram template/Archive 10

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

BSicon-name templates for use and BSicon-name templates for substitution

Part One

It seems clear now that quarrel {{BS-map}} versus {{routemap}} has evolved to a consensus similar to WP:ENGVAR. Let us quote MOS:RETAIN:

When an English variety's consistent usage has been established in an article, maintain it in the absence of consensus to the contrary. With few exceptions (e.g., when a topic has strong national ties or a term/spelling carries less ambiguity), there is no valid reason for such a change.
When no English variety has been established and discussion does not resolve the issue, use the variety found in the first post-stub revision that introduced an identifiable variety. The established variety in a given article can be documented by placing the appropriate Varieties of English template on its talk page.
An article should not be edited or renamed simply to switch from one variety of English to another. The {{subst:uw-lang}} template may be placed on an editor's talk page to explain this to him or her.

This has consequences for all the templates {{BSicon-name}} and {{BSicon-name-2}}. They were written circa 2007. Many years after, the {{routemap}} system was introduced (circa August 2015). This system is equivalent to replacing an interpreted language by a compiled one, and most of the compilation of older maps is done by substituting the {{BSicon-name}} and {{BSicon-name-2}} templates. The semantic is therefore:

Replace {{BSicon-name|args}}  by {{subst:BSicon-name/safesubst|args}}

where {{BSicon-name}} is the template usually used for {{BS-map}}, and {{BSicon-name/safesubst}} is a specifically rewritten form of {{BSicon-name}}. In a context where the routemapers were trying to force the transition and suppress the {{BS-map}} format, this was done by simply masking the older {{BSicon-name}} by the newer {{BSicon-name/safesubst}}. But this has resulted into:

  1. the overflow of some maps (this was the original reason of why I come here).
  2. a greater latency of all the operations involving the {{BS-map}}, since the {{BSicon-name/safesubst}} is far more complicated than the simple {{BSicon-name}}.

In the context of the actual MOS:RETAIN-like consensus, it would make sense to restablish the older {{BSicon-name}} templates ... and, obviously, save the safesubst version into newly created {{BSicon-name/safesubst}} templates to allow compilations. This would look like the pair: {{BS11}}, {{BS11/safesubst}}. Doing that for n=11 was not conflictual since the BS11 template was never rewritten into the safesubst format. Its is clear that this should not be done to the n<11 series nor to the BSicon-name-2 series without a prior general consensus. What is your opinion about ? (Obviously, I will do the practical implementation, if/when the decision is taken). Pldx1 (talk) 10:18, 23 March 2016 (UTC)

  • Oppose separating out the template into a template that can be safesubst'd and a template that cannot. There is no practical reason to have two versions of the same template just to make it harder to safesubst in the future if there ever emerges a consensus to deprecate BS-map (or if editors care to move over to the more resource efficient system). ~ RobTalk 16:13, 23 March 2016 (UTC)
  • Dear User:BU Rob13. An informal discussion is for discussing, not for immediately dividing people into opposite sides. Saying there is no practical reason to have two versions of the same template appears as a logical fallacy since {{BSicon-name}} and {{BSicon-name/safesubst}} have not the same functionality. The former is used when rendering a {{BS-map}}. The later is used as a part of a compilation process, that translates a {{BS-map}} into a precompiled {{Routemap}}. If we check the details of the {{BS9/safesubst}} template, we can see that, beside the 9 {{#if: constructs that were already in the original {{BS9}} template, there are 55 additional {{ {{{|safesubst:}}}#if: constructs required by the translation process (and useless for the rendering process). This has obviously a large influence over the efficiency of the rendering process... and is the sole and unique cause for the overflow of several templates. This was perhaps making sense when hoping to win a blitz campaign against the {{BS-map}} family of templates. But the facts are here: like for VisualEditor, MediaViewer, SuperProtect, Flow, Gather and so on, the best method to sink down a piece of software is trying to enforce it's use onto the regular users of the previous piece of software.Pldx1 (talk) 09:17, 24 March 2016 (UTC)
Comment: I like the idea of there being an easy, automated way to convert a {{BS-map}} to a {{Routemap}} template. However, as noted above, it should be a deliberate choice, not something forced onto editors. Also, I'm sure that BU Rob13 and Pldx1 thoroughly understand what they are talking about, but a summary in plain English would be useful for the rest of use.
Note also the related discussions at Wikipedia:Templates for discussion/Log/2016 March 14#Route diagram templates and Template talk:Medway watermills diagram. Useddenim (talk) 10:32, 24 March 2016 (UTC)
Is this an informal discussion, Pldx1? It reads like a merge request. Useddenim, when you substitute a template, it just throws the gibberish that often makes up the full template source onto the page. So if I used a bunch of parser functions or other templates within the source of a template I was substituting, that mess of crap would be substituted on the page. Enter safesubst. If you precede each use of a parser function/template within the source code with safesubst, then substituting the overall template will not only substitute the source code, but also substitute each of the parser functions/other templates. Instead of throwing up all over the article with a bunch of ifeq functions and such, you'll wind up with a simpler code (whatever the end result being rendered is, usually, unless there were templates-within-templates-within-templates being used, which would require you to go another level deep and add safesubst: to the templates-within-templates). Hopefully this was at least somewhat helpful to make sense of this. I'll circle back around after my morning class and respond to Pldx1's point above. ~ RobTalk 11:40, 24 March 2016 (UTC)
  • Dear User:Useddenim. Yes, I agree that a fruitful discussion should start by defining our terms, using a sufficiently plain English to allow an agreement about what is the question to be answered.
    1. When I say compile A into B , my intent is to say: translate A into B, use B in the applications, but keep A as the reference document. This means that modifying B must only be made by modifying A (the source) and compiling A again to obtain the new B.
    2. When I say replace A by B , my intent is to say: translate A into B and then burn A. Therefore, use B in the applications, but also use B as the reference document. This means that modifying B will be made directly on the B code (since A is no more existing overwritten).
    3. Let us take the map {{West_Coast_Main_Line}} as an example. This template was created 23 April 2006 and, since, 50 users have made at least one contribution to this template. Replacing in brute force would tell them to learn the new language or to stay away. This shouldn't be done (and I know that this not what you are proposing). At least, we have to be sure that it will remain a sufficient number of people to take care of the map in a foreseeable future.
    4. I have examined the evolution of this map across the ages. This leads to User:Pldx1/Bs-map/WCML/test. Some icons have been suppressed, they are in yellow in my graph. Some templates have been suppressed too, after deletion discussions that left no indication of their functionality. In this specific case, this was not too difficult to guess, but this remembers us that too much templates deletion would suppress the useability of the history. Pldx1 (talk) 15:16, 24 March 2016 (UTC) .
  • Support. Wouldn't take much time to create the new safesubst templates (just copy and paste) and then amend the documentation of Routemap. -- Sameboat - 同舟 (talk · contri.) 12:16, 24 March 2016 (UTC)
Sure. A question: most of the BSicon-name templates are using lines like
{{BS-overlap|border={{{border|}}}|{{{PX3|{{#if: {{{PX|}}}|{{{PX}}}|{{BSpx}}}}}}}|{{{3|}}}|{{{O3|}}}|{{{O32|}}}|{{{O33|}}}|{{{O34|}}}|{{{O35|}}}|link={{{L3|file:}}}|alt={{{alt3|#default}}}}}
but BS11 isn't using the alt= while BS9 isn't transmitting the border= parameter. Maybe this should be uniformized. Moreover, BS1 (i.e. BS), BS2,BS3,BS4 are transmitting pad2= while the other (n>4) aren't. Is there any known reason for that ? Best regards. Pldx1 (talk) 15:33, 24 March 2016 (UTC)
@Sameboat and Pldx1: {{BS-overlap}}'s |alt= was apparently removed through a talk-page discussion concerning accessibility, so it would make sense that BSn templates made after that discussion wouldn't have that parameter. The template also never had |border=, so not sure why that's there. As for |pad2=, that was added by Frietjes in October 2013 to the first four but not any others for some reason. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:31, 25 March 2016 (UTC)
  • @Pldx1: I can appreciate the concern about overflow. My main concern is that years down the line, as current editors step away and newer editors adopt {{Routemap}}, these are all going to go to TfD and be merged into Routemap. This has happened at other WikiProjects in the past, so as much as you think Routemap is never going to be the next big thing, I expect it to happen eventually. At that point, this type of split could mean a whole lot of extra work added onto the perpetual backlog at WP:TFD/H. I would not oppose the split, provided I receive two assurances:
    1. Someone is going to keep these two templates in sync. The two templates should have identical parameters at all times.
    2. Should (1) fail to happen, someone from this project will do the work (which would include a bot run, likely) to reconcile these two templates, not someone working on the backlog at WP:TFD/H. ~ RobTalk 15:53, 24 March 2016 (UTC)


Homework, as required by User:BU Rob13


nummax=115 # (i.e.  n<15)

##----------------- old ----------------------------------------------------------------------- computing the old BSicon-name

for ((numbo=101; numbo<$nummax; numbo++)) ; do 
  num=$(($numbo-100)) ; vers="tmp_BS${numbo:1:2}-old.txt"
  echo -n "<includeonly>" > $vers
  if test $num -lt 12 ; then prefo="O"; else prefo="O0"; fi

cat <<EOF >> $vers
{{BSrow
|1={{BS-overlap|{{{PX|{{BSpx}}}}}|{{{1|}}}|{{{${prefo}1|}}}|{{{${prefo}12|}}}|{{{${prefo}13|}}}|{{{${prefo}14|}}}|{{{${prefo}15|}}}|link={{{L1|file:}}}|alt={{{alt1|#default}}}}}
EOF

  for ((i=2;i<=$num;i++)); do
    if test $num -lt 12 -o $i -gt 9 ; then prefo="O"; else prefo="O0"; fi
cat <<EOF >> $vers
{{BS-overlap|{{{PX$i|{{#if: {{{PX|}}}|{{{PX}}}|{{BSpx}}}}}}}|{{{$i|}}}|{{{$prefo$i|}}}|{{{$prefo${i}2|}}}|{{{$prefo${i}3|}}}|{{{$prefo${i}4|}}}|{{{$prefo${i}5|}}}|link={{{L${i}|file:}}}|alt={{{alt${i}|#default}}}}}
EOF
  done
  
cat <<EOF >> $vers
|2={{{$(($num+1))|}}}
|3={{{$(($num+2))|}}}
|4={{{$(($num+3))|}}}
|5={{{$(($num+4))|}}}
|bg={{{bg|}}}
|HI={{{HI|}}}
|km={{{km|}}}
|tw={{{tw|}}}
}}</includeonly><noinclude>{{doc}}</noinclude>
EOF

done

##------------------ safesubst ----------------------------------------------------------------- computing the new BSicon-name

for ((numbo=101; numbo<$nummax; numbo++)) ; do 
  num=$(($numbo-100))
  vers="tmp_BS${numbo:1:2}-safesubst.txt"

  sepsep=""
  echo "<includeonly>" > tmp_vers
  for ((i=1;i<=$num;i++)); do
    if test $num -lt 12 -o $i -gt 9 ; then prefo="O"; else prefo="O0"; fi
    cat <<EOF >> tmp_vers
$sepsep{{{$i|}}}
{{#IF:{{{$prefo${i}|}}}|!~{{{$prefo${i}|}}} }}
{{#IF:{{{$prefo${i}2|}}}|!~{{{$prefo${i}2|}}} }}
{{#IF:{{{$prefo${i}3|}}}|!~{{{$prefo${i}3|}}} }}
{{#IF:{{{$prefo${i}4|}}}|!~{{{$prefo${i}4|}}} }}
{{#IF:{{{$prefo${i}5|}}}|!~{{{$prefo${i}5|}}} }}
EOF
    sepsep='\'
  done
  
cat <<EOF >> tmp_vers
{{#IF:{{{$(($num+1))|}}}{{{km|}}}{{{$(($num+2))|}}}{{{$(($num+3))|}}}{{{$(($num+4))|}}}{{{bg|}}}
|
  {{#IF:{{{$(($num+1))|}}}{{{km|}}}{{{$(($num+3))|}}}{{{$(($num+4))|}}}{{{bg|}}}
  |
    {{#IF:{{{$(($num+2))|}}}
    |
      {{#IF:{{{$(($num+1))|}}}{{{km|}}}
      |~~{{{$(($num+1))|{{{km|}}}}}}~~{{{$(($num+2))|}}}
      |~~ ~~{{{$(($num+2))|}}}
      }}
    |
      {{#IF:{{{$(($num+1))|}}}{{{km|}}}|~~{{{$(($num+1))|{{{km|}}}}}}~|~~ ~}}
      {{#IF:{{{$(($num+3))|}}}
      |~ ~
      |
        {{#IF:{{{$(($num+4))|}}}
        |~ ~~ ~
        |{{#IF:{{{bg|}}}|~ ~~ ~~ ~}}
        }}
      }}
      ~
    }}
    {{#IF:{{{$(($num+3))|}}}
    |
      {{#IF:{{{$(($num+2))|}}}|~~}}
      {{{$(($num+3))|}}}
      {{#IF:{{{$(($num+4))|}}}
        |~~{{{$(($num+4))|}}}{{#IF:{{{bg|}}}|~~bg={{{bg|}}} }}
        |{{#IF:{{{bg|}}}|~~ ~~bg={{{bg|}}} }}
        }}
    |
      {{#IF:{{{$(($num+4))|}}}
      |
        {{#IF:{{{$(($num+2))|}}}|~~ ~~}}
        {{{$(($num+4))|}}}{{#IF:{{{bg|}}}|~~bg={{{bg|}}} }}
      |
        {{#IF:{{{bg|}}}
        |
           {{#IF:{{{$(($num+2))|}}}|~~ ~~ ~~}}
           bg={{{bg|}}}
        }}
      }}
    }}
  |
    ~~{{{$(($num+2))|}}} 
  }} 
}}</includeonly><noinclude>{{doc}}</noinclude>
EOF

  sed tmp_vers -e "s¶^[ ]*¶¶ ; s¶{{#IF:¶{{{{{|safesubst:}}}#if:¶ " | tr -d "\n" | sed -e " s¶}}} }}¶}}}}}¶g; s¶}}} }}¶}}}}}¶g " > $vers
  echo "" >> $vers 

done

##---------------------------------------------------------------------------------------- 

Pldx1 (talk) 23:23, 24 March 2016 (UTC)


  • Support (as the editor who added the substitution to most of the templates). {{BS-map}} is still used by the overwhelming majority of diagrams, and moving substitution of BSn templates to separate templates speeds up loading time for it. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:57, 25 March 2016 (UTC)

Question: |border=, |bg=, |HI=, |km=, |tw=, |alt= are discarded when compiling a {{BSicon-name}} command. Are they useful at this level in a BS-map ? Pldx1 (talk) 23:23, 24 March 2016 (UTC) Specifying the question. The context was quite clear, at least for Jc86035, but better be sure. Pldx1 (talk) 11:14, 25 March 2016 (UTC)

@Pldx1: I didn't include these parameters in the substitution because they are almost never used (and also because I couldn't be bothered to figure out how to put them in). |border= is not used by {{BS-overlap}} and shouldn't be needed. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:39, 25 March 2016 (UTC)
@ User:Jc86035. This question is important. I should haven't put it in the divhide box, my bad for that. @ all. I have the same impression about |border=, HI=, |km=, and |alt=. Concerning |tw=, I have the impression to have seen this parameter at the beginning of some collapsible sub-bloc, but I don't remember where... and may be this was only reflecting an intention, not an efficient command. Concerning |bg=, ???. If someone ever used these parameters in a {{BSicon-name}} command (rather than at map level), it would be great to say so (and where)... Best regards. Pldx1 (talk) 11:08, 25 March 2016 (UTC)
Additional question: what is the use of |link=file:  ? Pldx1 (talk) 11:28, 25 March 2016 (UTC)
@Pldx1: |bg= is used in {{SkyTrain (Vancouver)}} to show fare zones. As for the rest, I'm not sure but we could create tracking categories for them. (I hesitate to do that right now, because it would increase page loading time for every {{BS-map}} diagram.) Not sure about |link=, but the file: is paired with another one {{BS-overlap}} inside an {{#ifeq: }} bracket, which was probably used because no one would link to that. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 16:12, 25 March 2016 (UTC)
Homework, part two: BS-2 templates


##------------------ old-2 --------------------------------------------------------------- computing the old BSicon-name-2

function bs-double (){

  if test $num -lt 11 ; then prefo="O" ; else prefo="O0"; fi
  
  cat <<EOF >> $vers
{{BSrow-2
|1={{BS-overlap|{{{PX|{{BSpx}}}}}|{{{1|}}}|{{{${prefo}1|}}}|{{{${prefo}12|}}}|{{{${prefo}13|}}}|{{{${prefo}14|}}}|{{{${prefo}15|}}}|link={{{L1|file:}}}|alt={{{alt1|#default}}}}}
EOF

  for ((i=2;i<=$num;i++)); do
    if test $num -lt 11 -o $i -gt 9 ; then prefo="O" ; else prefo="O0"; fi
  cat <<EOF >> $vers
{{BS-overlap|{{{PX$i|{{#if: {{{PX|}}}|{{{PX}}}|{{BSpx}}}}}}}|{{{$i|}}}|{{{${prefo}$i|}}}|{{{${prefo}${i}2|}}}|{{{${prefo}${i}3|}}}|{{{${prefo}${i}4|}}}|{{{${prefo}${i}5|}}}|link={{{L${i}|file:}}}|alt={{{alt${i}|#default}}}}}
EOF

  done

cat <<EOF >> $vers
|2={{{$(($num+1))|}}}
|3={{{$(($num+2))|}}}
|4={{{$(($num+3))|}}}
|5={{{$(($num+4))|}}}
|6={{{$(($num+5))|}}}
|bg={{{bg|}}}
|HI={{{HI|}}}
|km={{{km|}}}
|tw={{{tw|}}}
|tw-left={{{tw-left|}}}
$closequote</includeonly><noinclude>{{doc}}</noinclude>
EOF
}

for ((numbo=101; numbo<$nummax; numbo++)) ; do 
  num=$(($numbo-100))
  vers="tmp_BS${numbo:1:2}-2-old.txt"
  closequote="}}"
  echo -n "<includeonly>" > $vers
  bs-double
  
  diff -s $vers ../BSicon-name-tmp/$vers

done

##------------------ safesubs-2 --------------------------------------------------------------- computing the new BSicon-name-2

for ((numbo=101; numbo<$nummax; numbo++)) ; do 
  num=$(($numbo-100))
  vers="tmp_BS${numbo:1:2}-2-safesubs.txt"

  cat <<EOF > $tmp_vers
<includeonly>
EOF
  cat <<EOF >> $tmp_vers
{{#IF:{{{$(($num+1))|}}}{{{$(($num+3))|}}}
|
  {{#IF:{{{$(($num+3))|}}}
  |
    {{{$(($num+3))|}}}~
    {{#IF:{{{$(($num+1))|}}}
    |
      ~{{{$(($num+1))|}}}~
    |
      ~ ~
    }}
    ~! !
  |
    {{{$(($num+1))|}}}! !
  }}
}}
EOF
  sepsep=""

  for ((i=1;i<=$num;i++)); do
    if test $num -lt 11 -o $i -gt 9 ; then  prefo="O"; else prefo="O0"; fi
    cat <<EOF >> $tmp_vers
$sepsep{{{$i|}}}
{{#IF:{{{$prefo${i}|}}}|!~{{{$prefo${i}|}}} }}
{{#IF:{{{$prefo${i}2|}}}|!~{{{$prefo${i}2|}}} }}
{{#IF:{{{$prefo${i}3|}}}|!~{{{$prefo${i}3|}}} }}
{{#IF:{{{$prefo${i}4|}}}|!~{{{$prefo${i}4|}}} }}
{{#IF:{{{$prefo${i}5|}}}|!~{{{$prefo${i}5|}}} }}
EOF
  
  sepsep='\'
  done

cat <<EOF >> $tmp_vers
{{#IF:{{{$(($num+2))|}}}{{{$(($num+4))|}}}{{{$(($num+5))|}}}{{{bg|}}}
|
  {{#IF:{{{$(($num+4))|}}}{{{$(($num+5))|}}}{{{bg|}}}
  |
    {{#IF:{{{$(($num+2))|}}}
    |~~ ~~{{{$(($num+2))|}}}
    |
      ~~ ~
      {{#IF:{{{$(($num+4))|}}}
      |~ ~
      |
        {{#IF:{{{$(($num+5))|}}}
        |~ ~~ ~
        |{{#IF:{{{bg|}}}|~ ~~ ~~ ~}}
        }}
      }}
      ~
    }}
    {{#IF:{{{$(($num+4))|}}}
    |
      {{#IF:{{{$(($num+2))|}}}|~~}}
      {{{$(($num+4))|}}}
      {{#IF:{{{$(($num+5))|}}}
        |~~{{{$(($num+5))|}}}{{#IF:{{{bg|}}}|~~bg={{{bg|}}} }}
        |{{#IF:{{{bg|}}}|~~ ~~bg={{{bg|}}}}}
        }}
    |
      {{#IF:{{{$(($num+5))|}}}
      |
        {{#IF:{{{$(($num+2))|}}}|~~ ~~}}
        {{{$(($num+5))|}}}{{#IF:{{{bg|}}}|~~bg={{{bg|}}} }}
      |
        {{#IF:{{{bg|}}}
        |
          {{#IF:{{{$(($num+2))|}}}|~~ ~~ ~~}}
          bg={{{bg|}}}
        }}
      }}
    }}
  |~~{{{$(($num+2))|}}}
  }}
}}</includeonly><noinclude>{{doc}}</noinclude>
EOF

  sed $tmp_vers -e "s¶^[ ]*¶¶ ; s¶{{#IF:¶{{{{{|safesubst:}}}#if:¶g " | tr -d "\n" | sed -e " s¶}}} }}¶}}}}}¶g; s¶}}} }}¶}}}}}¶g " > $vers

done

Pldx1 (talk) 11:28, 25 March 2016 (UTC)

I'm not 100% sure what you're doing in the homework because the code is extremely complicated and I don't know its context, but I suspect that it's unnecessary. I'm not asking you to do anything now. I'm just saying that if we split templates into BSicon-name and BSicon-name/safesubst, you (or some other editor/editors from this WikiProject) should maintain them in tandem. In other words, if you decide in a year to add the parameter {{{trainsarecool}}} to BSicon-name, you should also add it to BSicon-name/safesubst in whatever manner is appropriate. Does that make sense? I just don't want the two templates to grow into something that's a mess to reconcile. If there's existing differences between, say, BS2 and BS3, that is an entirely separate issue. It would be best practices for someone to reconcile them, but that's something entirely separate from what we're discussing here. ~ RobTalk 12:05, 25 March 2016 (UTC)

Dear User:BU Rob13. There are 56 templates to deal with: four kinds of templates (BSicon-name, BSicon-name-safesubst, BSicon-name-2, BSicon-name-2-safesubst) and 14 values for n. Therefore, instead of doing everything by hand, a better idea was to create a program that will do the job for us. For myself, who is rather a newbie here, providing such small piece of unix code that reproduces all the existing templates was also an occasion to be sure that I have correctly understood how these templates are written. Moreover, having such an automated process at hand, makes it more credible to think that at least one of us (=me, or any one else) will be able to do the job. Adding a parameter would only require to change one line in each of the already written four models: not a big deal. Pldx1 (talk) 17:03, 25 March 2016 (UTC)

@Pldx1: Could you finalize the scripts to include the other parameters? (km is an alias for 2; @Sameboat: is it possible to add width for the text columns in {{Routemap}}?) This proposal hasn't received a large amount of opposition (3–1; this page is watched by over 130 people) so there shouldn't really be any problems with carrying it out. (Pinging Useddenim and BU Rob13.) Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 02:44, 27 March 2016 (UTC)

You lost me, but I thought {{{text-width}}} already serves the purpose. What else is lacking? -- Sameboat - 同舟 (talk · contri.) 03:21, 27 March 2016 (UTC)
@Jc86035: On the topic of my "oppose", you can more-or-less pencil me in as a supporter provided that someone from outside the very limited number of people working at TfD (essentially me and one other person, at this point) aren't going to do the work if these ever are merged in the future. We generally don't have redundant templates on the project because of the high maintenance and potential merger costs of doing so, but if you're willing to "pay" those costs and handle that work in an ongoing manner, then I'm not going to make a fuss. Better things to do, etc. ~ RobTalk 03:25, 27 March 2016 (UTC)
@Sameboat: Oh, never mind then; I didn't notice that that parameter existed.
@Pldx1: Searching shows that |tw-left= and |tw= are only used at WP:RDT, Template:BS-map (and subpages), Template:BS3-replace and Template:BS-header/safesubst; and |HI= [1] and |km= [2] are not used anywhere, so we only need to modify the scripts for |bg=. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 06:56, 27 March 2016 (UTC)
Maybe I'm who's missing something but |tw-left= and |tw= are used, particularly when there are collapsible sections, to ensure uniform text column width. (|tw-left= is for the {{BS-2}} templates.) Useddenim (talk) 16:42, 27 March 2016 (UTC)
{{{tw-left}}} is replaced by {{{tw}}} as well in Routemap. This parameter shouldn't be specific to one row due to pointless overriding by greater value. -- Sameboat - 同舟 (talk · contri.) 02:58, 28 March 2016 (UTC)

Parameters to keep or not ?

Q1. May I summarize the discussion as follows ? Concerning rows, i.e. BSicon-name and BSicon-name-2 templates:

  1. |HI=, |km= suppressed as unused alias. |altn=, |border= suppressed as unused parameters. |tw=, |tw-left= suppressed as not used here (their place is inside the global templates, i.e. {{BS-map}} and {{routemap}}).
  2. |bg= is in use (e.g fare zones), and should be taken into account when compiling to {{routemap}} format (see WP:Route diagram template)
  3. |link=, |pad2= : not so clear
  4. |PX= . What to do with this parameter that allows to change the global size of an icon (see WP:Route diagram template)

I have posted the tentative templates relative to n=5 at {{BS5/sandbox}}, {{BS5/safesubst}}, {{BS5-2/sandbox}}, {{BS5-2/safesubst}}. Please note that the four of them were not the active templates, so that everything remains in proposal state. The two safesubst are not taking |bg= into account. You are welcome (I have no clue about being efficient here). Pldx1 (talk) 09:16, 29 March 2016 (UTC)

R1. A more thorough search shows that |HI= [3] does have 2 uses (negligible), |km= [4] has none, |pad2= [5] has several, |link= [6] has none, and |PX= [7] has about ten (entirely aesthetic and unnecessary) uses. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:21, 29 March 2016 (UTC)
Dear User:Jc86035. In your reply at 13:21, 29 March 2016, you were answering to all of my four questions in a single move. I have split your answer in four parts (with attribution), because I think this is more clear that way. Feel free to revert if you disagree. Concerning the |HI=, I have changed and commented the corresponding pages, saying <!-- parameter HI= class="hintergrundfarbe7" not rendered and deprecated -->. Now, this one can be killed safely in the BSicon-name and BSicon-name-2. Some {{{Hi}}} are remaining in some {{BS-colspan}}, but this is another story. Pldx1 (talk) 11:10, 30 March 2016 (UTC)

Documentation

Q2. Another question. All these 56 templates (4 flavours, n from 1 to 14) deserve a doc. Obviously they should be linked to the same one instead of being written separately. I already have written one, see {{BS5/safesubst/doc}}. Opinions ? Pldx1 (talk) 10:09, 29 March 2016 (UTC)

R2. Pldx1, the documentation you wrote makes sense but I feel the history of the templates is redundant; just usage instructions would be sufficient. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:21, 29 March 2016 (UTC)

Naming scheme: is 11 small or big ?

Q3. Another question. About the naming scheme. Using O012 (Oh-zero-one-two) is required to distinguish O(12)(0) from O(1)(2). Using O011 (Oh-zero-one-one) is not required to distinguish O(11)(0) from O(1)(1) since the later is written O1 (Oh-one). From reading the docs, I am not sure if the new naming scheme is to be applied when n=11 (this is not required, but it looks as if this was decided, or proposed, or ?). I have no opinion, except from requiring for a more normative statement. Pldx1 (talk) 10:09, 29 March 2016 (UTC)

R3. @Pldx1, Sameboat, Useddenim, and BU Rob13: Don't think {{BS11}} needs any parameter changes now. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:21, 29 March 2016 (UTC)
Dear User:Jc86035. I don't propose to change anything to template {{BS11}}. But I would prefer to have a more clear and normative documentation. When saying for n=12, O012 (Oh-zero-one-two) is required because ... the doc says this is *required*. Great and clear. The doc says quite clearly that n<11 uses the old scheme. Great and clear too. Now it remains n=11. We should state either that for n=11, the new scheme was not logically required, but was nevertheless enforced, starting at this n=11 value or for n=11, the new scheme was not logically required, and therefore it was decided to use the old scheme. To tell it otherwise, I am not asking to change the n=11 rule, I am asking to state more clearly what is the n=11 rule. Pldx1 (talk) 13:48, 29 March 2016 (UTC)
@Pldx1: Probably that since there's no conflict in the parameter names, {{BS11}} uses the original scheme. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 14:08, 29 March 2016 (UTC)
Dear User:Jc86035. From my own explorations, no one uses Opq parameters inside of an existing {{BS11}} call, so this doesn't force any decision. But these parameters are used inside some existing {{BS11-2}} calls. And they are using the big format: this is the way someone has written this template. So this is a stare decisis case, and I have modified the WP:Route diagram template documentation, and the {{BS11}} template accordingly. Pldx1 (talk) 12:00, 4 April 2016 (UTC)

Size of main text in routemap

Q4. Another question. At User:Pldx1/Bs-map/Hudson Line (Metro-North)/test we have (left) a BS-map and (right) it's associated routemap. It seems that, in the routemap, the [hide/show] button is in the third column (instead of being in the fourth). Moreover, it seems that all parts of text are rendered with the same font size, instead of having text2 in full size (and text1,text3,text4 reduced). Did I miss something ? Pldx1 (talk) 13:06, 29 March 2016 (UTC)

@Pldx1, Sameboat, Useddenim, and BU Rob13: I'm not sure why {{Routemap}}'s formatting is different; it may be a deliberate change by Sameboat or maybe due to a mistake in edits to Mediawiki:Common.css. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:21, 29 March 2016 (UTC)

Remarks about BSrow

Simplifying the BSicon-name and BSicon-name-2 could induce some simplifications of BSrow.

about BSrow Pldx1 (talk) 07:35, 30 March 2016 (UTC)

     1 CR þ-
     2 CR þ style="padding:0; <!--white-space:nowrap-->; background-color:{{{bg|transparent}}}; text-align:center !important; width:0px; border: 0px !important"
     3    þ
     4      CR {| cellspacing=0 cellpadding=0 style="background-color:transparent; float:none !important; margin:auto !important; width: auto !important; line-height: 0px !important; text-align:left; padding:0 !important;"
     5         CR |-
     6         CR {{{1|{{!}}<span style{{=}}"color:red">[[Template:BSrow]] missing parameter 1</span>}}}
     7      CR |}
     8 CR þ style="text-align:right; vertical-align:middle; padding:
     9      {{#if:{{{km|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}
    10      | {{#if:{{{pad2|}}}
    11        |0 {{{pad2}}} 0 3px
    12        |0 3px
    13        }}
    14      |0
    15      }} !important; font-size:90%; border: 0px !important" {{{HI|}}}
    16    þ {{#if: {{{km|}}}
    17      |  {{{km}}}
    18      |  {{#if:{{{2|}}} |{{{2}}}}}
    19      }}
    20 CR þ {{#if: {{{5|}}}||colspan="2"}}
    21      {{#if:{{{tw|}}}|width={{{tw}}}}}
    22      style="text-align:left; vertical-align:middle; padding:0; white-space:nowrap; border: 0px !important;"
    23    þ {{#if:{{{3|}}}|{{{3}}}}}                                      
    24      <span style="font-size:90%;padding-left:3px">{{#if:{{{4|}}}|{{{4}}}}}</span>
    25      CR {{#if: {{{5|}}}                                              
    26         | {{!}} style="text-align:right; vertical-align:middle; padding-left:3px; font-size:90%; <!--white-space:nowrap-->; border: 0px !important;"
    27           {{!}}{{#if:{{{5|}}}|{{{5}}}}}                               
    28         }}
  1. There are "|" coding for parameter separation inside a template. They are represented here as "|", i.e. rendered as is. There are "|" that are part of a table construct. Inside a template, they are coded by {{!}} for the convenience of the computer. Outside of a template, I coded them by "þ" for my own convenience (and maybe of some other readers)
  2. (was missing, thanks to User:Jc86035 for the correction). Moreover, in this listing, there are cosmetic newlines (for helping the reader) and required newlines (that must remain in the code of the template). The later are shown as CR.
  3. Thus, we are creating four columns: picture, param2, param3+param4, and param5. It is important to note that param3 and param4 are displayed in the same column (with different sizes).
  4. Lines 16,17,18,19 are dealing with parameter |km=. This can be simplified into only line 18 (without the introducing "|").
  5. Constructs {{#if:{{{n|}}}|{{{n}}}}} at lines 18, 23, 24, 27 should be replaced by {{{n|}}}. These constructs are here to take into account the "CR malediction" that occur when the text parameters are poorly coded. For example {{BSkm}} and {{split}} are constructing a cell. Thus they should start by a CR (carriage return) for the initial "{|" to be correctly interpreted. But most of the transcluded templates generate an ending CR. And when put side by side, this gives two CD in sequence, and therefore a blank line is displayed. Thus we need to protect the CR at {{split}} by a void construct like <span></span>. And then BSrow can be simplified.
  6. This would suppress FOUR "if" constructs by row in any BS-map... A great move, isn't it ?
@Pldx1: For #5, could this be simplified further by just removing the carriage returns in both {{BSrow}} and the BSn templates? Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:02, 30 March 2016 (UTC)
@Jc86035:. You are right, the "explanatory" listing that I gave just above was slightly misleading. There were a mix of cosmetic new lines (added to highlight the structure) and required new lines (that must remain in the code of the template). I have corrected my listing by using explicit CR for the required newlines. And now we can see that, if something must be changed about the CR's in {{BSrow}}, this is the CR at line 25. This one is useless if {{{5}}} is missing. The CR should be inside the "if", protected, just before the first {{!}}. But I am not sure this should be done now (may be there are other "CR maledictions"...) Pldx1 (talk) 10:57, 30 March 2016 (UTC)
Moreover, we have strange situations like {{Nilgiri Mountain Railway}} where the cell "text2 (main text) + text3 (additional text) " has two different renderings when viewed in Konqueror or in Firefox. This behavior is not changed after compilation into {{routemap}}, see User:Pldx1/Bs-map/Nilgiri Mountain Railway/test. Therefore, the strange constructions {{#if:{{{n|}}}|{{{n}}}}} should not be simplified below {{#if:1|{{{n}}}}}. These constructs are intended to safeguard the parameters against the "CR malediction" or any other trouble of the BS-system. But if we have to suspect troubles with the *.css files, better be over-prudent. Pldx1 (talk) 10:07, 1 April 2016 (UTC)
@Pldx1: The weird rendering is because someone decided to use {{right}} inside the diagram to save space (since both the left-aligned and right-aligned text are inside text2); this kind of thing caused a lot of problems after the site-wide font size change last year. It's not in the documentation and should probably be replaced with standard formatting. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 11:09, 1 April 2016 (UTC)
That 'someone' was me, and is now fixed. Useddenim (talk) 17:16, 1 April 2016 (UTC)
  • But 'someone' was legitimate when doing so. The abstraction that is given at {{BS-map}} is a four columns table: Left_text, Icons, Right_text, Comment for a BSicon-name-2 row or Icons, Margin, Right_Text, Column for a BSicon-name row. The fact that a Right_text cell doesn't behave like a cell is a failure of the implementation. For the moment, the culprit is not obvious: this could be some coding here (unlikely since BS-map and routemap are affected), or at the skin level (*.css) or at the browser level (some of them are known to be crappy). We have a similar problem with collapsed sections when using {{routemap}}. Pldx1 (talk) 12:12, 6 April 2016 (UTC)

@Pldx1:, maybe you could open an RFC on these changes, since these changes would affect several thousand articles? Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 15:17, 15 April 2016 (UTC)

Dear User:Jc86035. For the moment, I am only exploring what are the actual differences in behavior between the {{BS-map}} familly of templates and the {{routemap}} module. Some of these differences seems to be caused by external problems (*.css, skins and the like). This has to be explored with more details before building technical proposals and sumbitting them to an RfC. Best regards. Pldx1 (talk) 15:36, 15 April 2016 (UTC)

@Pldx1: Could you run the scripts to standardise the BSn and BSn-2 templates (with the /safesubst subpages)? Right now, as only some of them have the subpages, it might be confusing for editors trying to substitute them. Thanks, Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 14:28, 30 May 2016 (UTC)

And I thought it was something I was doing wrong that caused the occasional line of code to not be transcribed… Useddenim (talk) 23:48, 1 June 2016 (UTC)
@Useddenim and Pldx1: I've added |km= and |bg= to the scripts for generating BSn and BSn-2 templates. |link= could be added (by adding {{#if:{{{link|}}}|!@{{{link}}} }} after every icon space) but I'm not sure how much use that would be. The rest of the parameters would require modification of Module:Routemap to be added. I'm not sure what language it's in so I can't run the scripts or test if they actually work properly. (There are probably parts – especially with the tildes – which could be made more efficient, but again I can't actually run the script.) Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 08:57, 2 June 2016 (UTC)
@Useddenim: FYI Sameboat has implemented a substitution script for both {{BS-map}} and {{BS-table}} + {{Railway line header}} maps (see Template:Routemap documentation).
@Pldx1: How does one run the scripts? Thanks, Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 15:16, 4 June 2016 (UTC)
@Jc86035: I don't think I have the energy to analyze between {{BS}} and {{BS/safesubst}} and do the same for BSicon-name-2 templates, but I think it's safe to just copy the amended code from BSicon-name-2 root template to safesubst sub-template. -- Sameboat - 同舟 (talk · contri.) 01:36, 5 June 2016 (UTC)

Mobile View

In mobile view, the icons become separated from one and others, thus the route becomes broken. Please fix it.--Quest for Truth (talk) 22:04, 13 June 2016 (UTC)

@Quest for Truth: It’s a known issue, and you’re asking the wrong people. The problem’s with Mobile View, so take it to the WMF. Useddenim (talk) 22:25, 13 June 2016 (UTC)
@Useddenim: Can you give me a link to any related discussion of the known issue? Thanks. --Quest for Truth (talk) 22:35, 13 June 2016 (UTC)

Template:WMATA Silver Line

Moved from User talk:Useddenim

Hi Useddenim. I like your cleanups, but I was wondering about the use of the BS template. I had standardized on using BS5,so that the rows in the table would line up correctly on mobile devices (at least on Chrome 51). I noticed you reverted this to use shorter templates, so I was wondering if you had a better way of aligning route diagrams for mobile browsers, which render the CSS poorly Zr2d2 (talk) 18:24, 18 June 2016 (UTC)

I use the shortest template(s) for ease of editing (and long ago gave up on trying to edit WP on a mobile device), but I wasn't aware that using the same BS-template throughout helped the mobile display issue.
Do diagrams that use the {{Routemap}} template also have the same rendering problem? Useddenim (talk) 23:38, 18 June 2016 (UTC)
{{Routemap}} maps have a worse layout, the icons and text end up on different lines, pushing the icons farther apart Zr2d2 (talk) 03:37, 19 June 2016 (UTC)
@Useddenim, Quest for Truth, and Zr2d2: I started a discussion at Wikipedia:Village pump (technical) § Route diagram templates in mobile view yesterday; you might be interested in that. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:10, 20 June 2016 (UTC)

Module:Routemap

The following message by Jc86035 moved from user talk:Sameboat.

I've modified Module:Routemap and the four auxiliary templates (to, split, cvt, srws + module) to display (mostly) correctly in mobile view. (See 1, 2.) A few questions:

  • Should I/anyone take the time to fix {{BS-map}} as well?
  • Edokter suggested replacing the <center> tags (see 1), probably for HTML5 validity. How could this be implemented?
  • There are unfortunately still a few issues with mw-collapse (what with it being disabled in mobile), particularly that the usually-replaceable row, due to all the rows being shown, is below the first usually-collapsed row. Is it necessary to fix this?
  • How easy is it for the changes to be ported to the other wikis' versions without messing up all the language customisations and other things?

Thanks, Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:57, 21 June 2016 (UTC)

Auxiliary templates

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}}

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

UK Road

Isn't  M25  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  M25 . 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)

Mobile view (edit request)

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}}

Example (sandbox)
A
F
5
wide
n
wide
B
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)
Example 2 (sandbox)
A
R
5
wide
n
wide
2
3
4
1
B
UpperRight arrow

@Useddenim and Sameboat: It's now mostly done; align, bg, color b, i, nowrap and style are now supported parameters for basically everything. (Parameters are separated by , and are marked to the left – after the icon name, or text – by !_ for a whole cell or __ for one layer of an overlapping stack.) Below, the valid values for align are to the right of the equals signs; the resulting vertical and horizontal formatting (respectively) for the values is to the left.

{
	['inherit-left']    = {'l', 'left',},
	['inherit-right']   = {'r', 'right',},
	['top-inherit']     = {'a', 't', 'top',},
	['bottom-inherit']  = {'e', 'b', 'bottom',},
	['top-left']        = {'la', 'tl', 'c4', 'nw', 'top-left', 'topleft',},
	['top-right']       = {'ra', 'tr', 'c1', 'ne', 'top-right', 'topright',},
	['bottom-left']     = {'le', 'bl', 'c3', 'sw', 'bottom-left', 'bottomleft',},
	['bottom-right']    = {'re', 'br', 'c2', 'se', 'bottom-right', 'bottomright',},
	['inherit-center']  = {'c', 'center', 'centre',},
	['middle-inherit']  = {'m', 'middle',},
	['top-center']      = {'ma', 'tc', 'top-center', 'top-centre', 'topcenter', 'topcentre',},
	['bottom-center']   = {'me', 'bc', 'bottom-center', 'bottom-centre', 'bottomcenter', 'bottomcentre',},
	['middle-left']     = {'lm', 'ml', 'middle-left', 'middleleft',},
	['middle-right']    = {'rm', 'mr', 'middle-right', 'middleright',},
	['middle-center']   = {'cm', 'mc', 'middle-center', 'middle-centre', 'middlecenter', 'middlecentre',},
}

There are still display issues when text cells get too wide or too tall (and style doesn't really have a purpose so far), but it's good enough to replace the BStext templates and num icons (sans the compasses) entirely.

Incidentally, {{rmr}} and {{rmri}} have also been implemented (by Sameboat) in Module:Routemap/sandbox; the sandbox version of rmri is used above. I modified it so that if the first parameter is empty then the icon is automatically small (name, link are moved to 2 and 3). Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 11:19, 28 July 2016 (UTC)

@Jc86035: Just so you know that now the sandbox version no longer shows popup tooltip for overlaid icon cell... -- Sameboat - 同舟 (talk · contri.) 12:02, 28 July 2016 (UTC)
@Sameboat: checkY Fixed. (also added for text cells, despite not being particularly necessary) Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:48, 28 July 2016 (UTC)

@Useddenim and Sameboat: I've added the text/parameter functionality (and used it on {{Acton Town tube station}} and {{Ealing Broadway station}}), although the documentation has yet to be updated and the BStext templates can't be substituted yet. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 15:59, 2 August 2016 (UTC)

Added converting BStext markup to Routemap version in the sandbox. (The regex of Notepad++ is terrifyingly different to Lua...) -- Sameboat - 同舟 (talk · contri.) 01:54, 3 August 2016 (UTC)

Template:Caledonian Sleeper RDTs

Hi there,

I'm having a bit of trouble with Template:Caledonian Sleeper RDTs, which on Chrome 52.0.2743 looks a bit weird; however, it looks fine in IE. Any thoughts? jcc (tea and biscuits) 16:22, 14 August 2016 (UTC)

Unfortunately this seems to be an issue with Chrome's dynamic table width handling[8]. I suspect adding table-layout:fixed and then give every BS#-startCollapsible row a tw value would fix it. Problem is BS#-startCollapsible row templates don't have tw parameter and would take some time to experiment how to get it right, a design overlook I admit. The instant solution is converting the whole map into {{Routemap}} by convertbs and then set tw=,250,100 solely for the Routemap template itself instead of every icon row which I have done it for you because it involves further tweaking of the map markups. -- Sameboat - 同舟 (talk · contri.) 23:10, 14 August 2016 (UTC)