Skip to content

feat(table): reorder rows and columns (stacked on #996) - #4

Draft
huyanxius wants to merge 1 commit into
fix/784-table-region-pastefrom
feat/91-table-reordering
Draft

huyanxius wants to merge 1 commit into
fix/784-table-region-pastefrom
feat/91-table-reordering

Conversation

@huyanxius

@huyanxius huyanxius commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Scope and dependency

This is a fork-only stacked review draft, not a pull request against the upstream repository. It implements the menu-based part of mdx-editor#91 and depends on mdx-editor#996 (base fix/784-table-region-paste, f867088). The region-paste changes belong to mdx-editor#996 and are not part of this PR's contribution. After that dependency lands, this branch can be rebased to present only reordering upstream.

Changes

  • Move body rows up/down while keeping the GFM header row fixed.
  • Move full columns, including headers and alignment.
  • Preserve rich cell contents and empty cells, with boundary controls disabled.
  • Keep the active cell and exact selection through DOM movement; each move has a separate Undo step.
  • Keyboard-accessible menu controls, read-only behavior and editor-instance isolation.
  • Reuse the dependency's nested-cell history and stale-callback guards instead of duplicating them.

No drag-and-drop or spreadsheet features are included.

Validation

  • Typecheck and lint pass.
  • Full unit suite: 221 passed, 1 pre-existing skip, 1 pre-existing todo.
  • 15 new reorder cases, including a regression that reproduced column movement leaving DOM focus on body before the fix.
  • Existing 14 table-paste cases pass alongside the reorder suite.
  • Production build and lockstep check of 24 Lexical packages pass.
  • Fork GitHub CI completed successfully for fc03ca7 on 2026-10-16: 138/138 browser tests passed across Chromium, Firefox and WebKit, including the two new reorder scenarios in each engine. Test, Build JS (packed React consumers and cross-version Markdown), and Build Docs also passed. Verified CI run.
  • Local browser execution remains unavailable because the cloud environment denies Chromium's IPC socket; the real-browser evidence above comes from GitHub-hosted CI.

Any workflows on this draft belong to the fork; they are not upstream CI approval.

Independent re-review: 47/47 focused tests passed (15 implementation tests, 18 independent review tests, 14 paste regression tests). The published tree matches reviewed local candidate d7adf69 exactly (7ed40af71ea7cc3c653631f04b4949f3bade4fb5).

Stacked on region paste mdx-editor#996. Includes the independently reviewed DOM focus correction.

Reviewed local candidate: d7adf69a0ba1840c7acab26830fb8e4298fe432b
Tree verified equal: 7ed40af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant