Skip to content

Lay a table cell's one text inline, so a copied row stays on one line - #75

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-w3bdax
Oct 29, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-w3bdax

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Why

LayoutHtml writes each table cell's text as <div class="ms-text">. A browser copies a block as its own line, so a copied table came out one cell per line with the empty cells gone. Copying SharpMUSH's +bbread from the portal gives this:

#	Board	New	Last
Official
1
Announcements
Oct 09

Change

LayoutCss.Fixed gains .ms-table :is(th, td) > .ms-text:only-child { display: inline-block; width: 100%; }. A cell holding just its text looks the same, and a copied row is its cells with tabs between them:

#	Board	New	Last
Official		
1	Announcements		04:49

A cell that holds several blocks keeps them stacked.

Checked

  • In Chromium, using +bbread's real HTML plus the portal's shell.css: the copy is fixed and row heights are the same (17 px each, 154 px for the table).
  • SharpMUSH's tools/responsive-sweep/table-layout.test.mjs passes with the new rule. That test covers headers keeping whole words, long cells wrapping, and narrow tables fitting.
  • MarkupString.Tests: 1,384 passed, including a new check for the rule.

CHANGELOG: 2.24.1, Fixed.


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Copied table rows now retain their cells together, with tabs separating cell contents. A cell containing a single text item is laid out inline across the cell width.

Each cell's text is a <div class="ms-text">, and a browser copies a block as
a line of its own: copying +bbread from the portal gave one line per cell,
with the empty cells gone. A cell that holds only its text now lays it out
as an inline-block filling the cell, which looks the same and copies as the
cells of the row with tabs between them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7VgCvTw68ucmmEZ5tV
@HarryCordewener HarryCordewener self-assigned this Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 492b6661-385c-4a64-a3bd-4df734075993
Commits

Reviewing files that changed from the base of the PR and between a7f5d2d and b49fc3c.

Files selected for processing: 3
  • CHANGELOG.md
  • MarkupString.Html/LayoutCss.cs
  • MarkupString.Tests/Layout/WidgetLayoutTests.cs

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.

Walkthrough

The fixed layout CSS now displays a table cell’s sole .ms-text child as a full-width inline block. A test checks the rule, and the changelog describes the copied-table behavior.

Changes

Copied table cell layout

Layer / File(s) Summary
Single-text cell layout
MarkupString.Html/LayoutCss.cs, MarkupString.Tests/Layout/WidgetLayoutTests.cs, CHANGELOG.md
LayoutCss.Fixed adds a rule for a cell’s sole .ms-text child. The test checks inline-block display and full width. The changelog describes the copied-table behavior.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: claude

Merge Risk: Minimal · up to b49fc

The CSS change, focused test, and changelog align with the stated copied-table behavior.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: a table cell's sole text is laid out inline so copied table rows stay on one line. The raw summary and PR objectives both describe a CSS rule in LayoutCss.Fixed that …
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Title check

Explanation

The title states the main change: a table cell's sole text is laid out inline so copied table rows stay on one line. The raw summary and PR objectives both describe a CSS rule in LayoutCss.Fixed that makes a sole .ms-text child inline-block at full width, which keeps copied rows on one line. The title is specific, uses no file lists or vague terms, and is a single sentence of 15 words, so it is clearly related to the changeset.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@HarryCordewener
HarryCordewener marked this pull request as ready for review October 29, 2026 04:59
@HarryCordewener
HarryCordewener merged commit 3e2f34d into main Oct 29, 2026
7 checks passed
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