Skip to content

[SID:E036-DOCS4] Docs 슬래시(/) 커맨드 힌트 스크롤 클리핑 수정#243

Merged
AngryJay91 merged 2 commits intomainfrom
feat/SID-E036-DOCS4-slash-hint-clipping
Apr 15, 2026
Merged

[SID:E036-DOCS4] Docs 슬래시(/) 커맨드 힌트 스크롤 클리핑 수정#243
AngryJay91 merged 2 commits intomainfrom
feat/SID-E036-DOCS4-slash-hint-clipping

Conversation

@AngryJay91
Copy link
Copy Markdown
Contributor

Summary

  • 슬래시(/) 입력 시 뜨는 힌트 드롭다운이 스크롤 컨테이너 안에서 클리핑되던 문제 수정
  • calculatePopupPosition 순수 함수 추출: 캐럿 위치 + 팝업 크기 + 뷰포트 크기로 최적 위치 계산
  • 뷰포트 하단 근처에서 드롭다운이 아래로 넘칠 경우 캐럿 위로 자동 플립
  • 좌/우 끝도 뷰포트 margin 8px로 클램프 (모바일 포함)
  • double rAF로 React 렌더 완료 후 실제 크기 기반 정밀 보정

AC Checklist

  • 힌트 드롭다운을 body 레벨 portal로 승격 (fixed positioning) — 기존 구현 유지
  • 스크롤/뷰포트 경계와 무관하게 전체 목록 표시 (calculatePopupPosition + flip)
  • 캐럿 위치에 기반한 앵커 유지 (onUpdate에서 applyPosition 재호출)
  • 모바일 뷰에서도 클리핑 없음 (375×667 뷰포트 테스트 케이스)
  • 유닛 11케이스 통과 + 타입체크 클린

Test plan

  • / 입력 시 드롭다운이 에디터 하단에서 위로 플립되는지 확인
  • 에디터 중간 위치에서 아래로 정상 표시되는지 확인
  • 모바일(375px 너비) 에서 좌우 클리핑 없는지 확인
  • Escape로 닫힘, Enter/Arrow 키보드 탐색 회귀 없음

🤖 Generated with Claude Code

- calculatePopupPosition 순수 함수 추출 (테스트 가능)
- 캐럿 아래 공간 부족 시 위로 플립 (flip above)
- 좌/우/상/하 모두 viewport margin 8px 클램프
- double rAF로 실제 렌더 후 정밀 위치 보정
- 모바일 뷰포트(375×667) 클리핑 없음 검증
- 유닛 11케이스 추가 (calculatePopupPosition + defaultSlashItems + extension)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sprintable Ready Ready Preview, Comment Apr 15, 2026 11:51am

@AngryJay91 AngryJay91 merged commit 0aefebe into main Apr 15, 2026
3 of 4 checks passed
@AngryJay91 AngryJay91 deleted the feat/SID-E036-DOCS4-slash-hint-clipping branch April 15, 2026 11:52
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.

1 participant