Skip to content

feat: 다단 설정 대화상자 구현 (#733)#750

Closed
oksure wants to merge 2 commits into
edwardkim:develfrom
oksure:contrib/column-settings-dialog
Closed

feat: 다단 설정 대화상자 구현 (#733)#750
oksure wants to merge 2 commits into
edwardkim:develfrom
oksure:contrib/column-settings-dialog

Conversation

@oksure

@oksure oksure commented May 9, 2026

Copy link
Copy Markdown
Contributor

변경 사항

이슈 #733 에서 요청된 다단 설정 대화상자를 구현합니다.

  • Rust (wasm_api.rs): getColumnDef WASM API 추가 — 현재 구역의 다단 설정(단 수, 종류, 너비 동일, 간격)을 JSON으로 반환
  • TS (column-settings-dialog.ts): ColumnSettingsDialog 클래스 — 기존 SectionSettingsDialog와 동일한 ModalDialog 패턴
    • 단 수 (1~8)
    • 종류 (일반/배분/평행)
    • 너비 동일 체크박스
    • 간격 (mm 단위)
  • TS (page.ts): page:col-settings 커맨드를 stub에서 실제 구현으로 대체
  • TS (shortcut-map.ts): Ctrl+Alt+Enterpage:col-settings 매핑 추가

테스트

  • cargo test 1173개 통과
  • cargo clippy -- -D warnings 경고 없음

Closes #733

감사합니다.

- 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>
Copilot AI review requested due to automatic review settings May 9, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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+Enterpage: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>
@oksure

oksure commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Copilot 리뷰 피드백을 a8f2f319에서 반영했습니다:

  • onOk()onConfirm() (ModalDialog 추상 메서드 일치)
  • this.close() 제거 (base class가 onConfirm 반환값에 따라 자동 hide())
  • count(18), type(02), spacing(0~32767) 입력값 클램프 추가
  • HWPUNIT_PER_MM 상수를 7200 / 25.4 계산식으로 통일 (table-cell-props-dialog.ts 등과 일관)

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
@edwardkim

Copy link
Copy Markdown
Owner

@oksure 검토 완료했습니다. 감사합니다.

처리 결과

Merge commit: 577befdd (devel)

본질

SectionSettingsDialog 패턴 정합 — ModalDialog 베이스 + (wasm, eventBus, sectionIdx) 호출 패턴 영역 영역 일관 적용.

인프라 재사용

  • setColumnDef WASM API (기존) — 설정 적용 영역 영역 재사용
  • find_initial_column_def 헬퍼 (기존) — getColumnDef 영역 내부 활용
  • ModalDialog 베이스 (기존) — ColumnSettingsDialog 베이스 클래스
  • SectionSettingsDialog 패턴 — 동일 호출 패턴

→ 신규 인프라 1개만 (getColumnDef 조회 전용).

검증

  • TypeScript / cargo test ALL GREEN
  • 광범위 sweep 170/170 same (Rust 조회 API 추가 영역 영역 SVG 무영향 입증)
  • WASM 4.66 MB
  • 웹 에디터 인터랙션 검증 통과 (Ctrl+Alt+Enter + 다단 설정 적용)

Issue #733 close 정합.

5/10 사이클 18번째 PR — 수고하셨습니다.

@edwardkim

Copy link
Copy Markdown
Owner

Merged. Merge commit: 577befd

@edwardkim edwardkim closed this May 10, 2026
edwardkim added a commit that referenced this pull request May 10, 2026
PR #750 (closes #733) 처리 보고서 + 검토 문서 archives 이동 + 5/10 orders 18번째 PR 행 추가.
다단 설정 대화상자 구현 — SectionSettingsDialog 패턴 정합 + getColumnDef WASM API 1개 신규.

Merge commit: 577befd
Cherry-pick: 2e6b5dd + 1f88877
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 + 다단 설정 + 다수 단축키
@edwardkim edwardkim mentioned this pull request May 10, 2026
4 tasks
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.

3 participants