Skip to content

[feat/MAT-658] 포인팅 화면 필기 toolbar 연결#320

Draft
b0nsu wants to merge 2 commits into
feat/mat-585-toolbar-new-versionfrom
feat/MAT-658-pointing-drawing-toolbar
Draft

[feat/MAT-658] 포인팅 화면 필기 toolbar 연결#320
b0nsu wants to merge 2 commits into
feat/mat-585-toolbar-new-versionfrom
feat/MAT-658-pointing-drawing-toolbar

Conversation

@b0nsu
Copy link
Copy Markdown
Collaborator

@b0nsu b0nsu commented May 10, 2026

Summary

PointingScreen 우측 문제 영역에 DrawingCanvas + PointingDrawingToolbar 통합. ProblemScreen 의 floating toolbar 와 동일한 snap 동작 (useFloatingToolbarSnap hook 공유) 위에 색상 picker (검정/빨강/파랑/초록 4개, 2×2 grid) 만 추가된 별도 컴포넌트. 4-corner snap 영역과 drawing 영역은 PointerContentView 영역으로 정렬.

Linear

  • MAT-658 — 포인팅 화면 필기 toolbar 연결

Changes

  • MAT-658 apps/native/src/features/student/problem/components/floating-toolbar/PointingDrawingToolbar.tsx — 신규 컴포넌트. useFloatingToolbarSnap hook + shared.tsxToolbarButton / ToolbarDivider / ColorSwatch 재사용. ExpandedToolbar 끝에 divider + 2×2 색상 grid 추가. POINTING_BRUSH_COLORS = ['#000000', '#FF0900', '#0004FF', '#1BB52A'] 상수 export. initialCorner default 'bottom-right'.
  • MAT-658 apps/native/src/features/student/problem/components/floating-toolbar/index.tsPointingDrawingToolbar / POINTING_BRUSH_COLORS export 추가.
  • MAT-658 apps/native/src/features/student/problem/screens/PointingScreen.tsx — 우측 문제 영역에 DrawingCanvas + PointingDrawingToolbar 통합. 4-corner snap 영역과 drawing 영역을 단일 <View flex:1 marginTop:20> 으로 합쳐 PointerContentView 영역과 정렬. brushColor state + handleSelectBrushColor (eraser 모드일 때 자동 pen 전환).

Behavior

  • pencil/eraser 선택 + 캔버스 stylus 터치 → toolbar 접힘 (DrawingCanvas.onStrokeStart 가 stylus/mouse 한정으로 트리거되므로 finger touch 는 무영향).
  • long-press 1초 + drag → 우측 panel 4 모서리로 snap. 좌측 채팅 panel 침범 안 함.
  • 색상 선택 ring = primary-600 1px border on 28×28 outer + 24×24 circle.

Screenshots

(PR 본문 web 편집에서 첨부 — gh CLI 는 이미지 직접 업로드 미지원)

Testing

  • cd apps/native && pnpm exec prettier --check — clean
  • cd apps/native && pnpm exec eslint — 0 errors (사전 존재 warning 만)
  • cd apps/native && pnpm exec tsc --noEmit — 0 error
  • iPad + Apple Pencil 실기기: pencil/eraser 선택 + 필기 area 터치 → toolbar 접힘
  • 실기기: long-press 1초 + drag → 4 모서리 snap (좌측 채팅 panel 비침범 확인)
  • 실기기: 색상 선택 시 stroke 색 즉시 반영 + eraser 상태에서 색상 선택 → 자동 pen 전환

Risk / Impact

  • ProblemDrawingToolbar 미수정 — 색상 picker 가 필요한 PointingScreen 만 별도 컴포넌트 사용. ProblemScreen 동작 영향 없음.
  • shared atom (ToolbarButton / ColorSwatch / Divider) + snap hook 공유로 두 toolbar 의 동작/스타일 일관성 유지. 향후 디자인 분기 시 각 컴포넌트만 수정.
  • Follow-up (별 작업 — 본 PR 스코프 외): PointingScreen 외부 컨테이너에 useSafeAreaInsets 처리가 없어 panel 이 iPad home indicator 영역까지 흘러내림. toolbar containerHeight 가 그만큼 늘어나 bottom-y 가 home indicator 와 가까워지는 시각적 이슈. 외부 컨테이너에 paddingTop: insets.top + paddingBottom: insets.bottom 추가 필요. 좌·우 panel 모두 safe area 안에서 동작하게 됨.
  • 머지 순서: PR [feat/MAT-585] 문제풀이 도구 toolbar New version + 디렉토리 분리 #321 (feat/mat-585-toolbar-new-version) 머지 후 develop 기준 rebase. 본 PR base 는 [feat/MAT-585] 문제풀이 도구 toolbar New version + 디렉토리 분리 #321.

@linear
Copy link
Copy Markdown

linear Bot commented May 10, 2026

MAT-658

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
pointer-admin Ready Ready Preview, Comment May 10, 2026 2:34pm

@b0nsu b0nsu changed the title feat(problem): MAT-658 — 포인팅 화면 필기 toolbar 연결 [feat/MAT-658] 포인팅 화면 필기 toolbar 연결 May 10, 2026
@b0nsu b0nsu requested a review from Copilot May 10, 2026 13:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

PointingScreen의 우측 문제 영역에 필기(DrawingCanvas)와 floating toolbar(ProblemDrawingToolbar)를 통합해, 포인팅 단계에서도 문제 위에 필기/지우기/undo/redo 및 4-corner snap 이동이 가능하도록 확장하는 PR입니다.

Changes:

  • PointingScreen 우측 문제 패널에 DrawingCanvas + ProblemDrawingToolbar 오버레이 및 toolbar 상태/색상 상태 추가
  • ProblemDrawingToolbarinitialCorner 및 optional 색상 picker(brushColors/selectedBrushColor/onSelectBrushColor) 지원 추가
  • 색상 picker 활성 시 toolbar expanded width 보정 및 초기 mount flicker 방지를 위한 ready 가시성 게이트 추가

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
apps/native/src/features/student/problem/screens/PointingScreen.tsx 우측 문제 영역에 필기 캔버스/툴바 오버레이를 추가하고, 색상/모드/접힘 상태를 관리
apps/native/src/features/student/problem/components/ProblemDrawingToolbar.tsx toolbar 초기 스냅 코너 설정 및 optional 색상 선택 UI를 추가하고, 확장 폭을 색상 섹션에 맞게 조정

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

Comment thread apps/native/src/features/student/problem/screens/PointingScreen.tsx
Comment thread apps/native/src/features/student/problem/components/ProblemDrawingToolbar.tsx Outdated
Comment thread apps/native/src/features/student/problem/components/ProblemDrawingToolbar.tsx Outdated
Comment thread apps/native/src/features/student/problem/components/ProblemDrawingToolbar.tsx Outdated
b0nsu and others added 2 commits May 10, 2026 23:26
- PointingDrawingToolbar: floating-toolbar/ 안에 신규. ProblemDrawingToolbar
  와 동일한 useFloatingToolbarSnap hook + shared.tsx 재사용. ExpandedToolbar
  마지막에 divider + 2x2 색상 grid (POINTING_BRUSH_COLORS).
- POINTING_BRUSH_COLORS = ['#000000', '#FF0900', '#0004FF', '#1BB52A'] export.
- PointingScreen: 우측 문제 영역에 DrawingCanvas + PointingDrawingToolbar
  통합. 4-corner snap 영역과 drawing 영역을 PointerContentView 영역으로 정렬.
  brushColor state + handleSelectBrushColor (eraser 모드면 자동 pen 전환).
- index.ts: PointingDrawingToolbar / POINTING_BRUSH_COLORS export 추가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- PointingScreen: CONTENT_MAX_WIDTH 상수 추출. inner wrapper 와
  PointerContentView 둘 다 같은 cap 사용 → wide iPad 에서 4-corner snap 영역
  과 contentviewer 영역 일치 (720 magic number 한 곳에서 관리).
- PointingDrawingToolbar: Animated.View 에 pointerEvents 게이트 추가
  (measured 전 invisible 영역의 GestureDetector 가 터치 가로채지 않도록).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@b0nsu b0nsu force-pushed the feat/MAT-658-pointing-drawing-toolbar branch from 0953513 to fb63fee Compare May 10, 2026 14:33
@b0nsu b0nsu marked this pull request as draft May 11, 2026 08:02
@b0nsu b0nsu marked this pull request as draft May 11, 2026 08:02
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.

2 participants