Skip to content

Fix table column layout when cells contain links - #5

Open
Obooman wants to merge 1 commit into
mainfrom
cursor/fix-table-link-layout-8552
Open

Fix table column layout when cells contain links#5
Obooman wants to merge 1 commit into
mainfrom
cursor/fix-table-link-layout-8552

Conversation

@Obooman

@Obooman Obooman commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

On the landing playground, README-style tables with links in cells looked broken: pipes/links split across extra columns instead of staying in a 2-column grid.

Root cause: ProseMirror merges overlapping inline decorations into flat spans (not nested). Putting display:flex on the source row made each link fragment ([, label, ](url), padding) its own flex item.

Fix

  • Concealed table rows: hide the source line and render a real multi-cell widget (.hm-table-visual) with proper columns
  • Click a rendered row → caret enters that line (source Revealed for editing), same idea as diagram widgets
  • Links inside the visual row: click opens; otherwise click edits
  • Landing SW: bump cache to v2, network-first for JS/CSS so deploys are not masked by stale playground chunks
  • Sample doc includes a linked table for the playground

Test

  • New assertion: README table with [docs/...](...) keeps exactly 2 visual columns per row
  • Full suite green locally
Open in Web Open in Cursor 

ProseMirror merges overlapping inline decorations into flat spans, so
flex-on-source-spans split link cells into extra columns. Render
concealed table rows via a real multi-cell widget instead; click a row
to edit source. Also bump the landing SW cache and network-first JS/CSS.

Co-authored-by: Oboo Cheng <oboochin@gmail.com>
@Obooman
Obooman marked this pull request as ready for review August 1, 2026 17:58
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