oficina / slides Public

Editor: the strip meets the bar; the font status keeps its room by stage

The font status was a full-width row of the editor between the bar and
the desk, so a band of desk showed above the strip's surface. It is now
the desk's first child: from 1100px a row over the stage pane, in the
stage's column, with the strip spanning both rows from the bar down; it
keeps its height whether or not it speaks, keeps clear of the open
inspector card, and is in none of the parts a font wait makes inert
(final review, finding 7, V2). Every lookup of it is by attribute.

TestTidyStripMeetsTheBar holds the strip's top to the bar's bottom and
checks a note shown and cleared moves neither the stage nor the switch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev c73ca7fe2d502af87ad898508a082e27fa0f0a92 parent 9ac636d
3 files changed, +84 −27
  • internal/slides/static/editor.css +33 −23
  • internal/slides/templates/editor.html +5 −4
  • internal/slidestest/browser_editor_tidy_test.go +46 −0
diff --git a/internal/slides/static/editor.css b/internal/slides/static/editor.css
index 73f303b..0bf3d7c 100644
--- a/internal/slides/static/editor.css
+++ b/internal/slides/static/editor.css
@@ -39,7 +39,6 @@
display: grid;
grid-template-areas:
"bar"
- "fonts"
"desk";
grid-template-columns: minmax(0, 1fr);
min-block-size: 100dvh;
@@ -48,7 +47,7 @@
the viewer. It is first in the root, but a grid places an item with no
area after the named ones: it was under the whole desk, below the
fold, while a deck opened here from the list. Under the bar instead.
- Only with scripting off: a page with scripts is untouched (a fourth
+ Only with scripting off: a page with scripts is untouched (a third
row, even empty, would take a share of the root's stretched height
and move the desk). */
@media (scripting: none) {
@@ -56,7 +55,6 @@
grid-template-areas:
"bar"
"notice"
- "fonts"
"desk";
}
[slides-editor] > noscript {
@@ -65,19 +63,17 @@
padding: var(--rst-sp-3) var(--rst-sp-4) 0;
}
}
-[slides-editor] > [slides-fonts-status] {
- padding-inline: var(--rst-sp-4);
-}
-/* The desk: below 1100px the panes stack in document order — a
- horizontal filmstrip, the stage, the inspector — and nothing is
- hidden but a card Format has closed; from 1100px the strip and the
- stage sit side by side under the floating card (the end of this
- file). */
+/* The desk: below 1100px the panes stack in document order — the font
+ status, a horizontal filmstrip, the stage, the inspector — and
+ nothing is hidden but a card Format has closed; from 1100px the strip
+ and the stage sit side by side under the floating card, the font
+ status over the stage (the end of this file). */
[slides-desk] {
display: grid;
gap: var(--rst-sp-4);
grid-area: desk;
grid-template-areas:
+ "fonts"
"strip"
"stage"
"inspector";
@@ -88,8 +84,9 @@
/* ── The font status ─────────────────────────────────────────────────
What the editor says about its fonts (fixtures/font-status.mjs): a
change waiting for a font, a change refused while it does, a font
- that could not be loaded, substitutes in use. Its own row, always in
- the page and always this height — two lines' room on a narrow screen,
+ that could not be loaded, substitutes in use. Its own row of the
+ desk (over the stage, beside the strip, from 1100px; so the strip's
+ surface meets the bar), always in the page and always this height — two lines' room on a narrow screen,
where the longest note wraps, one from 40rem — so saying something
moves nothing on the page (Paul, 2026-10-26: a layout that moves
after the page is shown is a flash too). Empty when there is nothing
@@ -1618,26 +1615,39 @@
}
[slides-editor] {
block-size: 100dvh;
- grid-template-rows: auto auto minmax(0, 1fr);
+ grid-template-rows: auto minmax(0, 1fr);
overflow: hidden;
}
@media (scripting: none) {
[slides-editor] {
- grid-template-rows: auto auto auto minmax(0, 1fr);
+ grid-template-rows: auto auto minmax(0, 1fr);
}
}
- /* The strip runs the desk's full height against the start edge, so
- the desk's padding is on the other three sides only and the strip
- reaches back over it top and bottom. */
+ /* The strip runs the desk's full height against the start edge, from
+ the bar down, so the desk's padding is on the end and the foot
+ only and the strip reaches back over the foot's. Over the stage,
+ the font status's row takes the place of the top padding: it is
+ the room between the bar and the stage pane, kept whether or not
+ it says anything. While the inspector card shows, the status keeps
+ clear of it as the stage pane does. */
[slides-desk] {
align-items: stretch;
- gap: var(--rst-sp-4);
- grid-template-areas: "strip stage";
+ column-gap: var(--rst-sp-4);
+ grid-template-areas:
+ "strip fonts"
+ "strip stage";
grid-template-columns: 212px minmax(0, 1fr);
- grid-template-rows: minmax(0, 1fr);
+ grid-template-rows: auto minmax(0, 1fr);
min-block-size: 0;
- padding: var(--rst-sp-4) var(--rst-sp-4) var(--rst-sp-4) 0;
+ padding: 0 var(--rst-sp-4) var(--rst-sp-4) 0;
position: relative;
+ row-gap: 0;
+ }
+ [slides-desk] > [slides-fonts-status] {
+ min-block-size: max(var(--rst-sp-4), 24px, calc(1.4em + 4px));
+ }
+ [slides-editor]:has([slides-inspector][data-state="open"]) [slides-desk] > [slides-fonts-status] {
+ padding-inline-end: calc(var(--estilo-inspector-inline-size, 248px) + var(--estilo-inspector-inset, 12px) + 16px);
}
/* The strip: a surface of its own, the bar's, with a hairline on its
desk edge. The list scrolls; the foot under it, New slide, does
@@ -1647,7 +1657,7 @@
border-inline-end: 1px solid var(--rst-line);
display: grid;
grid-template-rows: minmax(0, 1fr) auto;
- margin-block: calc(-1 * var(--rst-sp-4));
+ margin-block-end: calc(-1 * var(--rst-sp-4));
min-block-size: 0;
}
[slides-strip] {
diff --git a/internal/slides/templates/editor.html b/internal/slides/templates/editor.html
index 9f9bee5..31e2947 100644
--- a/internal/slides/templates/editor.html
+++ b/internal/slides/templates/editor.html
@@ -284,11 +284,14 @@
{{- end}}
</div>
</header>
+<main id="main" slides-desk>
{{/* What the editor says about its fonts (fixtures/font-status.mjs): a
font is loading for a change that is waiting, a change was refused
while it does, a font could not be loaded, or substitutes are shown.
- Its own row under the bar, always there and the same height whether
- it says anything or not, so speaking moves nothing; the text is a
+ The desk's first child: a row of its own over the stage pane, beside
+ the strip (which runs from the bar down), always there and the same
+ height whether it says anything or not, so speaking moves nothing.
+ Not inside any part a font wait makes inert: the text is a
polite live region, heard because it was in the page before the
text changed. The copy is the catalog's (fontgate.go); the script
picks which to say. */}}
@@ -296,8 +299,6 @@
<p slides-fonts-status-text role="status"></p>
<button slides-fonts-status-dismiss type="button"{{with $.Fonts}} aria-label="{{.Dismiss}}" title="{{.Dismiss}}"{{end}}><span aria-hidden="true">{{icon "x"}}</span></button>
</div>
-
-<main id="main" slides-desk>
{{/* One strip item, the shape the bundle clones for a slide it adds:
the thumbnail (an <img> of the server's SVG — inert, because it is
a picture of the slide and never a second copy of it in the tab
diff --git a/internal/slidestest/browser_editor_tidy_test.go b/internal/slidestest/browser_editor_tidy_test.go
index c098151..64d980a 100644
--- a/internal/slidestest/browser_editor_tidy_test.go
+++ b/internal/slidestest/browser_editor_tidy_test.go
@@ -2451,3 +2451,49 @@ func TestTidyDesktopSlideFits(t *testing.T) {
}
te.view("desktop")
}
+
+// statusJS is the strip's top against the bar's bottom, and where the
+// stage and the view switch are.
+const statusJS = `(() => {
+ const r = s => document.querySelector(s).getBoundingClientRect()
+ const stage = r('[slides-stage]'), sw = r('[slides-switcher]')
+ return {StripTop: r('[slides-strip-nav]').top, BarBottom: r('[slides-head]').bottom,
+ Stage: [stage.left, stage.top, stage.width, stage.height], Switch: [sw.left, sw.top, sw.width, sw.height]}
+})()`
+
+type statusState struct {
+ StripTop, BarBottom float64
+ Stage, Switch []float64
+}
+
+// TestTidyStripMeetsTheBar (final review, finding 7, V2): the strip's
+// surface starts directly under the bar, with no band of desk between
+// them, and the font status keeps its room in the stage's column, so a
+// note appearing and clearing moves neither the stage nor the view
+// switch.
+func TestTidyStripMeetsTheBar(t *testing.T) {
+ te := openTidyEditor(t, 2, 1280, 720)
+ read := func() statusState {
+ var s statusState
+ te.rig.Run(chromedp.Evaluate(statusJS, &s))
+ return s
+ }
+ before := read()
+ if math.Abs(before.StripTop-before.BarBottom) > 1 {
+ t.Errorf("the strip's top is at %.1f and the bar's bottom at %.1f; want the strip directly under the bar", before.StripTop, before.BarBottom)
+ }
+ // A note, said as font-status.mjs says one (the longest the catalog
+ // has, which stays a while), then cleared.
+ te.rig.Run(chromedp.Evaluate(`(s => { s.setAttribute('data-state', 'unavailable'); s.querySelector('[slides-fonts-status-text]').textContent = s.getAttribute('data-unavailable') })(document.querySelector('[slides-fonts-status]'))`, nil))
+ said := read()
+ te.rig.Run(chromedp.Evaluate(`(s => { s.removeAttribute('data-state'); s.querySelector('[slides-fonts-status-text]').textContent = '' })(document.querySelector('[slides-fonts-status]'))`, nil))
+ cleared := read()
+ for _, c := range []struct {
+ when string
+ s statusState
+ }{{"with a font note shown", said}, {"with the note cleared", cleared}} {
+ if fmt.Sprint(c.s.Stage) != fmt.Sprint(before.Stage) || fmt.Sprint(c.s.Switch) != fmt.Sprint(before.Switch) {
+ t.Errorf("%s the stage is %v and the switch %v; before, %v and %v: want nothing moved", c.when, c.s.Stage, c.s.Switch, before.Stage, before.Switch)
+ }
+ }
+}