oficina / slides Public

Editor: the New slide pill's chevron keeps its rounded end

[slides-strip-add] > [rst-btn] (0,2,0) squared every corner and beat
the chevron's own rule (0,1,0), so the pill's end was square. The
chevron's rule is now as specific. TestTidyNewSlideStaysInView pins
the computed radii: outer ends round, the join square.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 41d9955567d675f579aeba7a0d5ffcef264f7ed9 parent 02b3de8
2 files changed, +21 −1
  • internal/slides/static/editor.css +1 −1
  • internal/slidestest/browser_editor_tidy_test.go +20 −0
diff --git a/internal/slides/static/editor.css b/internal/slides/static/editor.css
index 309af55..4b32895 100644
--- a/internal/slides/static/editor.css
+++ b/internal/slides/static/editor.css
@@ -501,7 +501,7 @@
gap: 6px;
justify-content: center;
}
-[slides-layouts-toggle] {
+[slides-strip-add] > [slides-layouts-toggle] {
border-end-end-radius: 999px;
border-start-end-radius: 999px;
flex: none;
diff --git a/internal/slidestest/browser_editor_tidy_test.go b/internal/slidestest/browser_editor_tidy_test.go
index 21b8b4e..9baf03f 100644
--- a/internal/slidestest/browser_editor_tidy_test.go
+++ b/internal/slidestest/browser_editor_tidy_test.go
@@ -118,6 +118,26 @@ func TestTidyNewSlideStaysInView(t *testing.T) {
t.Error("forty slides did not make the strip scroll inside itself: nothing above was measured scrolled")
}
+ // One pill: the outer ends round, the two corners where the button
+ // meets the chevron square.
+ var corners string
+ te.rig.Run(chromedp.Evaluate(`(() => {
+ const r = q => getComputedStyle(document.querySelector(q))
+ const add = r('[slides-strip-add] [data-command="new-slide"]'), chev = r('[slides-layouts-toggle]')
+ const round = v => parseFloat(v) >= 12, square = v => parseFloat(v) === 0
+ const out = []
+ for (const [name, v, want] of [
+ ['New slide top-left', add.borderTopLeftRadius, round], ['New slide bottom-left', add.borderBottomLeftRadius, round],
+ ['New slide top-right', add.borderTopRightRadius, square], ['New slide bottom-right', add.borderBottomRightRadius, square],
+ ['chevron top-left', chev.borderTopLeftRadius, square], ['chevron bottom-left', chev.borderBottomLeftRadius, square],
+ ['chevron top-right', chev.borderTopRightRadius, round], ['chevron bottom-right', chev.borderBottomRightRadius, round],
+ ]) if (!want(v)) out.push(name + ' is ' + v + ', want ' + (want === round ? 'round (12px or more)' : '0'))
+ return out.join('; ')
+ })()`, &corners))
+ if corners != "" {
+ t.Errorf("New slide and its chevron are not one pill: %s", corners)
+ }
+
te.rig.Run(
chromedp.Click(`[slides-strip-add] [data-command="new-slide"]`, chromedp.ByQuery),
waitFor(`document.querySelectorAll('[slides-strip] > [slides-strip-item]').length === 41`),