feat(core): add list item drag reorder and table row height resize#134
Open
wxd-hash wants to merge 1 commit into
Open
feat(core): add list item drag reorder and table row height resize#134wxd-hash wants to merge 1 commit into
wxd-hash wants to merge 1 commit into
Conversation
- List item drag reorder with grip handles (⋮) in live-preview.ts Custom mousedown/mousemove/mouseup drag, editing locks, CM6 coordsAtPos positioning, single-dispatch source update. - Table row height resize in live-preview-table.ts Per-row resize handles with session-scoped height storage, same editing-lock pattern as column resize. - Fix table addColumn to detect separator rows without relying on ^-anchored SEPARATOR_RE regex. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
|
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
Three enhancements to the live-preview engine:
List item drag reorder — hover to reveal
⋮grip, drag to reorder, release to update Markdown source (OpenSpec §2.4)Table row height resize — hover the bottom edge of any table row, drag to adjust row height
Fix table add-column bug — previously corrupted the table; now correctly inserts a new column
Motivation
add-missing-featurestasks.md §2.4 (list item drag reorder, P1)openspec/changes/add-missing-features/(already approved)Changes
packages/core/src/live-preview.ts(+228 lines):List grip rendering (
⋮), custom mousedown/mousemove/mouseup drag, editing lock (listEditingCount), CM6coordsAtPospositioning, single-dispatchmoveListLines,findItemEndboundary detectionpackages/core/src/live-preview-table.ts(+103 lines):Row height resize (session-scoped
tableRowHeightsmap,applyRowHeights/measureRowHeights/startRowResize, resize handle on first cell), addColumn rewrite (cell-split detection instead ofSEPARATOR_REanchor check)packages/core/test/live-preview.test.ts(+67 lines):3 tests: grip rendering, grip hidden when cursor on item, document reorder via setDocument
Testing
pnpm testpasses — 34 test files, 518 testspnpm build)Compliance
Checklist
live-preview-table.ts— walked through 12 Table Widget rules in CLAUDE.mdopenspec/changes/add-missing-features/)