Repository navigation
feat(csv-gridsheet): auto-expand on paste/autofill, disable merged cells - #150
Merged
Merged
Conversation
`options.autoExpand` ('none' | 'vertical' | 'horizontal' | 'both', default
'none') lets a paste or an autofill that runs past the last row/column append
the missing rows/columns instead of clipping them, capped by
limits.maxRows / maxCols.
- engine: Sheet.autoExpand; copy / copyAsync / move / writeRawCellMatrix and
Autofill grow the sheet first. New BATCH history so the growth and the write
undo/redo as one step; the growth is rolled back if the operation is refused
(e.g. by a merge).
- react-core: while dragging the autofill handle, ghost rows/columns are
rendered past the edge (as real table rows/cells, so sticky headers stay) so
the drag can reach cells that don't exist yet. A paste that grew the sheet
scrolls the pasted corner into view.
- fix: releasing an autofill drag over a ScrollHandle submitted the fill twice
(two undo steps); StoreObserver's mouseup is now the only submitter.
- docs, storybook story (Restriction/AutoExpand), jest + e2e specs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
righ
force-pushed
the
righ/csv-merge-off-auto-expand
branch
from
October 4, 2026 09:11
25978d2 to
dba0f16
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
righ
force-pushed
the
righ/csv-merge-off-auto-expand
branch
from
October 4, 2026 17:42
dba0f16 to
6d7b46b
Compare
The autoExpand ghost area is now drawn outside the grid — portaled to <body>, positioned fixed right past the last row/column (only once that edge is scrolled into view) — instead of as extra table rows inside the scroll area. Cells in the fill target are highlighted; StoreObserver doesn't edge-scroll while the pointer is over the ghost layer. Reverts the in-table ghost rendering and the virtualize() "scrolled past the content" tweaks it needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
righ
force-pushed
the
righ/csv-merge-off-auto-expand
branch
from
October 4, 2026 18:40
6d7b46b to
076bbce
Compare
…autofill Replaces the outside-the-sheet ghost layer with provisional ghost rows/columns rendered inside the grid (as table rows/cells, so sticky headers stay): - While the fill drag's pointer is past the grid content's edge (the whitespace of a larger box, or outside it) and the grid is scrolled to that edge, add one ghost row/col at a time, faster the further past the edge (200ms → 20ms). - Ghosts are display-only (no sheet change, no history); releasing grows the sheet up to the reached row/col in one undo step, unreached ghosts vanish. - The target follows the last ghost while past the edge, the grid stays pinned to that edge as it grows, and growth stops once the pointer is back over a cell. The edge ScrollHandle no longer snaps the target back to the last real row/col there. - An autofill that grew the sheet scrolls the filled corner into view. - Storybook AutoExpand story: limits raised to 1000 rows x 100 cols. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New setting gridsheet.viewer.autoExpand (both | vertical | horizontal | none, default both) passed to the grid's autoExpand option; forced off in read-only. - Merge / Unmerge removed from the cell context menu and blocked via the Merge prevention: CSV/TSV can't store merges, and merging blanks the covered cells, which a save would then write out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
righ
force-pushed
the
righ/csv-merge-off-auto-expand
branch
from
October 5, 2026 12:42
076bbce to
e66a2d3
Compare
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.
Summary
Auto-expand
gridsheet.viewer.autoExpand—both(default) |vertical|horizontal|none— passed to the grid'sautoExpandoption. A paste or autofill past the last row/column adds the missing rows/columns instead of dropping the overflow; ghost rows/columns appear while dragging the fill handle; one undo reverts both.nonein read-only mode (the write is refused there anyway, so the grid shouldn't grow).Merged cells disabled
merge-cells/unmerge-cells(and their divider) from the context menu, and addedoperations.Mergeto the default cell prevention in case another entry point appears. (Read-only already blocks it viaReadOnly.)README settings list and CHANGELOG (
Unreleased) updated. No version bump — the extension is released by hand.Test plan
pnpm buildfor the extension (host + webview bundles)dist/webview.jsin a browser harness (stubbedacquireVsCodeApi+ adatamessage) with Playwright: the cell context menu shows Cut / Copy / Paste / Paste only value / Undo / Redo / Search — no Merge/Unmerge; copying A1:C3 and pasting at C3 on a 3×3 grid grows it to 5×5 (E5 =z)🤖 Generated with Claude Code