feat: 다단 설정 대화상자 구현 (#733)#750
Closed
oksure wants to merge 2 commits into
Closed
Conversation
- getColumnDef WASM API 추가 (현재 구역의 다단 설정 조회) - ColumnSettingsDialog 구현 (단 수, 종류, 너비 동일, 간격) - page:col-settings 커맨드 stub → 실제 구현으로 대체 - Ctrl+Alt+Enter 단축키 매핑 추가 Closes edwardkim#733 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
이 PR은 이슈 #733에서 요청된 “다단 설정” 기능을 실제로 동작하도록 연결하기 위해, WASM API로 현재 구역의 다단 설정을 조회하고(읽기), Studio UI에서 다단 설정 모달을 제공하며, 커맨드/단축키로 호출 가능하게 하는 변경입니다.
Changes:
- Rust WASM API에
getColumnDef를 추가해 구역의 초기 ColumnDef(단 수/종류/너비 동일/간격)를 JSON으로 반환 - Studio에
ColumnSettingsDialog모달 UI를 추가하고page:col-settings커맨드를 실제 구현으로 교체 Ctrl+Alt+Enter단축키를page:col-settings에 매핑
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wasm_api.rs | WASM에 getColumnDef 추가로 현재 구역 다단 설정 조회 경로 제공 |
| rhwp-studio/src/ui/column-settings-dialog.ts | 다단 설정 모달 UI 신규 추가(단 수/종류/너비 동일/간격) |
| rhwp-studio/src/core/wasm-bridge.ts | getColumnDef() 브릿지 메서드 추가(JSON 파싱) |
| rhwp-studio/src/command/shortcut-map.ts | Ctrl+Alt+Enter → page:col-settings 단축키 추가 |
| rhwp-studio/src/command/commands/page.ts | page:col-settings 커맨드를 stub에서 실제 다이얼로그 호출로 구현 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
|
|
||
| protected onOk(): void { |
| } catch (err) { | ||
| console.warn('[ColumnSettingsDialog] 다단 설정 실패:', err); | ||
| } | ||
| this.close(); |
Comment on lines
+108
to
+113
| const count = parseInt(this.countInput.value, 10) || 1; | ||
| const type = parseInt(this.typeSelect.value, 10) || 0; | ||
| const sameWidth = this.sameWidthCheck.checked ? 1 : 0; | ||
| const spacingHu = mmToHwpunit(parseFloat(this.spacingInput.value) || 0); | ||
| try { | ||
| this.wasm.setColumnDef(this.sectionIdx, count, type, sameWidth, spacingHu); |
| import type { WasmBridge } from '@/core/wasm-bridge'; | ||
| import type { EventBus } from '@/core/event-bus'; | ||
|
|
||
| const HWPUNIT_PER_MM = 283.46; // 1mm ≈ 283.46 HWPUNIT (7200/25.4) |
- onOk()를 ModalDialog 추상 메서드 onConfirm()으로 변경 - this.close() 제거 (base class가 onConfirm 반환값에 따라 자동 hide) - count(1~8), type(0~2), spacing(0~32767) 범위 클램프 추가 - HWPUNIT_PER_MM 하드코딩 283.46 → 7200/25.4 계산식으로 통일 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Copilot 리뷰 피드백을 a8f2f319에서 반영했습니다:
|
edwardkim
added a commit
that referenced
this pull request
May 10, 2026
SectionSettingsDialog 패턴 정합 — ModalDialog 베이스 + (wasm, eventBus, sectionIdx) 호출 패턴. 신규 인프라: getColumnDef WASM API 1개 (조회 전용, find_initial_column_def 재사용). 설정 적용은 기존 setColumnDef API 재사용. 검증: - tsc --noEmit ✅ - cargo test --release ALL GREEN - 광범위 sweep 170/170 same - WASM 4.66 MB - 웹 에디터 인터랙션 검증 ✅ 통과 (Ctrl+Alt+Enter + 다단 설정 적용) closes #733
Owner
|
@oksure 검토 완료했습니다. 감사합니다. 처리 결과Merge commit: 본질
인프라 재사용
→ 신규 인프라 1개만 ( 검증
Issue #733 close 정합. 5/10 사이클 18번째 PR — 수고하셨습니다. |
Owner
|
Merged. Merge commit: 577befd |
Closed
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.
변경 사항
이슈 #733 에서 요청된 다단 설정 대화상자를 구현합니다.
getColumnDefWASM API 추가 — 현재 구역의 다단 설정(단 수, 종류, 너비 동일, 간격)을 JSON으로 반환ColumnSettingsDialog클래스 — 기존SectionSettingsDialog와 동일한ModalDialog패턴page:col-settings커맨드를 stub에서 실제 구현으로 대체Ctrl+Alt+Enter→page:col-settings매핑 추가테스트
cargo test1173개 통과cargo clippy -- -D warnings경고 없음Closes #733
감사합니다.