Skip to content

Several titles in a rule or box edge - #57

Merged
HarryCordewener merged 2 commits into
mainfrom
claude/scene-pose-types-urw68p
Oct 9, 2026
Merged

HarryCordewener merged 2 commits into
mainfrom
claude/scene-pose-types-urw68p

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Before: a Rule or a Frame edge held one title, placed left, centre or right.

After: Rule.Titles and Frame.Titles add EdgeTitles beside the first title, each with its own side, so one line reads =< Wren >=========< Scene 3 >=< 21:04 >= or =< A >=======< B >======< C >=. Frame.BottomTitles puts titles in a box's bottom edge (+==< 1/3 >=+). When the line is too narrow, titles are left out by EdgeTitle.Priority, highest number first, the way a table leaves out its columns.

SharpMUSH wants this for scene pose headers: the speaker and pose on the left, the scene on the right.

How: BlockText.Edge takes a list of titles. Titles on one side sit a cell apart; a centre title moves over rather than crowd a side. A title with no Priority takes its side's: left 1, right 2, centre 3. Among equal priorities the centre goes first, then the right, then the left, and on each side the title farthest from its end. With one title left it uses the old single-title path, so existing output is unchanged. DrawLinear reads the titles left to right, joined by commas. HTML draws a multi-title edge as a flex row of title spans and line segments (.ms-titles, .ms-line); single-title markup is unchanged. The JSON codec writes tt, bt and a title's p, each omitted when unset. CHANGELOG (Unreleased / Added) and docs/layout.md are updated. New public API is in PublicAPI.Unshipped.txt, so this is a minor release (2.16.0).

Tests: 15 new in EdgeTitleTests; all 1122 pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nz2RWtEgTogzgVRxwBSMAA

Rule.Titles and Frame.Titles add EdgeTitles beside the first title, each
left, centre or right; Frame.BottomTitles puts titles in the bottom edge.
Titles that do not fit are left out centre first, then right, then left.
Terminal, screen reader, HTML and JSON all carry them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz2RWtEgTogzgVRxwBSMAA
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: da688cc0-20b6-4d44-8c94-831ed85179c6
📥 Commits

Reviewing files that changed from the base of the PR and between 1a3d341 and d32d6e0.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • MarkupString.Html/Emitters/LayoutHtml.cs
  • MarkupString.Html/LayoutCss.cs
  • MarkupString.Tests/Layout/EdgeTitleTests.cs
  • MarkupString/Layout/Blocks/BlockText.cs
  • MarkupString/Layout/Blocks/Frame.cs
  • MarkupString/Layout/Blocks/LayoutJson.cs
  • MarkupString/PublicAPI.Unshipped.txt
  • docs/layout.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.


Walkthrough

Rules and frames now support multiple side-positioned titles. Frames also support bottom-edge titles. Layout and HTML output render the titles, JSON preserves them, and tests and documentation cover the added behavior.

Changes

Multi-title Edges

Layer / File(s) Summary
Title model and edge layout
MarkupString/Layout/Blocks/Frame.cs, MarkupString/Layout/Blocks/BlockText.cs, MarkupString/PublicAPI.Unshipped.txt
Adds the EdgeTitle record and title arrays to rules and frames. BlockText.Edge lays out multiple titles and omits titles when they do not fit.
Frame and rule rendering
MarkupString/Layout/Blocks/Frame.cs, MarkupString.Html/Emitters/LayoutHtml.cs, MarkupString.Html/LayoutCss.cs, MarkupString.Tests/Layout/EdgeTitleTests.cs
Frame and rule drawing use combined titles. HTML renders title spans and edge lines, and CSS styles title-bearing edges.
Serialization and feature validation
MarkupString/Layout/Blocks/LayoutJson.cs, MarkupString.Tests/Layout/EdgeTitleTests.cs, docs/layout.md, CHANGELOG.md
JSON reads and writes rule and frame title arrays. Tests cover title layout, ordering, overflow, linear output, serialization, and HTML. Documentation describes title placement and rendering.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to d32d6

The identified title placement follows the intended behavior. No change is needed before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.48% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 6 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: support for several titles on rule or frame edges.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.48% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 6 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

EdgeTitle.Priority works as TableColumn.Priority does: the highest number
goes first. Unset, a title takes its side's (left 1, right 2, centre 3),
which keeps the order the titles were dropped in before. JSON keeps it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nz2RWtEgTogzgVRxwBSMAA
@HarryCordewener
HarryCordewener merged commit f1348bb into main Oct 9, 2026
7 checks passed
@HarryCordewener
HarryCordewener deleted the claude/scene-pose-types-urw68p branch October 9, 2026 02:05
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.

2 participants