Repository navigation
데스크톱 좌측 내비게이션 햄버거 토글 추가 - #68
Conversation
Co-authored-by: hellices <5661904+hellices@users.noreply.github.com>
Co-authored-by: hellices <5661904+hellices@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Storage 오류 처리, ARIA 의미, CI 테스트 연결 문제를 해결해야 합니다.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
데스크톱에서 좌측 내비게이션을 접고 상태를 유지하는 토글 기능을 추가합니다.
Changes:
- 반응형 토글 UI와 접힘 스타일 추가
- 접근성 상태 및
localStorage동기화 구현 - Node 기반 동작 테스트 추가
File summaries
| File | Description |
|---|---|
mkdocs.yml |
토글 스크립트 등록 |
docs/assets/stylesheets/extra.css |
데스크톱 전용 토글·접힘 스타일 |
docs/assets/javascripts/sidebar-toggle.js |
토글 상태와 저장소 처리 |
tests/docs/sidebar-toggle.test.cjs |
토글 동작 단위 테스트 |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| button.setAttribute("aria-pressed", collapsed ? "true" : "false"); | ||
| button.setAttribute("aria-label", collapsed ? "왼쪽 메뉴 펼치기" : "왼쪽 메뉴 접기"); |
| const mediaQuery = typeof windowRef.matchMedia === "function" | ||
| ? windowRef.matchMedia(desktopQuery) | ||
| : null; | ||
| const storage = windowRef.localStorage || null; |
| @@ -0,0 +1,126 @@ | |||
| const test = require("node:test"); | |||
|
@codex[agent] 리뷰 확인해서 수정 |
Co-authored-by: hellices <5661904+hellices@users.noreply.github.com>
리뷰 지적 사항을 반영했습니다. |
|
@codex[agent] 그런데 테스트 코드가 이렇게 계속 늘어나는게 맞나? 전체 테스트 코드는 진짜로 필요한 부분만 넣어줘야해. 여기는 문서 레포인데 테스트코드가 늘어나서는 별로 도움이 안돼 |
Co-authored-by: hellices <5661904+hellices@users.noreply.github.com>
불필요하게 늘어난 테스트를 줄였습니다. 별도 pytest 브리지 파일은 삭제하고 기존 JS 테스트 브리지에 통합했으며, sidebar 테스트는 리뷰 지적을 검증하는 핵심 3개 케이스만 남겼습니다. 반영 커밋: a0746a8 |
변경 내용
GitHub Pages 좌측 메뉴를 데스크톱에서 접기/펼치기 할 수 없던 문제를 해결했습니다. 기존 모바일 drawer 동작은 유지하면서, 데스크톱에서만 헤더 햄버거로 좌측 내비게이션 표시를 제어하도록 변경했습니다.
데스크톱 전용 토글 UI
.dg-sidebar-toggle버튼을 주입하고 좌측 내비게이션 토글 동작을 연결했습니다.mkdocs.yml의extra_javascript에assets/javascripts/sidebar-toggle.js를 추가했습니다.상태/접근성 처리
<html data-dg-sidebar-collapsed="true|false">로 관리합니다.aria-pressed,aria-label을 상태와 동기화해 스크린리더 의미를 유지합니다.localStorage로 접힘 상태를 유지합니다.반응형 범위 고정
>=1220px에서만 토글 버튼을 표시하고 좌측 사이드바 숨김을 적용합니다.<=1219px에서는 토글 버튼을 강제로 숨겨 모바일 네비게이션과 충돌하지 않도록 했습니다.공개 문서 체크리스트
docs-taxonomy.yml의 분류 값을 사용했습니다. (해당 없음: 문서 메타데이터 변경 없음)verify-with-microsoft-learnskill로 원문까지 확인했습니다. (해당 없음: 기술 주장 변경 없음)