Skip to content

잠긴 레슨 도장 클릭 차단 및 툴팁 통일#673

Merged
HA-SEUNG-JEONG merged 1 commit into
developfrom
fix/stamp
May 22, 2026
Merged

잠긴 레슨 도장 클릭 차단 및 툴팁 통일#673
HA-SEUNG-JEONG merged 1 commit into
developfrom
fix/stamp

Conversation

@HA-SEUNG-JEONG
Copy link
Copy Markdown
Contributor

@HA-SEUNG-JEONG HA-SEUNG-JEONG commented May 22, 2026

Problem

이전 레슨을 완료하지 않아 잠긴 레슨 도장에 두 가지 문제가 있었음.

  1. 클릭 차단 미작동: lockReason === 'retrospective'인 레슨은 accessible = true로 설정되어 stamp가 button으로 렌더링됨 → 클릭 시 레슨 미리보기 모달이 열림 (cursor-not-allowed 의도 무색)
  2. 툴팁 미표시: lockReason === 'access'인 레슨은 onMouseEnter 조건에서 누락되어 hover 시 툴팁이 뜨지 않음

Root cause:

  • onMouseEnter 조건이 retrospective만 허용 → access 케이스 툴팁 미표시
  • 클릭 가능 조건이 lesson.accessible만 체크 → LOCKED 상태여도 accessible=true면 클릭 가능

Solution

  • onMouseEnter 조건을 !isCompleted로 단순화 → 모든 미완료 레슨에서 툴팁 표시
  • 클릭 가능 조건에 !isLocked 추가 → LOCKED 레슨은 accessible 여부 무관하게 클릭 차단
  • 툴팁 내용 분기 제거 → 모든 미완료 레슨에서 "n명이 함께 달리는 중" 단일 메시지

Changes

Bug Fixes

File Description
src/components/pages/class/lesson-stamp.tsx LOCKED 레슨 클릭 차단, hover 툴팁 조건 및 내용 통일

Result

  • 이전 레슨 미완료 시 이후 모든 레슨 도장 → 클릭 불가 (cursor-not-allowed)
  • 미완료 레슨 도장 hover → lockReason 무관하게 "n명이 함께 달리는 중" 툴팁 표시
  • 완료된 레슨 → 툴팁 없음

Screenshots

Before After
retrospective 잠긴 레슨 클릭 → 미리보기 모달 열림 클릭 차단, hover 시 툴팁만 표시
access 잠긴 레슨 hover → 툴팁 미표시 "n명이 함께 달리는 중" 툴팁 표시

Test plan

  • 이전 레슨 미완료 상태에서 이후 레슨 도장 클릭 → 모달 열리지 않음
  • 잠긴 레슨 도장 hover → "n명이 함께 달리는 중" 툴팁 표시
  • 완료된 레슨 도장 hover → 툴팁 미표시
  • IN_PROGRESS 레슨 도장 hover → "n명이 함께 달리는 중" 툴팁 표시
  • 인증되지 않은 사용자 accessible 레슨 클릭 → 로그인 모달 정상 동작

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 리팩토링
    • 레슨 스탐프의 마우스 호버 시 표시되는 툴팁 로직을 단순화했습니다. 함께 달리는 사용자 수 정보를 보다 일관되게 확인할 수 있게 개선되었습니다.

Review Change Stack

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
study-platform-client-dev Ready Ready Preview, Comment May 22, 2026 11:13am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8044f023-eea8-44c9-82ae-a21b05c93e16

📥 Commits

Reviewing files that changed from the base of the PR and between 7374c16 and 932d40d.

📒 Files selected for processing (1)
  • src/components/pages/class/lesson-stamp.tsx

📝 Walkthrough

Walkthrough

LessonStamp 컴포넌트의 툴팁 표시 로직을 단순화합니다. 마우스 오버 조건을 isCompleted 여부만으로 기준을 변경하고, 렌더링 시 잠금 상태와 lockReason에 따른 분기를 제거하여 항상 Users 아이콘과 learnerCount 기반 문구만 표시합니다.

Changes

Tooltip 표시 로직 단순화

Layer / File(s) Summary
Tooltip 조건 및 렌더링 단순화
src/components/pages/class/lesson-stamp.tsx
마우스 오버 시 showTooltip 설정 조건이 isCompleted 여부로만 제어되도록 단순화되고, 렌더링 분기에서 잠금/락사유 기반의 조건부 콘텐츠가 제거되어 항상 Users 아이콘과 learnerCount 기반 문구({learnerCount}명이 함께 달리는 중)만 표시되도록 변경됩니다. 접근 가능 여부 분기 위치도 함께 조정됩니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

🐛 bug

Poem

🐰 모두 달리는 발걸음을
함께 센다는 마음으로,
복잡한 잠금 분기를 걷어내고
순수한 함께 달림만 빛내네! 🏃‍♂️✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확하게 반영하고 있습니다. '잠긴 레슨 도장 클릭 차단 및 툴팁 통일'은 코드 변경의 핵심인 클릭 방지 기능 추가와 통합된 툴팁 표시 로직을 정확히 요약합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stamp

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.

@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit a751d44 into develop May 22, 2026
12 of 13 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/stamp branch May 22, 2026 11:18
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.

1 participant