A bill schedule with dates, currency, percentages, bold headers aligned over their numbers, a struck-out row and an italic note, in both palettes and at 60 columns.
- commit
- 26a76be2d39047f8dd170966bffb08162e6720b5
- parent
- b41ad9419a1cb2b825c0a87a22225588b947436b
- author
- Dami <dami.etoile@gmail.com>
| M | e2e/ | 30 | +++++++++++++++++++++++++++++- |
| A | e2e/ | 30 | ++++++++++++++++++++++++++++++ |
| A | e2e/ | 16 | ++++++++++++++++ |
| A | e2e/ | 30 | ++++++++++++++++++++++++++++++ |
@@ -35,6 +35,32 @@ func budget(s *session) {
3535 s.waitFor("B7 =SUM(B3:B5)")3636 }3737 38+// formatted types a bill schedule with dates, currency and percentages,39+// then styles it with Sheets' shortcuts: bold title and totals, headers40+// aligned over their numbers, a struck-out cancelled bill and an italic41+// note. It ends by bolding the totals, so line 3 shows the feedback.42+func formatted(s *session) {43+ s.keys("Bills for October", "<enter>")44+ s.keys("Item", "<tab>", "Due", "<tab>", "Amount", "<tab>", "Share", "<enter>")45+ s.keys("Rent", "<tab>", "10/1/2026", "<tab>", "$1,450.00", "<tab>", "=C3/C$7", "<enter>")46+ s.keys("Food", "<tab>", "9/28/2026", "<tab>", "612.4", "<tab>", "=C4/C$7", "<enter>")47+ s.keys("Transit", "<tab>", "9/30/2026", "<tab>", "96", "<tab>", "=C5/C$7", "<enter>")48+ s.keys("Gym", "<tab>", "10/5/2026", "<tab>", "40", "<tab>", "=C6/C$7", "<enter>")49+ s.keys("Total", "<tab>", "<tab>", "=SUM(C3:C6)", "<tab>", "=SUM(D3:D6)", "<enter>")50+ s.keys("<down>", "<left>", "<left>", "Gym cancelled from November", "<enter>")51+ // Currency for the amounts, percent for the shares.52+ s.keys("<ctrl+home>", "<down>", "<down>", "<down>", "<right>", "<right>", "<shift+down>", "<shift+down>", "<ctrl+shift+4>")53+ s.keys("<right>", "<up>", "<shift+down>", "<shift+down>", "<shift+down>", "<shift+down>", "<ctrl+shift+5>")54+ // Bold title, bold headers with the number headers on the right.55+ s.keys("<ctrl+home>", "<ctrl+b>", "<down>", "<shift+right>", "<shift+right>", "<shift+right>", "<ctrl+b>")56+ s.keys("<right>", "<shift+right>", "<shift+right>", "<ctrl+shift+r>")57+ // The cancelled bill is struck out; the note is italic.58+ s.keys("<ctrl+home>", "<down>", "<down>", "<down>", "<down>", "<down>", "<shift+right>", "<shift+right>", "<shift+right>", "<alt+shift+5>")59+ s.keys("<down>", "<down>", "<down>", "<ctrl+i>")60+ s.keys("<up>", "<up>", "<shift+right>", "<shift+right>", "<shift+right>", "<ctrl+b>")61+ s.waitFor("Bold on for A7:D7")62+}63+3864 var screens = []screen{3965 {name: "ready-empty", setup: func(s *session) {}},4066 {name: "budget", setup: budget},@@ -86,12 +112,14 @@ var screens = []screen{
86112 s.waitFor("HELP")87113 }},88114 {name: "narrow", opts: options{cols: 60, rows: 16}, setup: budget},115+ {name: "formats", setup: formatted},116+ {name: "formats-narrow", opts: options{cols: 60, rows: 16}, setup: formatted},89117 }90118 91119 // Key screens are also recorded on a light terminal, where the app picks92120 // its light theme from the reported background color.93121 func init() {94- for _, name := range []string{"budget", "point-range", "selection-stats", "quit-confirm", "help"} {122+ for _, name := range []string{"budget", "point-range", "selection-stats", "quit-confirm", "help", "formats"} {95123 for _, sc := range screens {96124 if sc.name == name {97125 sc.name += "-light"@@ -0,0 +1,30 @@
1+<pre class="screen"><span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> A7 </span> Total <span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> READY</span><span style="background:var(--vt-palette-6)"> </span>2+3+<span style="color:var(--vt-palette-0)">Bold on for A7:D7</span>4+<span style="background:var(--vt-palette-7)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> A </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4)"> B C D </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> E F G H I </span>5+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 1 </span> <span style="font-weight:bold">Bills for October</span>6+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 2 </span> <span style="font-weight:bold">Item</span> <span style="font-weight:bold">Due</span> <span style="font-weight:bold">Amount</span> <span style="font-weight:bold">Share</span>7+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 3 </span> Rent 10/1/2026 $1,450.00 65.96%8+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 4 </span> Food 9/28/2026 $612.40 27.86%9+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 5 </span> Transit 9/30/2026 $96.00 4.37%10+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 6 </span> <span style="text-decoration:line-through">Gym</span> <span style="text-decoration:line-through">10/5/2026</span> <span style="text-decoration:line-through">$40.00</span> <span style="text-decoration:line-through">1.82%</span>11+<span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> 7 </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold">Total</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4);font-weight:bold">$2,198.40</span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4);font-weight:bold">100.00%</span><span style="color:var(--vt-palette-15);background:var(--vt-palette-4)"> </span>12+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 8 </span>13+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 9 </span> <span style="font-style:italic">Gym cancelled from November</span>14+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 10 </span>15+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 11 </span>16+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 12 </span>17+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 13 </span>18+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 14 </span>19+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 15 </span>20+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 16 </span>21+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 17 </span>22+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 18 </span>23+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 19 </span>24+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 20 </span>25+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 21 </span>26+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 22 </span>27+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 23 </span>28+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 24 </span>29+<span style="color:var(--vt-palette-0);background:var(--vt-palette-7)"> 25 </span>30+untitled<span style="color:var(--vt-palette-0)"> modified</span> <span style="font-weight:bold">A7:D7</span> <span style="color:var(--vt-palette-0)">Sum </span>2199.4 <span style="color:var(--vt-palette-0)">Avg </span>1099.7 <span style="color:var(--vt-palette-0)">Count </span>3</pre>\ No newline at end of file@@ -0,0 +1,16 @@
1+<pre class="screen"><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> A7 </span> Total <span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> READY</span><span style="background:var(--vt-palette-6)"> </span>2+3+<span style="color:var(--vt-palette-8)">Bold on for A7:D7</span>4+<span style="background:var(--vt-palette-8)"> </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> A </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> B C D </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> E </span>5+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 1 </span> <span style="font-weight:bold">Bills for October</span>6+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 2 </span> <span style="font-weight:bold">Item</span> <span style="font-weight:bold">Due</span> <span style="font-weight:bold">Amount</span> <span style="font-weight:bold">Share</span>7+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 3 </span> Rent 10/1/2026 $1,450.00 65.96%8+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 4 </span> Food 9/28/2026 $612.40 27.86%9+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 5 </span> Transit 9/30/2026 $96.00 4.37%10+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 6 </span> <span style="text-decoration:line-through">Gym</span> <span style="text-decoration:line-through">10/5/2026</span> <span style="text-decoration:line-through">$40.00</span> <span style="text-decoration:line-through">1.82%</span>11+<span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> 7 </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold">Total</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4);font-weight:bold">$2,198.40</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4);font-weight:bold">100.00%</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span>12+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 8 </span>13+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 9 </span> <span style="font-style:italic">Gym cancelled from November</span>14+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 10 </span>15+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 11 </span>16+untitled<span style="color:var(--vt-palette-8)"> modified</span> <span style="font-weight:bold">A7:D7</span> <span style="color:var(--vt-palette-8)">Sum </span>2199.4 <span style="color:var(--vt-palette-8)">Avg </span>1099.7 <span style="color:var(--vt-palette-8)">Count </span>3</pre>\ No newline at end of file@@ -0,0 +1,30 @@
1+<pre class="screen"><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> A7 </span> Total <span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> READY</span><span style="background:var(--vt-palette-6)"> </span>2+3+<span style="color:var(--vt-palette-8)">Bold on for A7:D7</span>4+<span style="background:var(--vt-palette-8)"> </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> A </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> B C D </span><span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> E F G H I </span>5+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 1 </span> <span style="font-weight:bold">Bills for October</span>6+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 2 </span> <span style="font-weight:bold">Item</span> <span style="font-weight:bold">Due</span> <span style="font-weight:bold">Amount</span> <span style="font-weight:bold">Share</span>7+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 3 </span> Rent 10/1/2026 $1,450.00 65.96%8+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 4 </span> Food 9/28/2026 $612.40 27.86%9+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 5 </span> Transit 9/30/2026 $96.00 4.37%10+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 6 </span> <span style="text-decoration:line-through">Gym</span> <span style="text-decoration:line-through">10/5/2026</span> <span style="text-decoration:line-through">$40.00</span> <span style="text-decoration:line-through">1.82%</span>11+<span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold"> 7 </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6);font-weight:bold">Total</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-6)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4);font-weight:bold">$2,198.40</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4);font-weight:bold">100.00%</span><span style="color:var(--vt-palette-0);background:var(--vt-palette-4)"> </span>12+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 8 </span>13+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 9 </span> <span style="font-style:italic">Gym cancelled from November</span>14+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 10 </span>15+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 11 </span>16+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 12 </span>17+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 13 </span>18+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 14 </span>19+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 15 </span>20+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 16 </span>21+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 17 </span>22+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 18 </span>23+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 19 </span>24+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 20 </span>25+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 21 </span>26+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 22 </span>27+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 23 </span>28+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 24 </span>29+<span style="color:var(--vt-palette-15);background:var(--vt-palette-8)"> 25 </span>30+untitled<span style="color:var(--vt-palette-8)"> modified</span> <span style="font-weight:bold">A7:D7</span> <span style="color:var(--vt-palette-8)">Sum </span>2199.4 <span style="color:var(--vt-palette-8)">Avg </span>1099.7 <span style="color:var(--vt-palette-8)">Count </span>3</pre>\ No newline at end of file