From 547e66b956d13e9fb6e43107e34d4df9f8540b77 Mon Sep 17 00:00:00 2001 From: florence-oai Date: Tue, 14 Apr 2026 15:11:17 -0700 Subject: [PATCH] Add slides text alignment visual checks --- .../references/slides/visual-change-loop.md | 61 +++++++++++++++++++ .../google-slides-visual-iteration/SKILL.md | 6 +- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/plugins/google-drive/skills/google-drive/references/slides/visual-change-loop.md b/plugins/google-drive/skills/google-drive/references/slides/visual-change-loop.md index b9b72376..d925231d 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/visual-change-loop.md +++ b/plugins/google-drive/skills/google-drive/references/slides/visual-change-loop.md @@ -23,6 +23,7 @@ Use this recipe whenever a Slides write can change anything the user will see, e - If the thumbnail response only provides a thumbnail URL or `contentUrl`, save the rendered image locally with `curl -L "$contentUrl" -o /tmp/slides-thumb-.png` before visual review. - Use the returned image artifact or the saved local PNG as the visual source of truth for overlap, clipping, padding, footer collisions, text rendering, and shape alignment. - Use that thumbnail as the primary visual signal, but not as the only signal for overflow or collision checks. +- After overlap and overflow checks, apply the Text Alignment Guideline below to the slide. - Write down the 2-4 concrete visible issues you are fixing in the next pass. 3. Choose the correct raw edit family. @@ -48,6 +49,7 @@ Use this recipe whenever a Slides write can change anything the user will see, e - If the write fixed the main text but left stale bars, arrows, borders, wrapping, or collisions, the slide is not done. - If text from one box still overlaps, crowds, or visually crashes into text from an adjacent box, the slide is not done. - If a new small label looks one line low, visually offset, or miscentered relative to its neighbors, the slide is not done. Re-read the slide and tighten the text box geometry before moving on. +- After overlap and overflow verification, re-check text alignment using the Text Alignment Guideline below before declaring the pass clean. - If the thumbnail looks cleaner but the refreshed slide structure still suggests narrow, colliding, or suspiciously adjacent text boxes, err on the side of caution and keep working the slide. 6. Run a second and third fresh review loop. @@ -59,6 +61,65 @@ Use this recipe whenever a Slides write can change anything the user will see, e - Treat pass 3 as a polish pass: look for anything that still feels slightly off, uneven, cramped, weakly grouped, or visually unbalanced, even if the slide is already functional. - Only stop after the third fresh review finds nothing materially worth changing. +## Text Alignment Guideline + +Check every slide for text alignment after overlap and overflow checks. + +Constants: +- `alignment_tolerance = 4 pt` +- `repeated_size_tolerance = 6 pt` +- `min_internal_padding = 8 pt` + +Use `alignment_tolerance` for left/right/top/bottom edges, centerlines, text-box tops, and visible baselines. +Use `repeated_size_tolerance` for peer text boxes, cards, rules, bars, and other repeated layout elements that should share the same width or height. +Use `min_internal_padding` for text inside cards, shapes, table cells, labels, callouts, and buttons. + +1. Title / Subtitle Group +- FAIL if title, subtitle, eyebrow, accent rule, or section label left edges differ by more than `alignment_tolerance` unless clearly intentional. +- FAIL if centered title/subtitle text does not share the same visual centerline within `alignment_tolerance`. +- FAIL if title/subtitle vertical gaps differ noticeably from equivalent slides. +- FAIL if a title/subtitle group appears unintentionally shifted relative to the main content grid. + +2. Repeated Text Blocks +- For peer cards, rows, columns, timeline items, table cells, or callouts: +- FAIL if heading text-box tops differ by more than `alignment_tolerance`. +- FAIL if body text-box tops differ by more than `alignment_tolerance`. +- FAIL if heading/body left edges differ across peer elements by more than `alignment_tolerance`. +- FAIL if centered text boxes do not share the visual centerline of their card, shape, icon, or peer group within `alignment_tolerance`. +- FAIL if peer text baselines appear uneven, even when box geometry is aligned. +- FAIL if peer text boxes that should match differ in width or height by more than `repeated_size_tolerance`. + +3. Text-To-Container Alignment +- FAIL if text intended to be centered in a shape/card is visibly off-center horizontally or vertically by more than `alignment_tolerance`. +- FAIL if text intended to be left-aligned does not share a consistent inset from the container edge within `alignment_tolerance`. +- FAIL if text touches or nearly touches its container edge with less than `min_internal_padding`. +- FAIL if card heading, body, icon, and decorative rule use different alignment anchors without a clear hierarchy reason. + +4. Multi-Line Text +- FAIL if wrapped lines create uneven visual starts in repeated peers. +- FAIL if one peer has a very different line count that makes the group feel misaligned. +- FAIL if text-box width changes only to force wrapping but breaks card/grid alignment. +- ALLOW wider text boxes only when centerline or intended inset remains aligned within `alignment_tolerance`. + +5. Tables / Lists +- FAIL if row labels, numeric values, bullets, or list text do not share consistent x positions within `alignment_tolerance`. +- FAIL if bullets and their text have inconsistent hanging indents. +- FAIL if numbers meant to compare vertically are not right-aligned or decimal-aligned. +- FAIL if table headers and body cells use visibly different alignment anchors without a clear reason. + +6. Deck-Wide Consistency +- FAIL if equivalent slide titles shift x/y positions across normal content slides by more than `alignment_tolerance`. +- FAIL if repeated footer/source/page-number text shifts inconsistently across slides by more than `alignment_tolerance`. +- WARN if a hero/title slide intentionally uses different alignment but still feels balanced. + +Preferred Fix Direction +- Align peer text boxes using exact x/y coordinates, not visual nudging. +- Preserve consistent text insets inside repeated cards. +- Match title/subtitle anchors across equivalent slides. +- Center text by matching centerlines, not by eyeballing left edges. +- If wrap fixes require wider text boxes, keep the same centerline or same intended inset as peer elements. +- After edits, verify both geometry and rendered thumbnails. + ## Mini Example - Pass 1: fix the obvious issue cluster, such as clipped text, stale styling, or objects that collide. diff --git a/plugins/google-drive/skills/google-slides-visual-iteration/SKILL.md b/plugins/google-drive/skills/google-slides-visual-iteration/SKILL.md index 09c057eb..f7701d35 100644 --- a/plugins/google-drive/skills/google-slides-visual-iteration/SKILL.md +++ b/plugins/google-drive/skills/google-slides-visual-iteration/SKILL.md @@ -49,7 +49,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Before declaring a visual element blocked, classify it as a shape, a line or connector, or an image. Then choose the matching raw request family from [batch-update-recipes](./batch-update-recipes.md). - When positioning a new text box relative to another object, remember that Slides transforms use the text box's upper-left corner, not its center. Compute the target top-left from the desired visual center and the new text box footprint before writing. - If the user provides or implies a stronger manually polished target slide, treat that target as an explicit alignment and styling reference rather than trying to invent the layout card by card. -- If the current write changes visible text flow, geometry, or styling, follow [visual-change-loop](./visual-change-loop.md) and treat this reference as the slide-local expanded version of that recipe. +- If the current write changes visible text flow, geometry, or styling, follow [visual-change-loop](../google-drive/references/slides/visual-change-loop.md) and treat this reference as the slide-local expanded version of that recipe. 3. Start with a thumbnail. - Call `get_slide_thumbnail` first. @@ -70,6 +70,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Look for text too close to edges or neighboring elements. - Look for text overflow, clipping, or density that makes the slide feel compressed. - Look for overlapping text boxes, shapes, charts, and images. +- After overlap and overflow checks, apply the Text Alignment Guideline in [visual-change-loop](../google-drive/references/slides/visual-change-loop.md) to every slide. - Look for adjacent text boxes whose copy is colliding, wrapping into the neighboring lane, or reading like one crowded block instead of two separate elements. - Look for misaligned images, cards, icons, and text blocks. - Look for grouped boxes, cards, or sections whose header text, body starts, icons, or internal padding do not sit on the same visual plane. @@ -107,6 +108,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Verify that small target or benchmark text changed along with the main headline value when both were in scope. - Verify that accent bars, arrow shapes, borders, and connector strokes changed visually, not just the text around them. - Verify that newly placed text labels sit optically centered in their intended lane or container. If the text looks one line low or offset relative to nearby elements, treat that as unfinished geometry. +- After overlap and overflow verification, re-check text alignment using the Text Alignment Guideline in [visual-change-loop](../google-drive/references/slides/visual-change-loop.md) before declaring the pass clean. - Re-read the slide structure after passes that touched text boxes, wrapping, or neighboring text lanes. If the thumbnail and refreshed geometry disagree about whether two boxes are still risky, err on the side of caution and keep editing. - If a fix introduced a new collision, imbalance, or cramped layout, correct that next instead of blindly continuing. - If adjacent text boxes still crowd or overlap after a pass, keep working the slide until both boxes have clean separation and readable padding. @@ -264,7 +266,7 @@ The Slides connector exposes raw `batch_update` requests. That means: - [deck-scope-verification](./deck-scope-verification.md) - [batch-update-recipes](./batch-update-recipes.md) - [sheets-chart-replacement](./sheets-chart-replacement.md) -- [visual-change-loop](./visual-change-loop.md) +- [visual-change-loop](../google-drive/references/slides/visual-change-loop.md) ## Example Prompts