Skip to content

feat: 햅틱 적용#878

Merged
Sadturtleman merged 2 commits into
developfrom
feat/877
May 19, 2026
Merged

feat: 햅틱 적용#878
Sadturtleman merged 2 commits into
developfrom
feat/877

Conversation

@Sadturtleman
Copy link
Copy Markdown
Contributor

@Sadturtleman Sadturtleman commented May 14, 2026

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

별점 슬라이더에 햅틱 추가했습니다. 딱히 강도에 대한 이야기는 없어서 가장 대중적으로 사용되는 거 같은 햅틱으로 넣었습니다.

Summary by CodeRabbit

  • 신규 기능
    • 평가 범위 슬라이더에 햅틱 피드백 추가: 드래그 중 값이 실제로 변경될 때 촉각적 반응 제공
    • 드래그 시작 시 즉시 보정된 값 적용 및 피드백 트리거로 일관된 조작감 개선
    • 각 손잡이(최솟값/최댓값)에 대한 별도 상태 추적으로 불필요한 피드백 최소화

Review Change Stack

@Sadturtleman Sadturtleman added 🍯 [FEAT] 새로운 기능을 개발합니다. 🧙마법사 하루 labels May 14, 2026
@github-actions github-actions Bot requested review from devfeijoa, m6z1 and s9hn May 14, 2026 00:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a38be63c-5e1b-49ef-a69f-e1647d17e136

📥 Commits

Reviewing files that changed from the base of the PR and between 8172584 and 6d0b10d.

📒 Files selected for processing (1)
  • app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt

둘러보기

RatingRangeSlider 컴포넌트에 드래그 제스처 중 햅틱 피드백을 추가했습니다. LocalView를 통해 뷰에 접근하고, 각 엄지손가락의 마지막 스냅 값을 추적한 후, 스냅 값이 변경될 때만 CLOCK_TICK 피드백을 트리거합니다.

변경 사항

별점 슬라이더 햅틱 피드백

계층 / 파일 설명
햅틱 임포트 및 상태 초기화
app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt
HapticFeedbackConstantsLocalView 임포트를 추가하고, view 참조와 lastMinSnapped, lastMaxSnapped 상태를 도입합니다.
드래그 처리 및 조건부 햅틱 트리거
app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt
onDragStart에서 선택된 엄지의 스냅 값을 초기화하고 onDrag에서 스냅 값이 변경될 때만 CLOCK_TICK 햅틱을 수행하고 상태를 갱신한 뒤 onValueChange를 호출합니다.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 별점 슬라이더에 진동이 흐르네요,
손끝이 옮겨질 때마다 톡, 톡, 톡 —
작은 클릭이 큰 만족을 줍니다!

🚥 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
Title check ✅ Passed 제목은 풀 리퀘스트의 주요 변경사항인 햅틱 적용을 명확하게 반영하고 있습니다.
Description check ✅ Passed PR 설명이 필수 섹션을 대부분 포함하고 있으며, 변경사항과 적용된 햅틱에 대해 설명하고 있습니다.
Linked Issues check ✅ Passed 코드 변경사항이 #877 이슈의 요구사항인 별점 슬라이더 햅틱 추가를 충족하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경사항이 별점 슬라이더 햅틱 추가라는 범위 내에 있으며 범위를 벗어난 변경은 없습니다.

✏️ 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 feat/877

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt (1)

111-116: 💤 Low value

중복 계산 제거를 고려하세요.

스냅된 값이 두 번 계산됩니다(햅틱 체크용, onValueChange 호출용). 변수에 저장하여 재사용하면 코드가 더 명확해집니다.

♻️ 리팩토링 제안
 onDrag = { change, _ ->
     change.consume()
     val newValue = valueAtX(change.position.x)
     if (activeThumb == 1) {
         val snapped = newValue.coerceAtMost(latestMax)
         if (snapped != lastMinSnapped) {
             view.performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK)
             lastMinSnapped = snapped
         }
-        onValueChange(newValue.coerceAtMost(latestMax), latestMax)
+        onValueChange(snapped, latestMax)
     } else {
         val snapped = newValue.coerceAtLeast(latestMin)
         if (snapped != lastMaxSnapped) {
             view.performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK)
             lastMaxSnapped = snapped
         }
-        onValueChange(latestMin, newValue.coerceAtLeast(latestMin))
+        onValueChange(latestMin, snapped)
     }
 },

Also applies to: 118-123

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt`
around lines 111 - 116, Avoid computing the snapped value twice: compute snapped
= newValue.coerceAtMost(latestMax) once, reuse that variable for the haptic
check (compare with lastMinSnapped and call view.performHapticFeedback) and pass
the same snapped to onValueChange instead of recomputing; update lastMinSnapped
when needed. Apply the same change to the analogous block that references
lastMaxSnapped/onValueChange for lines 118-123.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt`:
- Around line 68-70: The haptic false-positive occurs because
lastMinSnapped/lastMaxSnapped retain previous values across external prop
updates; update onDragStart in RatingRangeSlider to reset lastMinSnapped = min
and lastMaxSnapped = max (use the current min/max props) so the first onDrag
compares against the current positions and only triggers haptics when a real
snap crossing occurs.

---

Nitpick comments:
In
`@app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt`:
- Around line 111-116: Avoid computing the snapped value twice: compute snapped
= newValue.coerceAtMost(latestMax) once, reuse that variable for the haptic
check (compare with lastMinSnapped and call view.performHapticFeedback) and pass
the same snapped to onValueChange instead of recomputing; update lastMinSnapped
when needed. Apply the same change to the analogous block that references
lastMaxSnapped/onValueChange for lines 118-123.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c26e2b85-42d1-45f7-999b-4be9bfdfdb5c

📥 Commits

Reviewing files that changed from the base of the PR and between 2dffd30 and 8172584.

📒 Files selected for processing (1)
  • app/src/main/java/com/into/websoso/ui/detailExplore/component/RatingRangeSlider.kt

Copy link
Copy Markdown
Contributor

@devfeijoa devfeijoa left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 ! 토끼 리뷰 밑에 리뷰 달아둔것만 확인 부탁드립니다!

Copy link
Copy Markdown
Member

@m6z1 m6z1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sadturtleman Sadturtleman merged commit 5350726 into develop May 19, 2026
2 checks passed
@Sadturtleman Sadturtleman deleted the feat/877 branch May 19, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍯 [FEAT] 새로운 기능을 개발합니다. 🧙마법사 하루

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 별점 슬라이더 햅틱 추가

3 participants