Task #158: 표 크기 조절 Undo/Redo — SnapshotCommand 적용#748
Closed
oksure wants to merge 2 commits into
Closed
Conversation
표 크기 조절(마우스 드래그, 키보드, Ctrl+방향키 비율 리사이즈)이 Undo 이력에 등록되지 않던 문제 수정. resizeTableCells 직접 호출을 executeOperation + SnapshotCommand 경유로 변경하여 Ctrl+Z/Ctrl+Y로 크기 변경 복원 가능. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
표 크기 조절(드래그/키보드/Ctrl+방향키) 동작이 Undo/Redo 히스토리에 기록되지 않던 문제(#158)를 해결하기 위해, resizeTableCells 직접 호출 경로를 executeOperation({ kind: 'snapshot' }) 기반으로 전환한 PR입니다.
Changes:
- 드래그 리사이즈(
finishResizeDrag)를 SnapshotCommand 경유로 실행하도록 변경 - 키보드 셀 리사이즈(
resizeCellByKeyboard)를 SnapshotCommand 경유로 실행하도록 변경 - Ctrl+방향키 비율 리사이즈(
resizeTableProportional)를 SnapshotCommand 경유로 실행하도록 변경
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
191
to
201
| this.executeOperation({ | ||
| kind: 'snapshot', operationType: 'resizeTable', | ||
| operation: (wasm: any) => { | ||
| wasm.resizeTableCells(sec, ppi, ci, updates); | ||
| return pos; | ||
| }, | ||
| }); | ||
| this.eventBus.emit('document-changed'); | ||
| if (inCellSel) this.updateCellSelection(); | ||
|
|
||
| this.cleanupResizeDrag(); |
| return pos; | ||
| }, | ||
| }); | ||
| this.eventBus.emit('document-changed'); |
Comment on lines
+497
to
+503
| this.executeOperation({ | ||
| kind: 'snapshot', operationType: 'resizeCell', | ||
| operation: (wasm: any) => { | ||
| wasm.resizeTableCells(ctx.sec, ctx.ppi, ctx.ci, updates); | ||
| return pos; | ||
| }, | ||
| }); |
| return pos; | ||
| }, | ||
| }); | ||
| this.eventBus.emit('document-changed'); |
| return pos; | ||
| }, | ||
| }); | ||
| this.eventBus.emit('document-changed'); |
executeOperation(snapshot)이 내부적으로 afterEdit()을 호출하여 document-changed를 이미 emit하므로 외부의 중복 emit 3건 제거. finishResizeDrag, resizeCellByKeyboard에 try/catch 추가하여 예외 발생 시에도 cleanup이 실행되도록 보장. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Copilot 리뷰 반영 (a15336d):
|
edwardkim
added a commit
that referenced
this pull request
May 10, 2026
PR #728 (closes #204) 의 표 편집 11 커맨드 + 표 크기 조절 3 함수 SnapshotCommand 일괄 적용 머지로 본질적 정정이 이미 devel 에 반영되어 있어 cherry-pick 결과 empty commit (allow-empty). 컨트리뷰터 (@oksure) 의 commit 이력 보존 + author 정보 보존. 검증: - tsc --noEmit ✅ - cargo test --release ALL GREEN - 광범위 sweep 170/170 same - WASM 4.66 MB - 웹 에디터 인터랙션 검증 ✅ 통과 (3가지 크기 조절 경로 + Ctrl+Z) closes #158
Owner
|
@oksure 검토 완료했습니다. 감사합니다. 처리 결과Merge commit: 본질PR #748 의 정정 본질이 PR #728 (closes #204) 머지 영역에 이미 흡수된 상태였습니다. PR #728 이 표 편집 11 커맨드 + 표 크기 조절 3 함수 ( 처리 방식
검증
Issue #158 함께 close 합니다. 5/10 사이클 16번째 PR — 수고하셨습니다. |
Owner
edwardkim
added a commit
that referenced
this pull request
May 10, 2026
edwardkim
added a commit
that referenced
this pull request
May 10, 2026
5/10 + 5/11 사이클 누적 — 외부 기여자 다수 PR 30+ 머지. Cargo.toml + rhwp-vscode/package.json + npm/editor/package.json + rhwp-studio/package.json: 0.7.10 → 0.7.11 rhwp-vscode/CHANGELOG.md: [0.7.11] 항목 추가 핵심 변경: - Skia native raster P8 (#761) + P9 (#769) — Layer IR contract hardening + text replay parity - HWP3 native 렌더링 (#753) — hwp3-sample10 8 단계 정정 + Git LFS pdf-large/ 신규 - 페이지네이션 정정 (#778) — Task #703 다단 컬럼 분배 회귀 정정 - rhwp-studio 인터랙션 (PR #781/#786/#787/#788) — scrollbar/수식/표 셀/도구 모음 결함 정정 - rhwp-studio editor 신규 기능 (PR #728/#748/#750/#760 등) — 표 편집 Undo/Redo + 다단 설정 + 다수 단축키
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.
문제
표 크기 조절(마우스 드래그, 키보드, Ctrl+방향키 비율 리사이즈) 후 Ctrl+Z로 되돌릴 수 없습니다.
resizeTableCellsWASM API가 Undo 이력 없이 직접 호출되어 변경 내역이 기록되지 않습니다.수정 내용
세 가지 크기 조절 경로 모두
executeOperation({ kind: 'snapshot' })경유로 변경:finishResizeDrag):operationType: 'resizeTable'resizeCellByKeyboard):operationType: 'resizeCell'resizeTableProportional):operationType: 'resizeTableProportional'기존
SnapshotCommand인프라를 그대로 활용하여 before/after 문서 스냅샷을 자동 관리합니다.검증
cargo test— 전체 통과Closes #158
감사합니다.