Skip to content

refactor: enhance table rendering with dynamic column widths and impr… - #40

Merged
akashnairrr merged 1 commit into
masterfrom
akash/fix/table-layouts
Jul 14, 2026
Merged

akashnairrr merged 1 commit into
masterfrom
akash/fix/table-layouts

Conversation

@akashnairrr

@akashnairrr akashnairrr commented Jul 14, 2026 •

Copy link
Copy Markdown

…oved styling

Summary by CodeRabbit

  • Enhancements

    • Improved table rendering with responsive, width-aware column sizing.
    • Added support for fixed layouts, proportional widths, and maximum table widths.
    • Improved handling of missing, overflowing, or invalid table dimensions.
    • Standardized font sizing and preserved formatted cell content.
  • Tests

    • Updated table fixtures to reflect the enhanced layout and column-sizing behavior.

@akashnairrr
akashnairrr merged commit 125c36d into master Jul 14, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb3e620f-096b-495f-9424-de61f22f88b8

📥 Commits

Reviewing files that changed from the base of the PR and between 7b7992c and 6446aac.

📒 Files selected for processing (5)
  • tests/data/html/dynamic_table.html
  • tests/data/html/table.html
  • tiptapy/templates/dynamicTable.html
  • tiptapy/templates/dynamic_table.html
  • tiptapy/templates/table.html

📝 Walkthrough

Walkthrough

Table templates now calculate column widths, render fixed-layout tables with <colgroup> elements, and apply consistent sizing styles. Dynamic table inputs and visibility handling are more defensive, and HTML fixtures reflect the generated structure.

Changes

Table sizing and rendering

Layer / File(s) Summary
Dynamic column model
tiptapy/templates/dynamicTable.html, tiptapy/templates/dynamic_table.html
Dynamic table data now defaults defensively, derives visible columns with explicit ordering and widths, and applies font-size defaults.
Width calculation and table output
tiptapy/templates/*.html, tests/data/html/*.html
Templates calculate pixel or percentage column widths, apply fixed-layout table styles, emit <colgroup> elements, and update fixtures to match the generated markup.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: markpollmann, chouglesaud

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch akash/fix/table-layouts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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