feat(post): 펼친 게시물 본문을 다시 눌러도 접히게 - #112
Merged
Merged
Conversation
본문을 펼치면 "접기" 버튼이 화면 아래로 밀려나 읽던 자리에서 접을 수 없었다. 펼친 본문 자체에 같은 동작을 걸고, 게시물 상세와 공유 게시물 상세에 그대로 복사돼 있던 본문 블록을 ExpandableCaption 하나로 합친다.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0. 링크
1. 요약
2. 작업 내용
features/post/components/ExpandableCaption신설. 접힘은<p class="line-clamp-1">, 펼침은<button>으로 렌더해 클릭을 받고,window.getSelection()이 본문 안을 가리키면 접기를 건너뜁니다.tabIndex={-1}입니다 — 바로 아래 "접기" 버튼이 키보드·보조기기 경로를 이미 담당해서 탭 정지점을 둘로 만들 이유가 없습니다.PostDetailPage,SharedPostDetailPage가 이 컴포넌트를 쓰도록 교체하고 각자 들고 있던expanded상태를 제거. 두 화면에 글자까지 똑같이 복사돼 있던 블록이라 하나로 합쳤습니다./dev/ui)에ExpandableCaption항목 추가 — 로그인 없이 동작을 눌러볼 수 있습니다.ExpandableCaption.test.tsx4건(접힘 상태엔 본문 버튼 없음 / 본문 탭으로 접힘 / 텍스트 선택 중엔 안 접힘 / "접기"로도 접힘),PostDetailPage.test.tsx에 화면 배선 1건 추가.pnpm check성공(391개). 개발 서버를 띄워 접힘 → 더보기 → 본문 탭 → 접힘까지 실제 브라우저에서 확인했습니다.성공 기준 대비
#해시태그도 링크가 아닙니다. 나중에 링크화하면 그때<a>클릭을 걸러야 합니다.남은 것
SavedPostCard(지도 장소 상세의 "저장된 게시물")에도 같은 본문 접기 코드가 남아 있습니다. 2줄 클램프에 버튼 정렬·굵기가 달라 이번엔 건드리지 않았습니다.