feat: resizeMaxSize + stop header ellipsis clipping label-less headers#84
Merged
Merged
Conversation
…ss headers Two small upstream fixes shipped together. resizeMaxSize (core, minor): - New per-column `resizeMaxSize` caps USER drag-resize independently of `maxSize` (defaults to `maxSize`, fully back-compatible). `maxSize` still caps auto-sizing/stretch (enforced in computeAutoColumnWidths); raising the render/resize ceiling in getSize + clampColumnSize only affects widths a human dragged. Set it (e.g. Infinity, or app-wide via defaultColumnDef) to let users drag a column past its auto-size cap. Header ellipsis (react patch + themes patch): - The 0.6.1 header-label ellipsis clip cropped label-less headers (e.g. a selectColumn checkbox). HeaderCell now marks only string headers with `.yable-th-label`, and base.css scopes the ellipsis to that class, so component/empty headers are never clipped. Tests: core unit tests for clampColumnSize + getSize (past-maxSize renders, back-compat clamp preserved); e2e for the visible selection-header checkbox and a drag past maxSize via defaultColumnDef. Docs updated in both systems. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Two upstream fixes from Bevrly adoption, shipped together as a small release.
1. Header ellipsis clips label-less header content (bug)
The
.yable-thlabel ellipsis span was applied to every header. For a selection column with no string label, the flex span collapsed to ~2px and cropped the 16px select-all checkbox.Fix: only apply the ellipsis clip when the header content is a string.
TableHeadermarks string headers with ayable-th-labelclass; the CSS ellipsis rule now targets.yable-th-content > .yable-th-label(was> span:first-child). Component/empty headers render at natural width.2. Separate the user-resize clamp from maxSize (feature)
New
resizeMaxSize?: numberonColumnDefExtensions(defaults tomaxSize).maxSizestill caps auto-sizing/stretch;resizeMaxSizeis the upper bound for a human drag-resize. Set it (e.g.Number.POSITIVE_INFINITY, or viadefaultColumnDefapp-wide) to let users drag a column past its auto-size cap. BecausecomputeAutoColumnWidthsalready enforcesmaxSizeitself, raising this render ceiling only affects widths a human dragged — auto-sizing never exceedsmaxSize. Default (resizeMaxSize === maxSize) is byte-identical to prior behavior.Clamp applied in both
clampColumnSize(headers.ts, commit path) andgetSize(column.ts, render path).Tests
resizeMaxSize: Infinitycommits + renders the wider width; unset stays clamped (back-compat); getSize resizeMax bounds.Verification
Bumps: core minor (0.15.0), react patch (0.18.1), themes patch (0.6.2), vanilla patch (0.3.21). No majors.
Note: the internal CSS selector rename (
.yable-th-content > span:first-child→.yable-th-label) is a minor theme surface change — consumers overriding that exact selector should move to.yable-th-label.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.