User subpages for planned modification to Living Presidents of the United States , with the parenthesized parameters:
v.0
User:YBG/LivingPOTUS (no parameters) → Row
User:YBG/LivingVPOTUS (no parameters) → Row
User:YBG/Row ( Office , Number(start) , Change(start) , Number(end) , Change(end) , Number(1st), ... Number(9th), hours ) → EventDate/EventLink/Box
User:YBG/EventDate ( Number , Change , Office ) → Lookup
User:YBG/EventLink ( Number , Change , Office ) → Lookup
User:YBG/Box ( Number , Change , Office ) → Lookup
User:YBG/Lookup ( Number , Data , Office ) → (none)
where the parameters (all but hours being numbered) are:
Office is P(President) or V(Vice President)
Number is the ordinal number of service in the office
Change is M(inus) or P(lus) or successor's number (for deaths in office), or empty (to suppress ± in Box)
Data is the type of data to be returned
p /m inaug/death date, yyyy-mm-dd format
P /M inaug/death EventType: D(eath) , A(ssination) , P1/PI(1st/only inauguration) , V1/VI(1st/only VP inauguration) , VC(VP Conformation)
C color, e.g. "fbb4ae", to fill boxes
n formatted number, e.g., "{{0|0}}9" or "10"
N name of officeholder
hours is a named parameter which takes on a single value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.1
User:YBG/LivingPOTUS (no parameters) → Row
User:YBG/LivingVPOTUS (no parameters) → Row
User:YBG/Row ( Office , BgnNbr , BgnChg , EndNbr , EndChg , 1 , 2, 3, ... 9, hours ) → EventDate/EventLink/Box
User:YBG/EventDate ( Number , Change , Office ) → Lookup
User:YBG/EventLink ( Number , Change , Office ) → Lookup
User:YBG/Box ( Number , Change , Office ) → Lookup
User:YBG/Lookup ( Number , Data , Office ) → (none)
where the parameters are:
Office is P(President) or V(Vice President)
Number is the ordinal number of service in the office
Change is M(inus) or P(lus) or successor's number (for deaths in office), or empty (to suppress ± in Box)
BgnNbr /BgnChg are the Number and Change associated with the start of the period
EndNbr /EndChg are the Number and Change associated with the end of the period
Data is the type of data to be returned
p /m inaug/death date, yyyy-mm-dd format
P /M inaug/death EventType: D(eath) , A(ssination) , P1/PI(1st/only inauguration) , V1/VI(1st/only VP inauguration) , VC(VP Conformation)
C color, e.g. "fbb4ae", to fill boxes
n formatted number, e.g., "{{0|0}}9" or "10"
N name of officeholder
hours takes on a single value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.1→v.2
v.2
User:YBG/LivingPOTUS (no parameters) → Row
User:YBG/LivingVPOTUS (no parameters) → Row
User:YBG/Row ( pvp , ymd1 , nbr1 , evt1 , ymd2 , nbr2 , evt2 , 1 , 2, 3, ... 9, hours ) → EventLink/Box
User:YBG/EventLink ( nbr , evt , pvp ) → Lookup
User:YBG/Box ( nbr , evt , pvp ) → Lookup
User:YBG/Lookup ( nbr , data , pvp ) → (none)
where the parameters are:
pvp : office: p(President) or vp(Vice President)
ymd : date of the event in yyyy-mm-dd format
nbr : ordinal number of service in the office
evt : event: p1/pi/v1/vi/vc (p/vp 1st/only inaug/confirmation); d(eath); d1/a1/di/ai (death/assass. + p1/pi); blank (suppresses ± in Box)
ymd1 /nbr1 /evt1 and ymd2 /nbr2 /evt2 : the ymd /nbr /evt associated with the period start and end
1 /2 /3 /4 /5 /6 /7 /8 /9 : ordinal number of the living officeholders during the period
data type of data to be returned by Lookup: c color, e.g. "fbb4ae" (to fill boxes); n name of officeholder
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.3
User:YBG/LivingPOTUS (no parameters) → Row
User:YBG/LivingVPOTUS (no parameters) → Row
User:YBG/Row ( pvp , ymd1 , nbr1 , evt1 , ymd2 , nbr2 , evt2 , 1 , 2, 3, ... 9, hours ) → EventLink/Box/PM
User:YBG/EventLink ( nbr , evt , pvp ) → Name -- returns a wikilink to a particular inauguration or death
User:YBG/Box ( nbr , pvp ) → Name/Color -- returns a colored box wikilinked to the POTUS/VOTUS
User:YBG/PM ( evt ) → (none) -- returns a pretty version of + or −
User:YBG/Name ( nbr , pvp ) → (none) -- returns the canonical version of the POTUS/VOTUS name
User:YBG/Color ( nbr ) → (none) -- returns a color, e.g., "fbb4ae", for filling the boxes
where the parameters are:
pvp : office: p(President) or vp(Vice President)
ymd : date of the event in yyyy-mm-dd format
nbr : ordinal number of service in the office
evt : event: p1/pi/v1/vi/vc (p/vp 1st/only inaug/confirmation); d(eath); d1/a1/di/ai (death/assass. + p1/pi); blank (suppresses ± in Box)
ymd1 /nbr1 /evt1 and ymd2 /nbr2 /evt2 : the ymd /nbr /evt associated with the period start and end
1 /2 /3 /4 /5 /6 /7 /8 /9 : ordinal number of the living officeholders during the period
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.4
P /V Living(V)POTUS(no parameters) → XRow
P /V XRow( ymd1 , nbr1 , evt1 , ymd2 , nbr2 , evt2 , 1 , 2, 3, ... 9, hours ) → XEventLink/XBox/PM
P /V XEventLink ( nbr , evt ) → XName -- returns wikilink to particular event
P /V XBox( nbr ) → VName/Color -- returns a colored box wikilinked to the POTUS/VOTUS
P /V XName( nbr ) → (none) -- returns canonical version of POTUS/VOTUS name
Color ( nbr ) → (none) -- returns a color, e.g., "fbb4ae", for filling the boxes
PM ( evt ) → (none) -- returns + or −
where the parameters are:
ymd : date of the event in yyyy-mm-dd format
nbr : ordinal number of service in the office
evt : event: p1/pi/v1/vi/vc (p/vp 1st/only inaug/confirmation); d(eath); d1/a1/di/ai (death/assass. + p1/pi); blank (suppresses ± in Box)
ymd1 /nbr1 /evt1 and ymd2 /nbr2 /evt2 : the ymd /nbr /evt associated with the period start and end
1 /2 /3 /4 /5 /6 /7 /8 /9 : ordinal number of the living officeholders during the period
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.4→v.5
1148588+975243 after Y Use succession-specific params for communicating between xLiving & xRow
In xLiving, add e1a, e2a params xRow calls
In xRow, consume e1a, e2a params
Convert single-param templates to use unnamed params
Substeps for all of the tasks below
In callees, convert to consume either named or unnamed params
In callers, convert to call with unnamed parameters
In callees, convert to consume only unnamed params
1148588+975243 after Y initial - before changes
1148588+975243 after Y Convert PM calls from xLiving, xRow
1119380+975243 after Y Convert Color calls from xBox
1148588+975243 after Y Convert xName calls from xBox, xEventLink
1148840+977151 after Y Convert xBox calls from xRow
1148840+977615 after Y Strip spaces from PBox calls; Remove (and)
1148840+977615 after Y Purge all templates
Finish up succession-specific stuff
1148840+977615 after Y In pLiving, replace di/d1/ai/a1 param values with pd, pa
1148840+977665 after Y In pBox, delete di/d1/ai/a1 and add pa
Tweak whitespace
1148840+958873 after Y In xEventLink, remove extra white space
1133610+958873 after Y Remove more white space in xEventLink
1114572+941318 after Y Remove all extra whitespace in xEventLink using 2 switches
1114572+941318 after Y Remove spaces from xBox
1114572+941318 after Y Remove newlines from xBox
1113522+940352 after Y Remove spaces from Color/PM; refactor bold in PM
1113522+940204 after Y Remove spaces after | in +/- section of xRow, also around nowrap
1113344+940204 after Y Remove spaces around nowrap in VRow
Labels
VOTUS + POTUS post-expand include size
Delayed tasks
Convert test cases
Blank Lookup
v.5
P /V Living(V)POTUS(no parameters) → XRow
P /V XRow( ymd1 , nbr1 , evt1 , ymd2 , nbr2 , evt2 , 1 , 2, 3, ... 9, hours, e1a, e2a ) → XEventLink/XBox/PM
P /V XEventLink ( nbr , evt ) → XName -- returns wikilink to particular event
P /V XBox( 1 ) → VName/Color -- returns a colored box wikilinked to the POTUS/VOTUS
P /V XName( 1 ) → (none) -- returns canonical version of POTUS/VOTUS name
Color ( 1 ) → (none) -- returns a color, e.g., "fbb4ae", for filling the boxes
PM ( 1.evt ) → (none) -- returns + or −
where the parameters are:
ymd : date of the event in yyyy-mm-dd format
nbr : ordinal number of service in the office
evt : event: v1/p1/vi/pi/vc/pa/vd/pd (p/vp 1st/only inaug/confirmation/assassination/death)
ymd1/nbr1/evt1 and ymd2/nbr2/evt2 : the ymd/nbr/evt associated with the period start and end
e1a/e2a : event pi/p1 for the succession after a death (pa/pd) in office
1/2/3/4/5/6/7/8/9 : ordinal numbers of living officeholders during period as unnamed params
1 The ordinal number for the single officeholder as an unnamed parameter
1.evt An event code passed as an unnamed parameter
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
v.6
User:YBG/LivingVPOTUS → Row
User:YBG/LivingPOTUS → Row
User:YBG/Row ( pv, ymd1 , nbr1 , evt1 , ymd2 , nbr2 , evt2 , 1 , 2, 3, ... 9, e1a, e2a, hours ) → Event/Box/PM
User:YBG/Event ( nbrX , evt ) → Name -- returns wikilink to particular event
User:YBG/Box ( pv, nbr ) → Name/Color -- returns a colored box wikilinked to the POTUS/VOTUS
User:YBG/Name ( 1.nbrX ) → (none) -- returns canonical version of POTUS/VOTUS name
User:YBG/Color ( 1.nbr ) → (none) -- returns a color, e.g., "fbb4ae", for filling the boxes
User:YBG/PM ( 1.evt ) → (none) -- returns + or −
where the parameters are:
pv : office, 'p', 'v', or 'vp', defaults to 'p'
ymd : date of the event in yyyy-mm-dd format
nbr/nbrX : ordinal number of service in the office unsuffixed/suffixed by p or v
evt : event: v1/p1/vi/pi/vc/pa/vd/pd (p/vp 1st/only inaug/confirmation/assassination/death)
ymd1/nbr1/evt1 and ymd2/nbr2/evt2 : the ymd/nbr/evt associated with the period start and end
e1a/e2a : event pi/p1 for the succession after a death (pa/pd) in office
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
1/2/3/4/5/6/7/8/9 : Unsuffixed ordinal numbers of living officeholders during period as unnamed params
1.<param> Unnamed parameter which takes on the domain of <param>
v.6→v.7
Y Copy Row/Event/PM/Box/Color/Name to subpages
Y Modify LivingPOTUS/LivingVPOTUS/Row/Event/PM/Box/Color/Name to call templates relatively
Change Row/Event/PM/Box/Color/Name to errors & verify that still working OK
Copy Row/Event/PM/Box/Color/Name to template space as subpages of main P page
Create Row/Event/PM/Box/Color/Name as redirects from subpages of main V page to subpages of main P page
Copy LivingPOTUS/LivingVPOTUS to template space
Write /doc subpage
Add test cases
Add sandbox
v.7
User:YBG/LivingVPOTUS () → /Row, /Box, /PM
User:YBG/LivingPOTUS () → /Row, /Box, /PM
User:YBG/LivingVPOTUS/Row ≡User:YBG/LivingPOTUS/Row (pv,ymd1,nbr1,evt1,ymd2,nbr2,evt2,1,2,...9,e1a,e2a,hours) → Event/Box/PM
User:YBG/LivingVPOTUS/Event ≡User:YBG/LivingPOTUS/Event (nbrX,evt) → Name -- returns wikilink to particular event
User:YBG/LivingVPOTUS/Box ≡User:YBG/LivingPOTUS/Box (pv,nbr) → Name/Color -- returns a colored box wikilinked to the POTUS/VOTUS
User:YBG/LivingVPOTUS/Name ≡User:YBG/LivingPOTUS/Name (1.nbrX) → (none) -- returns canonical version of POTUS/VOTUS name
User:YBG/LivingVPOTUS/Color ≡User:YBG/LivingPOTUS/Color (1.nbr) → (none) -- returns a color, e.g., "fbb4ae", for filling the boxes
User:YBG/LivingVPOTUS/PM ≡User:YBG/LivingPOTUS/PM (1.evt) → (none) -- returns + or −
where "→" indicates "calls"; "(...)" indicates "having parameters ..."; "≡" indicates "redirects to"; and parameters are:
pv : office, 'p', 'v', or 'vp', defaults to 'p'
ymd : date of the event in yyyy-mm-dd format
nbr/nbrX : ordinal number of service in the office unsuffixed/suffixed by p or v
evt : event: v1/p1/vi/pi/vc/pa/vd/pd (p/vp 1st/only inaug/confirmation/assassination/death)
ymd1/nbr1/evt1 and ymd2/nbr2/evt2 : the ymd/nbr/evt associated with the period start and end
e1a/e2a : event pi/p1 for the succession after a death (pa/pd) in office
hours takes on only one value 5+ 1 ⁄2 , the time between the deaths on July 4, 1826
1/2/3/4/5/6/7/8/9 : Unsuffixed ordinal numbers of living officeholders during period as unnamed params
1.<param> Unnamed parameter which takes on the domain of <param>
v.8 - gradually implement in template space
v.8 - gradually implement in template space
edit
General principles
Always call subtemplates with fully qualified template names
Parallel P/VP subtemplates completely separate except (maybe) Color, PlusMinus where VP can be a redirect to P
Done : Create blank subtemplates
Y V: Row, Event, Box, Name, Color, PlusMinus
Y P: Row, Event, Box, Name, Color, PlusMinus
Done : Create testcases for all subtemplates except Row, sandbox
V✓ /P✓ all possible evt for PlusMinus, Event (actual cases)
V✓ /P✓ multiple nbr (1,2,9,10,45,46,48,49) for Name, Box (includes Color)
Done : Implement all subtemplates except Row, sandbox
V✓ /P✓ PlusMinus - exact copy, parameter unnamed, slightly modified to work with null param
V✓ /P✓ Color - exact copy
V✓ /P✓ Name - modified subsets
V✓ /P✓ Box - copy with namespace mods, parameter unnamed
V✓ /P✓ Event - copy with namespace mods
Done : Row & sandbox
V✗ /P✗ Add side-by-side comparison and list of all boxes (later had to delete)
V✓ /P✓ test cases for Row (from+to; 2*from+to; from+2*to; from+∅; hours)
V✓ /P✓ implement Row - copy with namespace mods
V✓ /P✓ implement sandbox - copy with namespace mods
See if there is a way to significantly reduce the size of the templates
Look at element stuff to see how DePiep has set up sandboxes with subtemplates
Figure out how to work sandbox - maybe separate sandbox for every subtemplate?
Seek input about implementation