Skip to content

[fix] 카드 탭 지연을 없애고 버튼 hover가 터치 누름 피드백을 덮지 않게 한다 - #2259

Open
seongwon030 wants to merge 2 commits into
develop-fefrom
fix/#2258-tap-response-delay-MOA-1230
Open

seongwon030 wants to merge 2 commits into
develop-fefrom
fix/#2258-tap-response-delay-MOA-1230

Conversation

@seongwon030

Copy link
Copy Markdown
Member

Close #2258

ClubCard.tsx는 열린 #2131도 고친다. 그쪽은 import와 로고 줄, 여기는 handleClick이라 겹치는 줄은 없다.

문제

탭했을 때 반응이 늦거나 누를 때의 피드백이 가려지는 곳이 두 군데 있다.

  • ClubCard: handleClick이 카드를 scale(1.05)로 키우고 setTimeout 150ms가 지난 뒤에 이동한다. 메인·구독 목록에서 가장 자주 누르는 요소인데 매번 늦게 반응하고, 누르는 동안의 :active(0.98 축소)와 반대로 커진다
  • 공통 Button: 터치 기기는 첫 탭에 :hover를 적용한다. 그래서 animated 버튼은 탭할 때마다 0.4초 pulse가 돌며 :active의 scale(0.95)를 덮고, 배경도 hover 색으로 남는다

해결

  • ClubCard: 150ms 지연과 $isClicked 상태를 지우고, 트래킹 직후 바로 이동한다. hover scale(1.03)과 :active scale(0.98)은 그대로 둔다
  • Button: hover 블록을 @media (hover: hover)로 감싼다(#2255와 같은 방식)

검증

Playwright로 수정 전후를 비교했다.

항목 수정 전 수정 후
카드 클릭 → URL 변경(데스크톱, 5회) 154·167·178·184·154ms 1·2·2·2·1ms
Button 강제 :hover 배경, 데스크톱 rgb(75,75,75) rgb(75,75,75)
Button 강제 :hover 배경, iPhone 13 에뮬 rgb(75,75,75) rgb(58,58,58)(기본색)
  • typecheck·eslint 통과, --findRelatedTests jest 7개 스위트(49개) 통과
  • pulse는 같은 hover 블록 안에 있어서 배경색 결과로 갈음했다. animated 버튼은 관리자 화면에만 있어 직접 띄우지 않았다
  • 탭할 때의 체감은 실기기로 확인하지 못했다

영향 범위

  • 학생: 메인·구독 목록 카드. 이제 탭하는 즉시 이동하고, 이동 직전에 카드가 커지는 모션은 없어진다
  • 공통 Button을 쓰는 학생·관리자 화면 전부: 데스크톱 hover는 그대로이고, 터치에서는 탭한 뒤 hover 배경과 pulse가 남지 않는다. styled(Button)로 확장한 Filter·SocialLoginButton 등이 따로 건 hover는 바뀌지 않는다
  • 카드 클릭 트래킹 이벤트와 속성은 그대로다

- handleClick이 $isClicked로 카드를 scale(1.05)로 키운 뒤 setTimeout 150ms가 지나야 이동해서, 탭할 때마다 반응이 늦고 :active 축소와 반대로 커졌다
- 지연과 $isClicked 상태를 지우고 트래킹 직후 이동한다. hover scale(1.03)·:active scale(0.98)은 그대로 둔다
- 터치 기기는 첫 탭에 :hover를 적용해서, animated 버튼은 탭할 때마다 pulse 애니메이션이 돌며 :active의 scale(0.95)를 덮고 배경색도 hover 색으로 남았다
- hover 블록을 @media (hover: hover)로 감싼다
@seongwon030 seongwon030 self-assigned this Oct 28, 2026
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
moadong Ready Ready Preview Oct 28, 2026 6:54am UTC

@github-actions github-actions Bot added the 💻 FE Frontend label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between aeb857f and 29987e7.

Files selected for processing: 3
  • frontend/src/components/common/Button/Button.tsx
  • frontend/src/pages/MainPage/components/ClubCard/ClubCard.styles.ts
  • frontend/src/pages/MainPage/components/ClubCard/ClubCard.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@reviewer-harry

reviewer-harry Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Claude finished @seongwon030's task in 26s —— View job


harry 리뷰 총평

리뷰 기준에 걸리는 부분이 없어서 통과예요. 👍

  • ClubCard: useState와 setTimeout을 없애고 핸들러 안에서 바로 이동하게 해서 불필요한 상태 하나와 타이머를 같이 지웠어요. 트래킹 속성은 그대로 두고 :hover/:active 스케일도 유지해서, 고친 범위가 꼭 필요한 곳까지만이에요.
  • Button: hover 블록만 @media (hover: hover)로 감싸서 [fix] 터치 기기에서 탭한 뒤 hover 효과가 남지 않게 한다 #2255, ClubCard.styles.ts와 같은 방식으로 맞췄어요. :active는 미디어 쿼리 밖에 그대로 있어서 터치에서도 누름 피드백이 유지돼요.

참고로 Playwright로 수정 전후 수치를 비교하고, 실기기 체감은 확인하지 못했다고 적어 둔 점도 좋았어요.

@diboreview-e2e-bot diboreview-e2e-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

켜진 규칙 위반이 없어요.

지적 0개 · 버린 지적 0개 · 중복 제외 0개 · 비용 $0.0181

@github-actions

Copy link
Copy Markdown

🎨 UI 변경사항을 확인해주세요

변경된 스토리를 Chromatic에서 확인해주세요.

구분 링크
🔍 변경사항 리뷰 https://www.chromatic.com/build?appId=67904e61c16daa99a63b44a7&number=1267
📖 Storybook https://67904e61c16daa99a63b44a7-kfxfbntndg.chromatic.com/

3개 스토리 변경 · 전체 193개 스토리 · 67개 컴포넌트

This branch was successfully deployed

1 active deployment
Preview — 29987e76 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant