Skip to content

fix: markdown table row alignment#984

Closed
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:fix/markdown-table-alignment
Closed

fix: markdown table row alignment#984
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:fix/markdown-table-alignment

Conversation

@chaehyun2
Copy link
Copy Markdown
Contributor

@chaehyun2 chaehyun2 commented Apr 4, 2026

Summary

  • Switch table rendering from column-first to row-first layout (like HTML <tr>)
  • Cells in the same row now share height naturally via flex row containers
  • Add header row bottom border for visual separation
  • Equal column widths via flex: 1 instead of content-dependent sizing
  • minHeight: 40 prevents collapsed empty cells
  • minWidth: 100% on table content ensures small tables fill container width
  • Horizontal scroll indicator always visible (was hidden on web)

Changes

Single file: packages/happy-app/sources/components/markdown/MarkdownView.tsx (+44/-35)

Before (column-first): each column was a vertical container — cells in the same row could have different heights, and wide content clipped.

After (row-first): each row is a horizontal flex container — consistent row heights, proper text wrapping, clean borders.

Test plan

  • Simple 3×3 table renders with aligned rows
  • Long text in a cell wraps without clipping adjacent cells
  • Empty cells render with consistent height (minHeight: 40)
  • Wide tables (10+ columns) scroll horizontally
  • Header row visually separated from data rows
  • Tables with mixed content (bold, code, links) render correctly
  • Single-column and single-row tables display properly

🤖 Generated with Claude Code
via Happy

Switch table rendering from column-first to row-first (HTML <tr> style):
- Cells in the same row share height naturally via flex row
- Header row separated with bottom border
- Equal column widths via flex: 1
- minHeight: 40 prevents collapsed empty cells
- minWidth: 100% ensures table fills container
- Horizontal scroll indicator always visible

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@chaehyun2 chaehyun2 force-pushed the fix/markdown-table-alignment branch from cb30e22 to 39640e8 Compare April 21, 2026 01:18
@chaehyun2
Copy link
Copy Markdown
Contributor Author

Closing — upstream rewrote the table rendering with dynamic column widths, spansLength() content-aware sizing, alignItems: 'stretch', and HorizontalScrollView. The alignment issues this PR addressed are fully resolved.

@chaehyun2 chaehyun2 closed this May 2, 2026
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.

1 participant