Conversation
There was a problem hiding this comment.
Pull request overview
답글 작성 시 원문에 설정된 CW(스포일러 텍스트)를 ComposeBox로 함께 전달하고, 원문에 CW가 있으면 작성창에서 CW 입력을 자동으로 활성화해 동작을 동기화하는 PR입니다.
Changes:
replyingTo에spoilerText필드를 추가해 답글 대상의 CW를 전달- ComposeBox에서 답글 대상의
spoilerText유무에 따라 CW를 자동 on/off 및 텍스트 동기화 - 모바일 작성 메뉴(MobileComposeMenu)에서도 동일한
replyingTo타입/전달 방식 유지
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ui/components/MobileMenus.tsx | MobileComposeMenu의 replyingTo 타입에 spoilerText를 포함하도록 확장 |
| src/ui/components/ComposeBox.tsx | 답글 대상 CW가 있으면 CW 입력을 자동 활성화하고 텍스트를 동기화 |
| src/App.tsx | ComposeBox/MobileComposeMenu에 replyingTo.spoilerText를 전달하도록 수정 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| spoilerText: string; | ||
| }) => Promise<boolean>; | ||
| replyingTo: { id: string; summary: string } | null; | ||
| replyingTo: { id: string; summary: string; spoilerText: string } | null; | ||
| onCancelReply: () => void; | ||
| mentionText: string | null; | ||
| accountSelector?: React.ReactNode; |
There was a problem hiding this comment.
replyingTo의 shape를 { id; summary; spoilerText } 인라인 타입으로 여러 컴포넌트에서 반복 정의하고 있어, 필드 추가/변경 시 누락이 발생하기 쉽습니다(이번 변경도 그 케이스). 공용 타입(예: ReplyTarget/ReplyingTo type alias)을 한 곳에 정의해 ComposeBox/MobileComposeMenu/App에서 재사용하도록 정리하는 게 유지보수에 안전합니다.
| replyingTo={ | ||
| replyTarget | ||
| ? { id: replyTarget.id, summary: replySummary ?? "", spoilerText: replyTarget.spoilerText } | ||
| : null | ||
| } |
There was a problem hiding this comment.
동일한 replyingTo 객체 리터럴을 이 컴포넌트 내에서 2곳(사이드 ComposeBox, MobileComposeMenu)에서 중복 생성하고 있습니다. const replyingTo = ...처럼 한 번만 만들고 재사용하면 필드 추가 시 누락/불일치 위험을 줄일 수 있습니다.
Summary