User subpages for planned modification to Living Presidents of the United States , with the parenthesized parameters:
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
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
Y Add ymd1/ymd2 to LivingPOTUS, LivingVPOTUS
Y Convert Row to use ymd1/ymd2 instead of EventDate
Y Remove P/M from Lookup
Y Change EventDate to "ERROR" - later request it be deleted.
Y Record sizes:
VOTUS post expand include size 1332916/ - 1333984/ - 1219653/ - 1219653/ - 1210927/ - 1219205/2097152 bytes
POTUS post expand include size 1332912/ - 1333980/ - 1219649/ - 1219649/ - 1210475/ - 1219201/2097152 bytes
VOTUS template argument size 70052/ - 70052/ - 67708/ - 67708/ - 66825/ - 67596/2097152 bytes
POTUS template argument size 70052/ - 70052/ - 67708/ - 67708/ - 66713/ - 67596/2097152 bytes
Y BgnNbr→nbr1, EndNbr→nbr2, BgnChg→evt1, EndChg→evt2 in Row/LivingPOTUS/LivingVPOTUS
Note: noticed Error: Second date should be year, month, day in last column of last row
Now this is just on the VP page
Fixed by eliminating ^s from empty params on last row of VP page
Y Record size
Y Change→evt in Row/EventLink/Box
Y Record size
Y Number→nbr in Row/EventLink/Box/Lookup
Y Record size
Y Office→pvp in LivingPOTUS/LivingVPOTUS/Row/EventLink/Box/Lookup
Fixed boxes messed up for #1-#9
(probably by eliminating hard space from just before M= in Lookup)
Y Record size
Y Eliminate hard spaces
Y Record size: VOTUS+POTUS post expand include size: 1219205+1219201
Y Convert all parameters and values to lower case
Y Convert evt1/evt2 from p/m to specific event
Y In row, use evt1/evt2 directly instead of using lookup
Y Eliminate now unneeded lookups so that it is only n(name) and c(color)
Y Record size: VOTUS+POTUS post expand include size: 1357359+1157598
Y Move ai/a1/di/d1 logic from Box to Row & refactor
Y Move ai/a1/di/d1 logic from EventLink to Row & refactor
Y Record size: VOTUS+POTUS post expand include size: 1164619+993058
Current template-space VOTUS+POTUS post expand include size: 396221+332649
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
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
1763303+1493026 after Y User:YBG/Row → User:YBG/PRow + User:YBG/VRow
1775073+1502144 after Y User:YBG/Name → User:YBG/PName + User:YBG/VName
1641718+1405921 after Y User:YBG/EventLink → User:YBG/PEventLink + UseYBG/VEventLink (messed up somehow)
2009330+1716079 after Y User:YBG/Box → User:YBG/PBox + User:YBG/VBox
???????+1709257 after Y Change PBox/VBox to call PName/VName directly wo pvp
1997502+1997502 after Y Change PEventLink/VEventLink to call PName/VName directly w/o pvp
1757523+1489094 after Y fixing some typos
1757523+1489094 after Y Change PRow/VRow to cal P/E versions of Name/Row/EventLink directly w/o pvp
1135799+977084 after Y Change LivingPOTUS/LivingVOTUS to call PRow/VRow directly wo pvp
1135799+977084 after Y Eliminate unnecessary evt in XEventLink
1135799+977084 after Y Change non-specific templates to ERROR and verify that not used
1135799+977084 after Y Verify that no use of parameter pvp
1135799+977084 after Y Compare V and P versions of template, make any needed fixes
1135799+977084 after Y Complete all changes contemplated to date
1136024+990973 after Y Use PM template in header instead of files
1134968+975165 after Y Tweak successor logic: left-justify (and) in PRow; Remove successor checks from VRow
1148588+976131 after Y Remove stray apostrophe on final row by moving bold face into switch
VOTUS + POTUS post-expand include size
Convert test cases
Blank Lookup
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
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
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
Implement suffixed number
Y Reformat XBox to put newline before pipes
Y Create Name by combining PName, VName, accepting suffixed ordinals
1113344+940204 after Y Verify that size has not changed
1075342+911204 after Y Transform XName calls in XBox to Name calls with suffixed ordinals
1075342+911204 after Y Transform XName calls in XEventLink to Name calls with suffixed ordinals
1075342+920031 after Y Fix 1st inaug pipelink in PEventLink
1075342+920031 after Y Change XName into Error returns
1081680+925475 after Y Add pv to xRow calls in xLiving; pv+nbr to xBox & its calls in xRow
1081680+925475 after Y Modify xRow to call xEventLink with nbrX and xEventLink to accept it
1081680+925475 after Y Create Box(pv,nbr)=PBox+VBox; Modify XRow to call Box not xBox
_______+______ after Y Create EventLink(nbrX)=P+V, Modify XRow to call EventLink not xEventLink
_______+______ after Y Create Row=P+V; Modify LivingVPOTUS+LivingPOTUS to call Row not xRow
1081324+925179 after Y Change XRow, XBox, XEventLink into error calls
1072776+916698 after Y Check Row for final (present) row in Event/± columns
1077276+916698 after Y Combine vd/pd in EventLink & rename EventLink to Event
1077276+916698 after N Unsuccessful efforts to refactor Event that either didn't work or increased size
1072687+916624 after Y Remove noinclude sections from Row
1072064+916124 after Y Make POTUS header partially conditional
1073472+918103 after Y Copy footers from mainspace
N Combine LivingVPOTUS into LivingPOTUS with optional paramter pv
N Change LivingVPOTUS into a single call of LivingPOTUS with pv=v
Labels
VOTUS + POTUS post-expand include size
Delayed tasks
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>
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
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[ 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
Y V: Row, Event, Box, Name, Color, PlusMinus
Y P: Row, Event, Box, Name, Color, PlusMinus
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)
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
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
Done Write doc page
Done Compare size to current versions
338451/402333 Current POTUS/VOTUS post-expand include size
961493/1126936 Sandbox POTUS/VOTUS post-expand include size
Done Research relative referencing and possibly implement. See Help:Link § Subpage links
Done Convert to relative links
Done Compare corresponding P- & V-pages: /Row /Event /PlusMinus /Box /Name /Color /sandbox /testcases
Done Add sandbox subpages as copies: /Row, /Event, /PlusMinus, /Box, /Name, /Color
Done Change sandbox to call templates relatively
N Relative sandbox failed to work when trying to promote it to template space
Done Remove relative calls in top level sandbox
Done Try promoting it again
N Got the same result as before, so I don't think the problem is the relative paths in the main template.
Done Change back to using absolute paths in main sandbox and in all non-sandbox subtemplates
Done Verify that this will display correctly if it is promoted to template
Done Promote both sandboxes and view main-space page
N The VP template won't display, probably because template expansions are too large
Done Revert to previous versions
Done Compare sizes
379604+54598 Current post-expand include size Living POTUS+VOTUS post
1003151+1168587 Sandbox post-expand include size Living POTUS+VOTUS post
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