Skip to content

docs(Table): Spec define the column-resize disclosure contract - #6232

Merged
ernestt merged 5 commits into
mainfrom
core-column-resize-disclosure-spec
Oct 9, 2026
Merged

ernestt merged 5 commits into
mainfrom
core-column-resize-disclosure-spec

Conversation

@ernestt

@ernestt ernestt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • creates the missing canonical module:Table/useTableColumnResize record and its component:Table backlink
  • records the resting affordance: a boundary is hidden at rest, hinted at border weight for every boundary in a header row while a hover-capable pointer is inside it, and emphasized at accent for the boundary under the pointer, focused, or being dragged
  • records the precedence between those states, so the pointed boundary always outranks the row-level hint
  • bounds what else header hover may change: indicators only — no background, label, cursor, layout, width, body-row treatment, or other header control's state
  • records the indicator's extent: full table height, ending at or above the last row, and never making the horizontal scroll region scroll vertically
  • keeps the affordance pointer-only and records that resizing is never gated on hover (tab order, accessible name and values, keyboard resize unchanged)
  • explicitly approves no theme target and no public API

Owner decision

Cindy's review on #6194 called the header-hover reveal the intended design and asked for it to be recorded before the implementation lands. DEC-1 records that reveal and its rejected alternatives; DEC-2 records that an indicator hanging past the last row is a defect rather than an allowed variation.

The contract is complete without any pull-request reference. #6194 is implementation evidence only.

Boundary

component:Table disclaims column-management plugin anatomy in its non-goals, and no current record owns column resize, so this is a distinct fact boundary rather than an extension of an existing owner. The record is deliberately narrow: width resolution, per-column minimums, proportional-neighbor behavior, and the commit callback stay uncontracted, with this record named as their canonical owner when they are recorded.

Compatibility

Presentation-only, one transient state. The resting appearance of a hovered header changes for hover-capable pointers; public API, DOM shape, keyboard behavior, coarse-pointer behavior, and every width outcome are unchanged. No consumer edit, no codemod, no Changeset.

Overlap receipt

Validation

  • node scripts/check-knowledge.mjs — records aligned
  • Prettier — clean
  • git diff --check — clean
  • Spec-only change: two spec records, no runtime, doc, tooling, or changeset file

The record is 237 lines, above the 200-line soft ceiling. The overage is the required template structure plus the eight-invariant state matrix and its verification map; it contains no duplicated content.

Creates module:Table/useTableColumnResize and records what a resize
boundary looks like before anyone drags it: hidden at rest, every
boundary in the header row hinted while a hover-capable pointer is
inside it, accent for the boundary under the pointer, focused, or being
dragged. Bounds the indicator to the table it belongs to, bounds what
else header hover may change, and keeps the affordance pointer-only.

No API, DOM, target, or accessibility change.
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 6, 2026 7:20pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 10, 2026
@astracat-bot

astracat-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 9, 2026, 9:49 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Sep 10, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — the hover intent is clear, but builders and keyboard users could rely on contradictory “current” rules here. The record claims the whole public module while leaving its exported configuration, width/commit behavior, and generated-anatomy contract unowned; its coarse-pointer rule conflicts with its keyboard guarantee; and its plugin-order rule does not settle resize/sticky composition. Future implementations could satisfy one clause while violating another. Please complete those boundaries, including forced-colors and custom-header evidence, before this becomes current authority.

when a column boundary is drawn, how far the drawn line runs, which pointer
capabilities see it, and what else on the header may change while it is shown.

Width resolution, per-column minimums, proportional-neighbor behavior, the commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves the exported module’s API, width rules, commit semantics, and generated anatomy without current authority.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary since it's a plugin not a component. I guess we might want to make sure the spec authorities for plugins aren't the same as the one for components so the agents don't get mixed up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, keeping this as-is. A plugin record doesn't need to own its full exported surface the way a component record does — the uncontracted list in Intent is deliberate, and this record is named canonical owner for when those land.

The plugin-vs-component distinction in the record template is a separate change from this PR.

| FR3 | With no hover-capable pointer in the header row, no visible focus on a boundary, and no drag in progress, every boundary is `hidden`. | Current source and docs | Verified current behavior. |
| FR4 | While a hover-capable pointer is anywhere inside a header row, every boundary in that row is `hinted` at border weight at the same time. The boundaries return to `hidden` when the pointer leaves the row. | Owner direction, 2026-09-10 (DEC-1) | Owner-directed; implementation and focused coverage pending. |
| FR5 | A boundary under the pointer, a boundary with a visible focus indicator, and the boundary being dragged are `emphasized` at accent weight, over any `hinted` state. | Current source plus DEC-1 | Pointer and focus states verified; hint interaction pending. |
| FR6 | Hover disclosure applies only to hover-capable pointers. Where the pointer is coarse, the module renders no boundary control at all, so disclosure changes nothing there. | Current source and `architecture:interaction-modality` | Coarse-pointer suppression verified; hover gate pending. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On touch laptops, this removes the separator from tab order while FR8 and AR3 promise keyboard access without hover.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's valid to consider other modalities in this spec since we should be intentional. Do we want mobile users to be able to resize columns? What about keyboard users who focus the handles? Do we show all of them or just one of them? How can we make the handles accessible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision: coarse pointer gates disclosure, not existence. The hover reveal stays hover: hover-gated; the control and its tab stop exist whenever any input can operate it, so a touch laptop keeps keyboard resize. That resolves the FR6/FR8 contradiction.

The three modality calls, as decisions rather than open questions:

  • Touch-drag resize is a non-goal. A hairline grab target can't work on touch without a different affordance (drag pill, or resize inside a column-settings sheet), which is its own design. Closing OQ3 that way.
  • Focus emphasizes one boundary and does not fire the row-level hint. Focus follows pointer precedence — revealing every handle to a modality already targeting one is noise. New invariant plus an ORD1 clause.
  • Handle accessibility is already contracted by AR1-AR3 on the WAI-ARIA splitter pattern (tab order, name, values). What's missing is evidence, which the verification map tracks as pending.

cell, so entering the header anywhere reveals every boundary in that row together
rather than the one under the pointer.
- **ORD3 — Parent pipeline.** The module contributes its header row and header cell
transforms at the position `component:Table` gives it and does not redefine plugin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table assigns neither resize nor sticky an order; both set header positioning, so plugin insertion order can break sticky columns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm would be good to explore with the agent what interactions and dependencies the resize plugin has with sticky column plugin. If we have to enforce a plugin order we should do so.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explored it — there's a live collision, not just an ordering hypothetical.

Both plugins transform the same header <th> and both push a position through xstyle: resize appends relative for its absolute handle, sticky appends sticky. Last one in the array wins, so composition order decides whether a pinned column actually pins. Neither plugin is in Table's canonical name sequence, so today that's caller insertion order. Sticky's inline offsets are order-proof as its comment says; position goes through xstyle, so it isn't covered.

Second dependency: sticky computes cumulative pin offsets from declared column widths, while resize writes actual pixel widths to the DOM during a drag — so pin offsets go stale after a resize.

Decision: enforce sticky after resize. Plugin order belongs to component:Table, so that's a companion change to its FR9 sequence; here it becomes a named dependency plus the stale-offset note.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction on this one after implementing it in #6194 — enforcing an order was the wrong call.

Table's PLUGIN_ORDER carries an explicit rule against it: "This decides LAYOUT — which column lands left of which, who wraps whom. It must never decide whether the table works: a plugin that renders in one order and crashes in the other is broken, and adding it here buys a lucky order rather than a fix." Resize vs sticky is exactly that case, so ordering would have bought the lucky order.

The actual fix is one line in sticky. Its position was going through a StyleX class while its offsets were already written inline — and its own comment claimed position was inline for precisely this reason, so the code had drifted from its documented intent. Writing position: sticky inline outranks either plugin's classes and makes the composition order-independent. No Table FR9 change needed.

Tests mount both plugins in both insertion orders. The stale pin offsets after a drag are untouched and are now OQ5 on the record.


| ID | Invariant | Basis | Implementation/evidence state |
| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | --------------------------------------------------------------- |
| FR1 | Each resizable column receives one boundary control at its trailing inline edge, with a pointer target wider than the drawn indicator so the line stays hairline while the grab area stays usable. A column that opts out of resizing, and a generated plugin column, receive none. | Current source and docs | Verified current behavior; sizes are source-inspected. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there's some nuance here. We've had columns that are proportional at the end of the table and resizing the column before it would also need to adjust the column at the end. Also resizing proportional columns sometimes needs to evenly space or keep proportional those columns instead of reverting to pixel sizes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording current behavior so it's on the record: a proportional column delegates its drag to the next column, the last resizable proportional column gets no handle, and a drag snapshots every column to pixel widths.

Both cases you name are defects against intent, not allowed variations — a trailing proportional column should absorb the delta, and proportional columns should stay proportional through a resize rather than reverting to pixels. That's the target for the width contract, which lands as a follow-up record owned by this one rather than expanding this PR.

| FR3 | With no hover-capable pointer in the header row, no visible focus on a boundary, and no drag in progress, every boundary is `hidden`. | Current source and docs | Verified current behavior. |
| FR4 | While a hover-capable pointer is anywhere inside a header row, every boundary in that row is `hinted` at border weight at the same time. The boundaries return to `hidden` when the pointer leaves the row. | Owner direction, 2026-09-10 (DEC-1) | Owner-directed; implementation and focused coverage pending. |
| FR5 | A boundary under the pointer, a boundary with a visible focus indicator, and the boundary being dragged are `emphasized` at accent weight, over any `hinted` state. | Current source plus DEC-1 | Pointer and focus states verified; hint interaction pending. |
| FR6 | Hover disclosure applies only to hover-capable pointers. Where the pointer is coarse, the module renders no boundary control at all, so disclosure changes nothing there. | Current source and `architecture:interaction-modality` | Coarse-pointer suppression verified; hover gate pending. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's valid to consider other modalities in this spec since we should be intentional. Do we want mobile users to be able to resize columns? What about keyboard users who focus the handles? Do we show all of them or just one of them? How can we make the handles accessible?


### Performance and resources

- **PR1 — Disclosure costs no render.** Entering or leaving the header MUST NOT set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to add that for hover interactions they should be disabled in the middle of scroll.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, adding it as an invariant — a pointer passing under a header because the page moved isn't intent.

One cost to flag: detecting mid-scroll needs a scroll listener, since CSS scroll-state() isn't in our supported StyleX set. PR1 is amended to permit one non-rendering scroll listener that writes a data attribute directly to the DOM; the no-rerender half of PR1 stands unchanged.

cell, so entering the header anywhere reveals every boundary in that row together
rather than the one under the pointer.
- **ORD3 — Parent pipeline.** The module contributes its header row and header cell
transforms at the position `component:Table` gives it and does not redefine plugin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm would be good to explore with the agent what interactions and dependencies the resize plugin has with sticky column plugin. If we have to enforce a plugin order we should do so.


### Theming

No public target is approved for the boundary control or its indicator, and the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the boundary to be themeable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision: no theme target, and OQ2 is promoted into a decision entry rather than left open.

The weights already come from theme tokens (border and accent), so a theme swap moves the boundary correctly without a direct target. A public target would freeze boundary/indicator anatomy into the surface before the width model is contracted, and architecture:component-theming-surface requires synchronized consumer anatomy that the module's doc doesn't have.

Revisit if a consumer needs the hint weight to differ from their own border token.

…contract

Settles the six review threads as decisions rather than open questions:

- DEC-3 splits the modality gate: pointer capability gates the hover
  reveal, not the control, so a coarse-primary device with a keyboard
  keeps its tab stop. Resolves the FR6/FR8 contradiction.
- DEC-4 records touch-drag resize as a non-goal, closing OQ3.
- DEC-5 keeps focus emphasizing one boundary without firing the row hint.
- DEC-6 suppresses disclosure while the scroll region scrolls; PR1 is
  amended to permit one passive, non-rendering scroll listener.
- DEC-7 records no public theme target, closing OQ2.

Also names the sticky-columns ordering dependency and its stale pin
offsets, and records the two known proportional-width defects as targets
for the follow-up width contract.
ernestt added a commit that referenced this pull request Sep 21, 2026
Implements the decisions recorded on the spec in #6232:

- Pointer capability gates the reveal, not the control. The handle no
  longer disappears on a coarse primary pointer, so a tablet with a
  keyboard keeps its tab stop; coarse pointers get pointer-events: none
  instead, since touch-dragging a hairline boundary is not a supported
  path.
- Disclosure holds while the scroll region scrolls and resumes when it
  settles, so a boundary arriving under a still pointer is not read as
  intent. One passive scroll listener writes an inline custom property
  the header row and handles inherit; scrollend clears it where
  supported, a single settle timeout where it is not. No React state,
  no rerender.
- Focus emphasizes its own boundary and never raises the row-level hint.
- Sticky columns now writes position inline, where its offsets already
  were, so a pinned column stops depending on plugin insertion order to
  beat the resize plugin's position: relative.
Implementing the decisions in #6194 changed two of them:

- The sticky collision is fixed by writing position inline rather than
  by ordering the plugins. component:Table treats plugin order as a
  layout decision and explicitly refuses to let it decide correctness,
  so a pair that works in one order and breaks in the other is a defect
  in the pair. No companion Table FR9 change is needed.
- PR1's listener budget now names the settle signal the gate actually
  needs: scrollend where the browser has it, one debounced timer where
  it does not.
@ernestt ernestt changed the title docs(Table): define the column-resize disclosure contract docs(Table): Spec define the column-resize disclosure contract Sep 21, 2026

@humbertovirtudes humbertovirtudes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This record should not declare current authority before exact-head owner approval. It also overstates runtime behavior: resize boundaries are not present for every resizable column, rendered width can diverge from aria-valuenow, touch, pen, and hybrid behavior is incomplete, and the sticky-position claim depends on unlanded work. Please keep the record draft until these contracts and their evidence are corrected.

astracat-bot[bot]
astracat-bot Bot previously requested changes Sep 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes before this record becomes current authority.

The ownership split and backlink are right, the coarse-primary keyboard correction is welcome, and approving no new public API or theme target is the right restraint. But the record is not yet safe to treat as governing:

  • Please keep it draft until a maintainer owner approves the exact text; approval is still pending and frontmatter alone cannot establish it.
  • The touch path needs to align with the current interaction-modality contract, which requires touch or pen to reach each supported interaction. Deferring every touch-reachable resize path, and leaving pen and hybrid devices unsettled, contradicts that contract as a current claim.
  • FR1 says every resizable column already has a verified boundary, but the current implementation and its test omit the boundary for the last proportional column. Please state that exception and mark universal coverage pending.
  • Sticky positioning is described as already written inline, making composition order-independent, but the current sticky code writes only its offsets inline and keeps position in StyleX. Please describe that fix as pending dependent work.
  • The accessible-value claim is overstated: the separator's current value can diverge from the rendered column width. Please qualify that claim and its verification, and correct the compatibility note — a coarse-primary device with a keyboard gaining a separator is a DOM and accessibility-tree change for that state, not preserved DOM shape.

These are all bounded corrections to the record's accuracy and status; the underlying disclosure and extent direction can proceed once they are made.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval is waiting on a maintainer decision before this record can be treated as current authority.

The ownership split and backlink are right, the coarse-primary keyboard correction is welcome, and approving no new public API or theme target is the right restraint. What needs settling is authority: no current record yet chooses the header-hover disclosure, its precedence, the bounded indicator extent, focus-only emphasis, or scroll-gate suppression, and exact-text owner approval is still pending — the record should not promote itself from its own frontmatter. Please have a maintainer owner approve the exact text as current, or identify the different governing authority for those claims, and keep the record draft until then.

While that decision is pending, these record-accuracy points also need attention before the contract can govern an implementation:

  • The touch path defers every touch-reachable resize path, while the current interaction-modality contract requires touch or pen to reach each supported interaction.
  • Universal boundary coverage is labelled verified, but the current implementation omits the boundary for the last proportional column.
  • Sticky positioning is described as already written inline, while the current sticky code writes only its offsets inline.
  • The accessible-value claim can diverge from the rendered width, and the compatibility note should treat the new coarse-keyboard separator as a DOM and accessibility-tree change for that state.

The underlying disclosure and extent direction can proceed once a maintainer settles its authority and those corrections are made.

[Automated review]

@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 7, 2026
ernestt added a commit that referenced this pull request Oct 9, 2026
…reveal them on header hover (#6194)

* [fix][feat] Stop useTableColumnResize handles overhanging, and reveal them on header hover

Two things about the drag handles, both from the same geometry.

The fix: the handles span the whole table so their indicator reads down
through the body rows, but they were given the table's full height while
hanging from a point a few pixels below its top edge, so each ended that far
past the last row. The scroll wrapper only exists to scroll horizontally, but
CSS promotes overflow-y to auto as soon as overflow-x is, so the overhang
became ~6px of vertical scrolling on a table with no reason to scroll. The
observer that already measures the table now also measures how far the handles
start below its top edge and publishes it as --table-resize-offset, which the
handles subtract. The drop is per-cell, so the largest is published: stopping a
fraction short of the last row is invisible, hanging past it is not.

The feature: a boundary was only drawn once the pointer was already inside a
handle's 8px hit area, so a resizable column gave no sign it could be resized.
The header row now publishes --resize-hint while hovered and the handles read
it as their resting colour, so entering the header reveals every boundary at
border weight. Reading it as the default rather than matching the row's hover
from inside the handle is deliberate: an ancestor selector would outrank the
handle's own :hover and the one under the pointer would never reach accent.

Co-authored-by: Cursor <[email protected]>

* docs: link column resize changesets to PR

* Apply the column-resize disclosure review decisions

Implements the decisions recorded on the spec in #6232:

- Pointer capability gates the reveal, not the control. The handle no
  longer disappears on a coarse primary pointer, so a tablet with a
  keyboard keeps its tab stop; coarse pointers get pointer-events: none
  instead, since touch-dragging a hairline boundary is not a supported
  path.
- Disclosure holds while the scroll region scrolls and resumes when it
  settles, so a boundary arriving under a still pointer is not read as
  intent. One passive scroll listener writes an inline custom property
  the header row and handles inherit; scrollend clears it where
  supported, a single settle timeout where it is not. No React state,
  no rerender.
- Focus emphasizes its own boundary and never raises the row-level hint.
- Sticky columns now writes position inline, where its offsets already
  were, so a pinned column stops depending on plugin insertion order to
  beat the resize plugin's position: relative.

* Restore unrelated files after merge

---------

Co-authored-by: Cursor <[email protected]>
@ernestt
ernestt dismissed stale reviews from astracat-bot[bot] and humbertovirtudes October 9, 2026 21:49

Abandoning

@ernestt
ernestt merged commit b674167 into main Oct 9, 2026
44 of 45 checks passed
@github-actions
github-actions Bot deleted the core-column-resize-disclosure-spec branch October 10, 2026 06:22

This branch was successfully deployed

1 active deployment
Preview — c5fe8715 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants