oficina / estilo Public

chrome: Bar.Lead's doc says the app MUST hide it on narrow screens

Fable's P3.9 on estilo #34. The bar draws the lead at every width and
never hides it, and the end group does not shrink, so at 320px a lead
squeezes the title to nothing. The doc comment now says an app MUST hide
it on narrow screens (Docs does, below 800px), and the README says so
too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev ee781f8f6b1c2f2ee063d595813e06f9b4c969d6 parent b9ba6dc
2 files changed, +6 −3
  • README.md +2 −1
  • chrome/chrome.go +4 −2
diff --git a/README.md b/README.md
index 960eb0a..86463d5 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,8 @@ Docs' I2 editor added two slots to `chrome.Bar` (spec
stacked (`estilo-bar~="stacked"`): from 800px a 56px header with the title
over the menus, below it the one-row bar with the menus as a second row;
`--estilo-bar-block-size` is published either way. `Lead` takes app markup
-for the start of the end group (Docs' undo/redo). A bar with either slot
+for the start of the end group (Docs' undo/redo), which the app must hide
+on narrow screens itself. A bar with either slot
draws its end group as one set of controls; a bar with neither is
unchanged, byte for byte. `Action.WideOnly` hides an action below 64rem
and keeps it out of the Menu sheet, and `menu.Item.Controls` is a toggle
diff --git a/chrome/chrome.go b/chrome/chrome.go
index 4b92009..4be639a 100644
--- a/chrome/chrome.go
+++ b/chrome/chrome.go
@@ -171,8 +171,10 @@ type Bar struct {
Menubar template.HTML
// Lead is app markup drawn at the start of the end group, before the
// actions, at every width (Docs' undo/redo pair). It never goes into
- // the Menu sheet; the app hides it where it does not want it. Trusted
- // markup, like Menubar.
+ // the Menu sheet, and the bar never hides it, so the app MUST hide it
+ // on narrow screens (Docs hides it below 800px): the end group does
+ // not shrink, and at 320px a lead squeezes the title to nothing.
+ // Trusted markup, like Menubar.
//
// A bar with Menubar or Lead set draws its end group as one set of
// controls (28px pills, the avatar as a circle, a divider before the