Fiesta v1.7.0: the drive's audit and the spacing check
testdata/rhythm.js is v1.7.0's check/rhythm/rhythm.js byte for byte, and make test-spacing runs fiesta@v1.7.0; the drive's header names it and is rewrapped (Fable's re-review Lows 1 and 2). The re-review's Low 3 (Cancel shown with Choose hidden) is a state google-import.mjs never reaches: it reveals Choose first and never hides it again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+25
−8
Makefile+1 −1chrome/rhythm_browser_test.go+4 −2chrome/testdata/rhythm.js+20 −5
CI passed — run details
CI log
=== modcache === all modules verified === vet === CGO_ENABLED=0 go vet ./... CGO_ENABLED=0 go vet -tags browser ./... === fmt === === build === CGO_ENABLED=0 go build -buildvcs=false ./... === go-test === CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/estilo.git/base 0.004s ok amadan.net/oficina/estilo.git/brand 0.002s ok amadan.net/oficina/estilo.git/busy 0.010s ok amadan.net/oficina/estilo.git/callui 0.006s ok amadan.net/oficina/estilo.git/chrome 2.758s ? amadan.net/oficina/estilo.git/cmd/oficina-notices [no test files] ok amadan.net/oficina/estilo.git/colophon 0.021s ok amadan.net/oficina/estilo.git/credits 0.004s ok amadan.net/oficina/estilo.git/credits/catalog 0.003s ok amadan.net/oficina/estilo.git/desk 0.004s ok amadan.net/oficina/estilo.git/googleimport 1.497s ok amadan.net/oficina/estilo.git/homeconnect 0.004s ok amadan.net/oficina/estilo.git/internal/lint 0.007s ? amadan.net/oficina/estilo.git/internal/tokencheck [no test files] ok amadan.net/oficina/estilo.git/menu 0.010s ok amadan.net/oficina/estilo.git/savestatus 0.105s ok amadan.net/oficina/estilo.git/side 0.132s ok amadan.net/oficina/estilo.git/sky 0.031s ok amadan.net/oficina/estilo.git/theme 0.012s === spacing === go run amadan.net/rastrillo/fiesta/cmd/fiesta@v1.7.0 spacing . go: downloading amadan.net/rastrillo/fiesta v1.7.0
diff --git a/Makefile b/Makefile| index 945ee8d..3715240 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -76,7 +76,7 @@ test-go: |
| # require or a tool directive: estilo is imported by every app, and a |
| # Fiesta requirement here would join their module graphs and move the |
| # Fiesta their rastrillo was built against. |
| -FIESTA_VERSION := v1.6.0 |
| +FIESTA_VERSION := v1.7.0 |
| test-spacing: |
| go run amadan.net/rastrillo/fiesta/cmd/fiesta@$(FIESTA_VERSION) spacing . |
diff --git a/chrome/rhythm_browser_test.go b/chrome/rhythm_browser_test.go| index 996b5d1..8d7cb0f 100644 |
| --- a/chrome/rhythm_browser_test.go |
| +++ b/chrome/rhythm_browser_test.go |
| @@ -11,8 +11,10 @@ |
| // absolute child it does not pass over; none of these pages is an |
| // rst-stack, so the last two have nothing to find here. It does not read |
| // past a closed <details>' summary, nor into a list (a text block), so |
| -// an open Colophon entry is audited from its own root. Not part of `make test`: it needs Node 22+ and |
| -// Playwright (ESTILO_PLAYWRIGHT, ESTILO_BROWSERS as for the title check). |
| +// an open Colophon entry is audited from its own root. |
| +// |
| +// Not part of `make test`: it needs Node 22+ and Playwright |
| +// (ESTILO_PLAYWRIGHT, ESTILO_BROWSERS as for the title check). |
| // ESTILO_SHOTS=<dir> saves each page there to look at. |
| package chrome |
diff --git a/chrome/testdata/rhythm.js b/chrome/testdata/rhythm.js| index 106c2a1..7167b1c 100644 |
| --- a/chrome/testdata/rhythm.js |
| +++ b/chrome/testdata/rhythm.js |
| @@ -19,7 +19,7 @@ |
| // the stack's, which its margins are measured against; |
| // out-of-flow a stack's child that is absolute or fixed and that the |
| // stack does not pass over (rst-stack-out, the modal |
| -// overlay, a dialog, a popover), so the stack gives it a margin or |
| +// overlay, .rst-sr-only, a dialog, a popover), so the stack gives it a margin or |
| // reads it as the block before the next. |
| // |
| // It is one function expression, evaluated in the page: the Go package |
| @@ -408,11 +408,25 @@ |
| var stackSel = "[rst-stack], .rst-stack"; |
| var stacks = Array.prototype.slice.call(start.querySelectorAll(stackSel)); |
| if (start.matches(stackSel)) stacks.unshift(start); |
| - stacks = stacks.filter(function (el) { return el.getClientRects().length > 0 && !outside(el); }); |
| + stacks = stacks.filter(function (el) { |
| + return el.getClientRects().length > 0 && getComputedStyle(el).visibility !== "hidden" && !outside(el); |
| + }); |
| // passedOver is what the stack's own rules pass over (tokens.css): |
| - // not drawn, or marked as out of the column. |
| - var passedOver = '[hidden], [type="hidden"], [rst-stack-out], .rst-stack-out, [rst-modal-overlay], .rst-modal-overlay, dialog, [popover], script, style, template'; |
| + // not drawn, or marked as out of the column. Each spelling of the |
| + // stack passes over its own spelling of the marks, so a child is |
| + // passed over only if every spelling the stack carries passes it: |
| + // under class="rst-stack", [rst-stack-out] still takes the margin. |
| + var passed = ', .rst-sr-only, dialog, [popover], script, style, template'; |
| + var passedBy = { |
| + attr: '[hidden], [type="hidden"], [rst-stack-out], [rst-modal-overlay]' + passed, |
| + cls: '[hidden], [type="hidden"], .rst-stack-out, .rst-modal-overlay' + passed |
| + }; |
| + function passedOver(stack, child) { |
| + if (stack.hasAttribute("rst-stack") && !child.matches(passedBy.attr)) return false; |
| + if (stack.classList.contains("rst-stack") && !child.matches(passedBy.cls)) return false; |
| + return true; |
| + } |
| stacks.forEach(function (stack) { |
| var s = getComputedStyle(stack); |
| var gap = parseFloat(s.rowGap); |
| @@ -427,7 +441,8 @@ |
| } |
| for (var child = stack.firstElementChild; child; child = child.nextElementSibling) { |
| var cs = getComputedStyle(child); |
| - if (cs.display === "none" || (cs.position !== "absolute" && cs.position !== "fixed") || child.matches(passedOver)) continue; |
| + if (!shows(stack, child) || cs.display === "none" || |
| + (cs.position !== "absolute" && cs.position !== "fixed") || passedOver(stack, child)) continue; |
| var margin = parseFloat(cs.marginBlockStart) || 0; |
| findings.push({ |
| kind: "out-of-flow", gap: round(margin), before: describe(child), after: "", |