Skip to content

Project ribbon: bound an in-place swatch gallery to six tiles and a More button (#1823) - #1863

Merged
yeroo merged 7 commits into
mainfrom
issue-1823-project-ribbon-fit-bound-an-in-r
Nov 4, 2026
Merged

yeroo merged 7 commits into
mainfrom
issue-1823-project-ribbon-fit-bound-an-in-r

Conversation

@yeroo

@yeroo yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Closes #1823.

What changed

An in-ribbon (in place) UI-plugin swatch gallery is no longer estimated and drawn as one row of every tile. It shows a
bounded strip of at most IN_PLACE_TILES (6) tiles - the first ones, or the window ending on the checked swatch - and,
when it has more, a 16 px More button that opens or shuts the whole gallery in the existing gallery flyout
(FlyoutTarget::Gallery, through flyout_toggle). ribbon_fit::model_control_w and Docxy::swatch_gallery read the
same geometry (gallery_span, more_w, gallery_rows/in_place_window), so the estimate is the drawn width. A
flyout copy still wraps every tile with its section headers. Styles and Table Styles galleries are unchanged.
Option 2 of the issue (a drop-down gallery declared by the manifest) is not done.

  • Harness: ribbon-read galleries entries add shown/first_shown/more (the model's window) and
    drawn_shown/drawn_first/drawn_more (what the last frame drew in place); region gallery-more:<id>.
  • Fixture: fixture.wide (9 swatches, group "Fixture Wide" on the Report tab, the 8th checked).
  • Docs: CLAUDE.md, docs/ui-test-harness.md.

Tests

  • Unit: ribbon_fit / plugin_ui bounded estimate (11 and 24 tiles), no More at the bound, flyout unchanged,
    two 11-tile galleries keep a Font group Full at 1600 px (with and without back-fill), the checked-tile window.
  • uiharness/cases/project-plugin-ui.uit: new case (bounded strip, window shift, More opens / shuts / reopens);
    23/23 locally on Windows desktop.
  • Whole suite: see the merge note.

Review

Three revmux rounds. r1: Major (the new group crowded the View tab; moved to Report) + 3 minors, fixed. r2: Major (More
bypassed flyout_toggle, so a second press did not close it) + 5 minors, fixed. r3: 2 minor/immaterial, fixed.
review stopped: round 3 had no Major; all findings fixed

🤖 Generated with Claude Code

https://claude.ai/code/session_01HSDL3qcRMWrVVmMHix91Ym

yeroo and others added 7 commits November 4, 2026 15:21
#1823)

A plugin's swatch gallery drawn in the Project ribbon was one row of every
tile, so two 11-tile galleries could not fit a 1600 px window. In place it
now shows a window of IN_PLACE_TILES tiles (keeping the checked swatch in
view) and a More button that opens the whole gallery as its flyout; the
estimate and the renderer read the same span and More width. Flyout copies
and the Styles / Table Styles wells are unchanged. ribbon-read reports
shown, first_shown and more; the gallery-more:<id> region clicks More.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
…tton (#1823)

fixture.wide (group "Fixture Wide", before "Fixture Styles" on the View
tab) is longer than the in-place bound, so project-plugin-ui.uit can read
shown/more and click More; fixture.styles (six) pins no More at the bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
…indow (#1823 r1)

The nine-tile group crowded the View tab at 1180 px, putting the #1761 and
#1762 cases at risk on other displays; the Report tab has room, and those
cases are back exactly as on main. gallery_rows now returns the in-place
window itself, so swatch_gallery has one call for both branches. CLAUDE.md's
"never capped" and "in place every tile" now point at the bound;
docs/ui-test-harness.md and uiharness's region check know gallery-more:<id>
and the shown/first_shown/more keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
…atch (#1823 r2)

On click, More reopened the flyout its own press had just closed through
the backdrop, so a second press never shut it. It now uses flyout_toggle
on mouse-down, as a collapsed group's button and the chevron do. The
fixture's state checks fixture.wide.7, so the .uit case pins the window
end to end (first_shown 2) and a second More press closing the flyout.
swatch_gallery's doc and CLAUDE.md describe the bounded strip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
 r3)

shown/first_shown/more are the model's window, computed by the harness;
drawn_shown/drawn_first/drawn_more now come from what swatch_gallery last
drew in place (Docxy::drawn_galleries, cleared per render), null when the
gallery was not drawn in place, so a case can see the renderer agree. The
gallery's tiles reuse the group's command list instead of a second build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
# Conflicts:
#	suite/docxy/src/main.rs
 ci-r1)

The script parser's REGION_WORDS and the usage text lacked the region the
border expectation's list had, so every_region_list_names_the_same_regions
failed; and clippy's redundant_closure flagged ribbon-read's position call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSDL3omZyNEazcgFEkKoTn
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yeroo

yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Not merged automatically: blocked. merge-check on 1644872:

ci-failed: desktop suite (macos) CANCELLED https://github.com/yeroo/docxy/actions/runs/41850551420/job/126668277649

Both attempts of desktop suite (macos) were cancelled after ~15 min with no step run or failed (steps: []), which looks like
the runner rather than the change (the same job took 12 min on main at 09:53). The one CI rerun and the one ci-fix round
(clippy + region list, fixed in 1644872) are used, so this is the human's call: rerun the macOS job, or merge.

Everything else: review stopped after r3 with no Major (all findings fixed); 13/14 checks green; local whole suite on
1644872: 2744 passed, 1 failed (convert_child::tests::a_child_that_dies_is_a_load_error_not_a_crash, the known local
memory flake; this PR does not touch convert_child.rs).

@yeroo

yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Still not merged: blocked. After the human's rerun, merge-check on 1644872:

ci-failed: desktop suite (macos) CANCELLED https://github.com/yeroo/docxy/actions/runs/41850551420/job/126708554014

Third cancellation in a row, again after exactly 15 min (16:33:16 -> 16:48:17Z) with no step run or failed. All other 13 checks are green.

@yeroo
yeroo merged commit 96db9b1 into main Nov 4, 2026
39 of 42 checks passed
@yeroo
yeroo deleted the issue-1823-project-ribbon-fit-bound-an-in-r branch November 4, 2026 17:12
@yeroo

yeroo commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Merged on the human's explicit instruction ("merge #1863 without macOS"): macOS runners are no longer available, so
desktop suite (macos) was cancelled after 15 min three times with no step run; it is not a result of this change.
Review stopped: round 3 had no Major; all findings fixed. Merge rounds: 1 counted conflict update (main.rs render, both
lines kept), 1 ci-fix round (clippy + region list). The other 13 checks are green on 1644872. Local whole suite on
1644872: 2744 passed, 1 failed (convert_child::tests::a_child_that_dies_is_a_load_error_not_a_crash, the known local
memory flake; this PR does not touch convert_child.rs), counted as passing per the machine's rule.
Follow-up for the macOS CI job: #1868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project ribbon fit: bound an in-ribbon gallery's width estimate (or let a swatch gallery be a drop-down)

2 participants