docs(specs): markdown viewer HTML <table> support (GH13652)#13661
Draft
fbartho wants to merge 1 commit into
Draft
docs(specs): markdown viewer HTML <table> support (GH13652)#13661fbartho wants to merge 1 commit into
fbartho wants to merge 1 commit into
Conversation
Warp already renders GFM pipe-tables but drops raw-HTML `<table>` markup. The issue wants HTML tables specifically for what GFM can't express: `<br>` line breaks in cells and colspan/rowspan. This adds the product + tech spec for tier-zero tag warpdotdev#3 of warpdotdev#13652: recognize a block-level HTML `<table>`/`<thead>`/`<tbody>`/`<tr>`/`<th>`/`<td>` and map it onto Warp's existing FormattedTable + render path. Scopes the slices honestly: simple table (small, reuses the whole render chain), `<br>`-in-cell (medium, needs a cell-type + serialization change — the capability that makes HTML tables worth having), and colspan/rowspan (large, an explicit non-goal degraded to single-cell, deferred to its own effort since it needs a non-rectangular grid). Nested under specs/GH13652/ (per the specs/APP-4319/<slug>/ chain precedent).
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @fbartho on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Spec (product.md + tech.md, per CONTRIBUTING's spec-first workflow for feature requests) for teaching the Markdown viewer to render raw-HTML
<table>markup (<thead>/<tbody>/<tr>/<th>/<td>) by mapping it onto Warp's existing table model and render path, and to honor<br>inside cells.Part of #13652 — tier-zero tag #3, following
<img>sizing (#13656) and<details>/<summary>(#13660).Why
Warp already renders GFM pipe-tables (behind
MarkdownTables). The issue asks for HTML tables specifically for the two things GFM syntax cannot express: cells with a hard line break (<br>) and cells that span columns/rows (colspan/rowspan). Raw<table>markup is currently dropped.Highlights
<table>and render it through the existing table layout/render/scroll/selection path — same appearance as an equivalent GFM table.<th>/<thead>→ header row,<td>rows → data; inline formatting and inline images (per docs(specs): markdown viewer raw-HTML <img> sizing (GH13652) #13656) render inside cells.<br>inside a cell as an authored hard line break — the primary capability GFM pipe tables lack. The renderer already does multi-line cells (wrapping); this makes the break first-class.align/text-align; ragged rows normalized; only structural tags + alignment attributes read; no script/navigation.MarkdownTablesfeature flag; no GFM-table behavior change.Honest scope note (three slices, sized)
FormattedTablewith zero editor changes — but barely beats GFM pipe tables.<br>in cells → medium: the value-add. The renderer supports multi-line cells, but the cell type and the internal round-trip format (which uses\nas the row delimiter) can't represent an authored break, so it needs a cell-model + serialization change. This spec commits to it.colspan/rowspan→ large, explicit non-goal here: the flat rectangular grid (one width/column, one height/row,[row][col]indexing) is baked into the data model, layout, painter, and offset maps. Spanning needs a non-rectangular grid across all of them. Degraded to a single ordinary cell (span ignored — no crash, no corrupt grid) and deferred to its own effort.Flagging the cell-model change (touches the shared
FormattedTabletype) and the simple-vs-<br>split as the key decisions for review — happy to split simple-table and<br>into two PRs if you'd prefer.Process note
#13652 is currently
enhancement, triaged(not yetready-to-spec) — opening ahead of the label per CONTRIBUTING's linked-issue allowance; happy to sequence differently. Nested underspecs/GH13652/following thespecs/APP-4319/<slug>/precedent for one issue split across a chain of PRs.