Repository navigation
Conversation
Contributor
Code Metrics Report
Details | | main (aaa4c6a) | #631 (9c5a5a3) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 89.2% | 89.2% | +0.0% |
| Files | 226 | 226 | 0 |
| Lines | 7239 | 7241 | +2 |
+ | Covered | 6464 | 6466 | +2 |
- | Test Execution Time | 2m7s | 2m25s | +18s |Code coverage of files in pull request scope (92.9% → 93.0%, patch 100.0%)
Reported by octocov |
IzumiSy
marked this pull request as ready for review
October 22, 2026 04:45
IzumiSy
marked this pull request as draft
October 22, 2026 05:04
Contributor
Author
|
I would like to rebase this PR and cover |
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.
Motivation
DataTable custom renderers control a cell's content, but cannot style the surrounding cell element. Tables that use background color to communicate row-dependent information cannot reproduce that presentation with a colored span: the cell's padding remains unpainted. Header renderers have the same limitation when a column needs header-level styling.
Related: https://github.com/tailor-inc/platform-planning/issues/2185
Design Decision
Separate content rendering from element customization
Add two column-level APIs: row-aware
cellProps(row)for data-cell<td>elements and a staticheaderPropsobject for the column's<th>. Both support onlyclassName,style, andtitle.Existing
render(row)andheader(ctx)continue to own content. Arbitrary events, refs, and cell spanning are deliberately not exposed, so consumers do not need to coordinate with DataTable's editing, selection, or context-menu behavior. Header props remain a plain object because this use case does not require row data or sort-state callbacks.Preserve table-owned layout and state behavior
Merge consumer classes after built-in classes, and merge inline styles before the declared column width and computed sticky positioning. Explicit inline cell backgrounds remain visible during hover and selection; cells that do not opt in retain their existing appearance and behavior. CSS specificity still applies to class-based backgrounds, and pinned cells and headers require opaque backgrounds to hide scrolling content.
Alternatives considered
Allowing renderers to replace the entire cell element would transfer responsibility for pinning and interaction props to consumers. A style-only hook would solve the immediate background-color case but introduce a separate API for each additional presentation attribute. A narrowly scoped props object provides a single customization point without opening arbitrary DOM overrides.
Summary