Skip to content

feat: page:hide-current 현재 쪽만 머리말/꼬리말 감추기 구현#760

Closed
oksure wants to merge 2 commits into
edwardkim:develfrom
oksure:contrib/page-hide-current
Closed

feat: page:hide-current 현재 쪽만 머리말/꼬리말 감추기 구현#760
oksure wants to merge 2 commits into
edwardkim:develfrom
oksure:contrib/page-hide-current

Conversation

@oksure

@oksure oksure commented May 9, 2026

Copy link
Copy Markdown
Contributor

변경 내용

메뉴에 data-cmd="page:hide-current"로 등록되어 있으나 커맨드 정의가 누락된 "현재 쪽만 감추기" 기능을 추가했습니다.

기능

  • 현재 페이지의 머리말과 꼬리말 표시를 동시에 토글
  • toggleHideHeaderFooter WASM API를 사용하여 페이지 단위로 감추기/표시 전환
  • 본문 편집 모드에서도 동작 (머리말/꼬리말 편집 모드 진입 불필요)

배경

index.html의 쪽 메뉴에 "현재 쪽만 감추기" 항목이 있으나, 클릭해도 아무 동작하지 않는 상태였습니다. 기존 page:hide-headerfooter는 머리말/꼬리말 편집 모드에서만 동작하는 반면, 이 커맨드는 일반 편집 중에도 사용할 수 있습니다.

테스트

  • cargo test 전체 통과
  • cargo clippy -- -D warnings 경고 없음

감사합니다.

메뉴에 data-cmd="page:hide-current"로 등록되어 있으나
커맨드 정의가 누락된 "현재 쪽만 감추기" 기능 추가.

toggleHideHeaderFooter WASM API로 현재 페이지의
머리말과 꼬리말 표시를 동시에 토글.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 16:01

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

Adds the missing page:hide-current command so the existing menu item (“현재 쪽만 감추기”) actually works, using the WASM toggleHideHeaderFooter API to toggle header/footer visibility for the current page even outside header/footer editing mode.

Changes:

  • Implement page:hide-current command in the page command registry.
  • Toggle both header and footer hide-state for the cursor’s current page and trigger a document refresh event.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +304 to +305
services.wasm.toggleHideHeaderFooter(pageIndex, true);
services.wasm.toggleHideHeaderFooter(pageIndex, false);
머리말과 꼬리말의 초기 감추기 상태가 다를 때 독립 토글하면
상태가 교차되는 문제 수정. 토글 결과를 비교하여 두 항목이
동일한 상태가 되도록 보정.

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 리뷰 피드백 반영 (8af266f):

머리말과 꼬리말의 초기 상태가 다를 때 독립 토글로 상태가 교차되는 문제를 수정했습니다. 두 항목을 각각 토글한 후 결과를 비교하여, 상태가 불일치하면 꼬리말을 한 번 더 토글하여 동기화합니다.

edwardkim added a commit that referenced this pull request May 10, 2026
index.html 의 쪽 메뉴 data-cmd='page:hide-current' 등록되어 있으나 커맨드 정의 누락 — 본 PR 에서 신규 등록.

기존 page:hide-headerfooter 와 본질이 다름 (편집 모드만 동작) — 본 PR 은 일반 편집 중에도 사용 가능.

인프라 재사용: toggleHideHeaderFooter WASM API + cursor.rect.pageIndex.

Copilot 리뷰 반영: header/footer 토글 후 양측 상태가 다른 경우 footer 다시 토글하여 동기화.

검증:
- tsc --noEmit ✅
- cargo test --release ALL GREEN
- 광범위 sweep 170/170 same
- WASM 4.68 MB 재빌드
- 웹 에디터 인터랙션 검증 ✅ 통과
@edwardkim

Copy link
Copy Markdown
Owner

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

처리 결과

Merge commit: 60899a3c (devel)

본질

index.html 쪽 메뉴에 data-cmd="page:hide-current" 등록되어 있으나 커맨드 정의 누락 — 신규 등록. 기존 page:hide-headerfooter 는 편집 모드에서만 동작, 본 PR 은 일반 편집 중에도 사용 가능.

인프라 재사용

  • toggleHideHeaderFooter WASM API (기존)
  • cursor.rect.pageIndex (기존)
  • document-changed eventBus (기존)

검증

  • TypeScript / cargo test ALL GREEN
  • 광범위 sweep 170/170 same
  • WASM 4.68 MB 재빌드
  • 웹 에디터 인터랙션 검증 통과

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

@edwardkim

Copy link
Copy Markdown
Owner

Merged. Merge commit: 60899a3

@edwardkim edwardkim closed this May 10, 2026
edwardkim added a commit that referenced this pull request May 10, 2026
PR #760 (Issue 미연결) 처리 보고서 + 검토 문서 archives 이동 + 5/10 orders 26번째 PR 행 추가.
page:hide-current 신규 커맨드 — toggleHideHeaderFooter 인프라 재사용 + 상태 동기화.

Merge commit: 60899a3
Cherry-pick: 09dcf02 + 2b5251c
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