Skip to content

[FIX] 키워트 코멘트바 수정#157

Merged
sunhwaaRj merged 4 commits intodevelopfrom
feature/#156-bottom-sheet
Mar 4, 2026
Merged

[FIX] 키워트 코멘트바 수정#157
sunhwaaRj merged 4 commits intodevelopfrom
feature/#156-bottom-sheet

Conversation

@sunhwaaRj
Copy link
Copy Markdown
Contributor

@sunhwaaRj sunhwaaRj commented Mar 4, 2026

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📌 관련 이슈번호


✅ Key Changes

  • 모바일 환경에서의 키워드 바텀 바 에러 수정
  • 바텀시트 닫을 때 새로고침되는 문제 해결
  • 푸터 이메일 수정

📸 스크린샷 or 실행영상


🎸 기타 사항 or 추가 코멘트

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 하단 시트 높이를 창 높이의 70%(최소값 500px)로 조정하여 UI 일관성 개선
    • 시트 높이에 따른 닫기 임계값 적용으로 드래그 동작 신뢰성 향상
    • 아래로 드래그 시 기본 터치 스크롤 방지로 의도치 않은 스크롤 차단
  • 기타

@sunhwaaRj sunhwaaRj self-assigned this Mar 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 4, 2026

Walkthrough

모바일 키워드 댓글 바텀시트의 기준 높이를 80vh에서 70vh로 줄이고, 드래그 훅에 sheetHeight 인자를 추가해 닫기 임계값을 계산하도록 변경했으며, 터치 드래그 중 기본 스크롤을 막는 로직과 푸터 이메일 주소를 수정했습니다.

Changes

Cohort / File(s) Summary
바텀 시트 컴포넌트
src/app/(main)/teampsylog/_components/BottomComment.tsx
바텀 시트의 height / max-height 값을 80vh → 70vh로 변경하고, 시트 높이를 계산해 useBottomSheetDrag에 전달하도록 호출부를 수정했습니다.
드래그 훅 (행동 로직)
src/app/(main)/teampsylog/_components/useBottomSheetDrag.ts
훅 시그니처에 sheetHeight 매개변수 추가, 닫기 임계값을 sheetHeight * 0.24로 계산하도록 변경, 하향 드래그 시 touchmove에서 e.preventDefault() 호출 추가 및 관련 비교상수(150) 제거/대체.
푸터 연락처
src/components/common/Footer.tsx
모바일·데스크톱 푸터에 표기된 연락 이메일과 mailto: 링크를 Teamficial@gmail.comteamficial25@gmail.com으로 업데이트했습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 주요 변경 사항인 모바일 키워드 바텀 바 수정을 명확하게 반영하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿을 따르고 있으며, PR 유형, 관련 이슈번호, 주요 변경 사항이 모두 작성되어 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경 사항이 이슈 #156의 목적과 일치합니다: 바텀시트 높이 계산, closeThreshold 동적 설정, preventDefault 추가로 드래그 감도 개선 및 새로고침 문제 해결.
Out of Scope Changes check ✅ Passed Footer.tsx의 이메일 수정은 PR 설명에 명시된 '푸터 이메일 수정'과 일치하며, 바텀 바 관련 변경 외에 범위를 벗어난 변경사항이 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#156-bottom-sheet

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/app/(main)/teampsylog/_components/BottomComment.tsx (1)

41-42: 시트 높이 변경에 맞춰 드래그 임계값도 비율 기반으로 맞추는 것을 권장합니다.

Line 41-42를 70vh로 낮춘 상태에서, 닫힘 임계값은 src/app/(main)/teampsylog/_components/useBottomSheetDrag.ts의 Line 49/75에서 여전히 고정 150px입니다. 기기 높이에 따라 닫힘 감도가 달라질 수 있어 sheetHeight * ratio 형태로 연동하면 UX가 더 안정적입니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx around lines 41 -
42, The sheet close threshold is still a fixed 150px in useBottomSheetDrag
(refer to the drag handling logic / threshold calculations) so when
BottomComment's height was reduced to '70vh' the sensitivity breaks; change the
hardcoded 150px to a computed value based on the current sheetHeight (e.g.,
const closeThreshold = sheetHeight * CLOSE_RATIO) and use that computed
closeThreshold wherever the code currently compares against 150 (look for
functions/variables like useBottomSheetDrag, onDragEnd/onDragRelease, or
closeThreshold) so the drag-to-close sensitivity scales with the sheet's vh
height.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx:
- Around line 41-42: The sheet close threshold is still a fixed 150px in
useBottomSheetDrag (refer to the drag handling logic / threshold calculations)
so when BottomComment's height was reduced to '70vh' the sensitivity breaks;
change the hardcoded 150px to a computed value based on the current sheetHeight
(e.g., const closeThreshold = sheetHeight * CLOSE_RATIO) and use that computed
closeThreshold wherever the code currently compares against 150 (look for
functions/variables like useBottomSheetDrag, onDragEnd/onDragRelease, or
closeThreshold) so the drag-to-close sensitivity scales with the sheet's vh
height.

ℹ️ Review info
Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3ebbec55-e70b-41d5-82f0-6c5099ecc2ee

📥 Commits

Reviewing files that changed from the base of the PR and between 0902947 and a50c789.

📒 Files selected for processing (3)
  • src/app/(main)/teampsylog/_components/BottomComment.tsx
  • src/app/(main)/teampsylog/_components/useBottomSheetDrag.ts
  • src/components/common/Footer.tsx

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
src/app/(main)/teampsylog/_components/useBottomSheetDrag.ts (1)

11-11: 닫힘 임계 비율(0.24)은 이름 있는 상수로 분리하면 더 읽기 쉽습니다.

Line 11의 매직넘버는 조정 시 의도 파악이 어렵습니다.

제안 diff
-  const closeThreshold = sheetHeight * 0.24;
+  const CLOSE_THRESHOLD_RATIO = 0.24;
+  const closeThreshold = sheetHeight * CLOSE_THRESHOLD_RATIO;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(main)/teampsylog/_components/useBottomSheetDrag.ts at line 11,
Extract the magic number 0.24 into a named constant (e.g.,
CLOSE_THRESHOLD_RATIO) near the top of useBottomSheetDrag or the surrounding
module and replace the inline literal in the computation of closeThreshold
(const closeThreshold = sheetHeight * 0.24) with sheetHeight *
CLOSE_THRESHOLD_RATIO; update any related comments or tests to reference the new
constant so the intention is clear and easy to adjust.
src/app/(main)/teampsylog/_components/BottomComment.tsx (1)

13-14: 높이 비율 상수를 한 곳에서 관리해 주세요.

Line 13의 0.7과 Line 43-44의 '70vh'가 분리되어 있어, 다음 조정 때 시트 높이와 닫힘 임계값이 어긋날 수 있습니다.

제안 diff
 const BottomComment = ({ isOpen, onClose, children }: BottomSheetProps) => {
-  const sheetHeight = Math.round(typeof window !== 'undefined' ? window.innerHeight * 0.7 : 500);
+  const SHEET_HEIGHT_VH = 70;
+  const sheetHeight = Math.round(
+    typeof window !== 'undefined' ? window.innerHeight * (SHEET_HEIGHT_VH / 100) : 500,
+  );

   const {
@@
       <div
         className="desktop:hidden fixed inset-x-0 bottom-0 z-50 rounded-t-2xl bg-gray-200"
         style={{
-          height: '70vh',
-          maxHeight: '70vh',
+          height: `${SHEET_HEIGHT_VH}vh`,
+          maxHeight: `${SHEET_HEIGHT_VH}vh`,

Also applies to: 43-44

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx around lines 13 -
14, Define a single height ratio constant (e.g., SHEET_HEIGHT_RATIO = 0.7) at
the top of the BottomComment component and replace the hardcoded 0.7 used in
sheetHeight and the '70vh' literal used for the close threshold with references
to that constant (use arithmetic or string interpolation like
`${SHEET_HEIGHT_RATIO * 100}vh` or compute pixel values from window.innerHeight)
so both sheetHeight and the close threshold stay in sync; update usages in
BottomComment (sheetHeight and the close-threshold/height string) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx:
- Around line 13-14: Define a single height ratio constant (e.g.,
SHEET_HEIGHT_RATIO = 0.7) at the top of the BottomComment component and replace
the hardcoded 0.7 used in sheetHeight and the '70vh' literal used for the close
threshold with references to that constant (use arithmetic or string
interpolation like `${SHEET_HEIGHT_RATIO * 100}vh` or compute pixel values from
window.innerHeight) so both sheetHeight and the close threshold stay in sync;
update usages in BottomComment (sheetHeight and the close-threshold/height
string) accordingly.

In `@src/app/`(main)/teampsylog/_components/useBottomSheetDrag.ts:
- Line 11: Extract the magic number 0.24 into a named constant (e.g.,
CLOSE_THRESHOLD_RATIO) near the top of useBottomSheetDrag or the surrounding
module and replace the inline literal in the computation of closeThreshold
(const closeThreshold = sheetHeight * 0.24) with sheetHeight *
CLOSE_THRESHOLD_RATIO; update any related comments or tests to reference the new
constant so the intention is clear and easy to adjust.

ℹ️ Review info
Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 46d5af4e-9fdf-49c7-89eb-38f4626cab39

📥 Commits

Reviewing files that changed from the base of the PR and between a50c789 and 3b61e97.

📒 Files selected for processing (2)
  • src/app/(main)/teampsylog/_components/BottomComment.tsx
  • src/app/(main)/teampsylog/_components/useBottomSheetDrag.ts

@sunhwaaRj sunhwaaRj merged commit 4cb8a54 into develop Mar 4, 2026
2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Mar 4, 2026
9 tasks
@sunhwaaRj sunhwaaRj deleted the feature/#156-bottom-sheet branch March 8, 2026 16:20
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.

[FIX] 키워트 코멘트바 수정

1 participant