oficina / fichas Public

Rail: Docs' light and controls, the icons on their labels, "Fichas"

Paul chose the rail for Fichas (2026-11-12) from the looks mock-up, and
said "that new type icon is off".
- Docs' richer UI on the page: light.js and the light values Calma does
  not declare; lit pill buttons, the one primary with its accent shadow;
  Table/Cards a pill of pills; the search a pill without the grey slab;
  the grid a card.
- The rail's icons sit on their labels' centre line again: rastrillo
  v0.35 sets those links to display: block at higher specificity, which
  dropped every icon onto the baseline, 3.5px high.
  TestRailIconsSitOnTheTextsCentreLine measures it (fails at -3.5px
  without the fix).
- The product is "Fichas" in the rail and every tab title, as on the
  door and in the suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 3780532a349d36dc864d3048633a34d825ce9f3e parent eed61ab
12 files changed, +115 −12
  • internal/fichas/static/fichas.css +75 −2
  • internal/fichas/templates/card_edit.html +1 −1
  • internal/fichas/templates/card_layout.html +1 −1
  • internal/fichas/templates/card_new.html +1 −1
  • internal/fichas/templates/card_show.html +1 −1
  • internal/fichas/templates/field_edit.html +1 −1
  • internal/fichas/templates/field_new.html +1 −1
  • internal/fichas/templates/fields.html +1 −1
  • internal/fichas/templates/index.html +1 −1
  • internal/fichas/templates/shell.html +4 −1
  • internal/fichas/templates/type_new.html +1 −1
  • internal/fichastest/browser_test.go +27 −0

CI passed — run details

CI log
=== vet ===
go vet ./...
go vet -tags browser ./internal/fichastest/
=== fmt ===
=== test ===
go test ./...
?   	amadan.net/oficina/fichas/cmd/fichas	[no test files]
ok  	amadan.net/oficina/fichas/internal/fichas	1.900s
?   	amadan.net/oficina/fichas/internal/fichas/icons	[no test files]
ok  	amadan.net/oficina/fichas/internal/fichas/seal	(cached)
ok  	amadan.net/oficina/fichas/internal/fichastest	1.192s
?   	amadan.net/oficina/fichas/scripts/mockups	[no test files]
?   	amadan.net/oficina/fichas/scripts/preview	[no test files]
?   	amadan.net/oficina/fichas/scripts/writeestilo	[no test files]
=== migration-check ===
go tool rastrillo migration check
rastrillo migration check: models and migrations agree
diff --git a/internal/fichas/static/fichas.css b/internal/fichas/static/fichas.css
index d32dc59..c2cb4dc 100644
--- a/internal/fichas/static/fichas.css
+++ b/internal/fichas/static/fichas.css
@@ -295,8 +295,12 @@
[fichas-view-panel] [fichas-view-apply]:hover { background: var(--rst-accent-strong); }
/* ---- Sidebar icons on the text's centre line, not above its baseline. */
-[rst-shell-nav] a { display: flex; align-items: center; gap: var(--rst-sp-2); }
-[rst-shell-nav] a .icon { flex-shrink: 0; }
+/* rastrillo v0.35 sets the rail's links to display: block at
+ [rst-shell-sidebar] specificity, which put every icon on the text's
+ baseline, 3.5px high (Paul, 2026-11-12: "that new type icon is off").
+ TestRailIconsSitOnTheTextsCentreLine measures it. */
+[rst-shell-sidebar] [rst-shell-nav] a { display: flex; align-items: center; gap: var(--rst-sp-2); }
+[rst-shell-sidebar] [rst-shell-nav] a .icon { flex-shrink: 0; }
/* ---- A many-of-many choice as a quiet checklist. The choice-card
component tints every checked option with the accent, which is right
@@ -332,3 +336,72 @@
menus inside the list bar stay flex items of the bar. */
#list-filters { display: contents; }
+
+/* ---- Depth and light: what Docs' richer UI brought (2026-11-11/12),
+ chosen for Fichas' rail by Paul on 2026-11-12 from the looks mock-up.
+ - The light (Docs' brand/light.css): the values rastrillo's depth
+ styles read, which Calma does not declare, so light.js lights the
+ buttons and cards as it lights Docs'.
+ - The controls (estilo chrome.css, "the controls set", I2), at page
+ scale: pills lit from above; the one primary filled, its shadow
+ tinted by its own accent; Table/Cards a pill of pills; the search a
+ pill; the grid a card. */
+:root {
+ --rst-sheen-fill: light-dark(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035));
+ --rst-sheen-plain: light-dark(color-mix(in srgb, var(--rst-accent) 10%, transparent), rgba(255, 255, 255, 0.025));
+ --rst-light-rim: light-dark(color-mix(in srgb, var(--rst-accent) 38%, var(--rst-line)), color-mix(in srgb, var(--rst-accent) 18%, #4a4a4a));
+ --rst-light-wash: light-dark(color-mix(in srgb, var(--rst-accent) 4%, transparent), rgba(255, 255, 255, 0.01));
+}
+[rst-page] [rst-btn] {
+ border-radius: 999px;
+ padding-inline: 14px;
+ font-weight: 600;
+ box-shadow:
+ inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.06)),
+ 0 1px 2px rgb(23 32 60 / 0.08);
+}
+[rst-page] [rst-btn]:not([rst-btn="primary"]):not([rst-btn="danger"]) {
+ border-color: transparent;
+ background-color: var(--rst-surface);
+ color: var(--rst-text);
+ box-shadow:
+ inset 0 1px 0 light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.06)),
+ 0 0 0 1px var(--rst-line),
+ 0 1px 2px rgb(23 32 60 / 0.08);
+}
+[rst-page] [rst-btn]:not([rst-btn="primary"]):not([rst-btn="danger"]):hover { background-color: var(--rst-surface-2); }
+[rst-page] [rst-btn="primary"] {
+ padding-inline: 18px;
+ box-shadow:
+ inset 0 1px 0 rgb(255 255 255 / 0.22),
+ 0 1px 1px rgb(23 32 60 / 0.10),
+ 0 8px 18px -8px light-dark(color-mix(in srgb, var(--rst-accent) 80%, transparent), color-mix(in srgb, var(--rst-accent) 30%, transparent));
+}
+[rst-page] [rst-btn="primary"]:hover { background-color: var(--rst-accent-strong); }
+[rst-page] [rst-seg-tabs] {
+ border-radius: 999px;
+ padding: 3px;
+ background: var(--rst-surface-2);
+ box-shadow: inset 0 1px 2px rgb(23 32 60 / 0.08);
+}
+[rst-page] [rst-seg-tabs] a { border-radius: 999px; padding-inline: 16px; }
+[rst-page] [rst-seg-tabs] a[aria-current] {
+ background: var(--rst-surface);
+ color: var(--rst-text);
+ box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.08)), 0 1px 3px rgb(23 32 60 / 0.14);
+}
+[rst-page] [rst-lbar] { background: none; border-bottom: 0; padding-inline: 0; }
+[rst-page] [rst-lbar] [rst-search] {
+ border-color: transparent;
+ border-radius: 999px;
+ padding-inline-start: 14px;
+ box-shadow: 0 0 0 1px var(--rst-line), inset 0 1px 2px rgb(23 32 60 / 0.06);
+}
+[rst-page] [rst-lbar] [rst-search]:focus-within { box-shadow: 0 0 0 2px var(--rst-accent); }
+[rst-page] [rst-lbar] [rst-btn],
+[rst-page] [rst-lbar] summary { border-radius: 999px; }
+[rst-page] [fichas-grid-wrap] {
+ border: 0;
+ border-radius: 14px;
+ box-shadow: 0 0 0 1px var(--rst-line), 0 12px 28px -18px rgb(23 32 60 / 0.25);
+}
diff --git a/internal/fichas/templates/card_edit.html b/internal/fichas/templates/card_edit.html
index b908ebf..62f0e5a 100644
--- a/internal/fichas/templates/card_edit.html
+++ b/internal/fichas/templates/card_edit.html
@@ -1,4 +1,4 @@
-{{define "title"}}Edit {{.Card.Title}} · fichas{{end}}
+{{define "title"}}Edit {{.Card.Title}} · Fichas{{end}}
{{define "content"}}
{{$c := .Card}}
<header fichas-appbar>
diff --git a/internal/fichas/templates/card_layout.html b/internal/fichas/templates/card_layout.html
index 5b656f2..26a1fe9 100644
--- a/internal/fichas/templates/card_layout.html
+++ b/internal/fichas/templates/card_layout.html
@@ -1,4 +1,4 @@
-{{define "title"}}Arrange the {{.Type.Label}} card · fichas{{end}}
+{{define "title"}}Arrange the {{.Type.Label}} card · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>Arrange the {{.Type.Label}} card <span>what each card shows in Cards view</span></h1>
diff --git a/internal/fichas/templates/card_new.html b/internal/fichas/templates/card_new.html
index f2ca2ce..ccda331 100644
--- a/internal/fichas/templates/card_new.html
+++ b/internal/fichas/templates/card_new.html
@@ -1,4 +1,4 @@
-{{define "title"}}Add a {{lower .Type.Label}} · fichas{{end}}
+{{define "title"}}Add a {{lower .Type.Label}} · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>Add a {{lower .Type.Label}}</h1>
diff --git a/internal/fichas/templates/card_show.html b/internal/fichas/templates/card_show.html
index d89770b..e3707ff 100644
--- a/internal/fichas/templates/card_show.html
+++ b/internal/fichas/templates/card_show.html
@@ -1,4 +1,4 @@
-{{define "title"}}{{.Card.Title}} · fichas{{end}}
+{{define "title"}}{{.Card.Title}} · Fichas{{end}}
{{define "content"}}
{{$c := .Card}}
<header fichas-appbar>
diff --git a/internal/fichas/templates/field_edit.html b/internal/fichas/templates/field_edit.html
index 07b2343..b78b552 100644
--- a/internal/fichas/templates/field_edit.html
+++ b/internal/fichas/templates/field_edit.html
@@ -1,4 +1,4 @@
-{{define "title"}}Edit {{.Field.Label}} · fichas{{end}}
+{{define "title"}}Edit {{.Field.Label}} · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>Edit {{.Field.Label}} <span>{{.Type.Plural}}</span></h1>
diff --git a/internal/fichas/templates/field_new.html b/internal/fichas/templates/field_new.html
index 1cbedab..59c59c7 100644
--- a/internal/fichas/templates/field_new.html
+++ b/internal/fichas/templates/field_new.html
@@ -1,4 +1,4 @@
-{{define "title"}}Add a field · fichas{{end}}
+{{define "title"}}Add a field · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>Add a field <span>to {{.Type.Plural}}</span></h1>
diff --git a/internal/fichas/templates/fields.html b/internal/fichas/templates/fields.html
index a952ad8..a19a52f 100644
--- a/internal/fichas/templates/fields.html
+++ b/internal/fichas/templates/fields.html
@@ -1,4 +1,4 @@
-{{define "title"}}{{.Type.Plural}} fields · fichas{{end}}
+{{define "title"}}{{.Type.Plural}} fields · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>Fields <span>on every {{lower .Type.Label}}</span></h1>
diff --git a/internal/fichas/templates/index.html b/internal/fichas/templates/index.html
index b1abba5..11a4d84 100644
--- a/internal/fichas/templates/index.html
+++ b/internal/fichas/templates/index.html
@@ -1,4 +1,4 @@
-{{define "title"}}{{.Result.Plural}} · fichas{{end}}
+{{define "title"}}{{.Result.Plural}} · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>{{.Result.Plural}}{{if .Result.All}} <span>{{commas .Result.All}} {{if eq .Result.All 1}}record{{else}}records{{end}}</span>{{end}}</h1>
diff --git a/internal/fichas/templates/shell.html b/internal/fichas/templates/shell.html
index d8b6ef4..881c89f 100644
--- a/internal/fichas/templates/shell.html
+++ b/internal/fichas/templates/shell.html
@@ -23,6 +23,9 @@
<script defer src="{{asset "static/shortcuts.js"}}"></script>
<script defer src="{{asset "static/search.js"}}"></script>
<script defer src="{{asset "static/chrome.js"}}"></script>
+{{/* rastrillo's light: buttons catch a sheen, cards a rim near the
+ pointer. Deletable; the still design is the fallback. */}}
+<script defer src="{{asset "static/light.js"}}"></script>
{{iconAssets}}
<script defer src="{{asset "static/select.js"}}"></script>
<script defer src="{{asset "static/datetime.js"}}"></script>
@@ -35,7 +38,7 @@
<a rst-skip href="#main">{{T "rastrillo.ui.shell_skip"}}</a>
<details rst-shell-chrome><summary>{{icon "menu"}}{{T "rastrillo.ui.shell_menu"}}</summary></details>
<aside rst-shell-rail>
-<a rst-shell-brand href="/"><span estilo-brand><img estilo-brand-icon src="{{asset "static/brand/icon.svg"}}" alt="">fichas</span></a>
+<a rst-shell-brand href="/"><span estilo-brand><img estilo-brand-icon src="{{asset "static/brand/icon.svg"}}" alt="">Fichas</span></a>
<nav rst-shell-nav>
{{range .Nav}}<a href="{{.Href}}"{{if .Current}} aria-current="page"{{end}}>{{icon "users"}} {{.Label}}</a>
{{end}}<a href="/types/new">{{icon "plus"}} New type</a>
diff --git a/internal/fichas/templates/type_new.html b/internal/fichas/templates/type_new.html
index 618ab6b..1a34334 100644
--- a/internal/fichas/templates/type_new.html
+++ b/internal/fichas/templates/type_new.html
@@ -1,4 +1,4 @@
-{{define "title"}}New type · fichas{{end}}
+{{define "title"}}New type · Fichas{{end}}
{{define "content"}}
<header fichas-appbar>
<h1 fichas-appbar-title>New type <span>a new kind of card</span></h1>
diff --git a/internal/fichastest/browser_test.go b/internal/fichastest/browser_test.go
index 0369497..4ac0966 100644
--- a/internal/fichastest/browser_test.go
+++ b/internal/fichastest/browser_test.go
@@ -382,3 +382,30 @@ func TestARowOpensItsCard(t *testing.T) {
t.Fatalf("a click on the row's phone cell went to %q, want the card", path)
}
}
+
+// TestRailIconsSitOnTheTextsCentreLine: each rail link's icon is centred
+// on its label. rastrillo v0.35's display: block on these links once put
+// every icon on the text's baseline, 3.5px high, unnoticed by any test.
+func TestRailIconsSitOnTheTextsCentreLine(t *testing.T) {
+ rig := browserApp(t, nil)
+ var offsets []float64
+ rig.Run(
+ // A desktop width: below 800px the rail folds behind Menu.
+ send(emulation.SetDeviceMetricsOverride, emulation.SetDeviceMetricsOverrideParams{Width: 1280, Height: 800, DeviceScaleFactor: 1}),
+ chromedp.Navigate(rig.Origin+"/"),
+ chromedp.WaitVisible(`[rst-shell-nav] a`),
+ harness.Into(&offsets, chromedp.Evaluate[[]float64](`[...document.querySelectorAll('[rst-shell-nav] a')].map(a => {
+ const i = a.querySelector('svg').getBoundingClientRect()
+ const r = document.createRange(); r.selectNodeContents(a.lastChild); const tx = r.getBoundingClientRect()
+ return (i.top + i.height / 2) - (tx.top + tx.height / 2)
+ })`)),
+ )
+ if len(offsets) < 2 {
+ t.Fatalf("the rail has %d links; want the types and New type", len(offsets))
+ }
+ for i, off := range offsets {
+ if off < -1 || off > 1 {
+ t.Errorf("rail link %d: its icon is %.1fpx off its label's centre line", i, off)
+ }
+ }
+}