feat(carousel): add swipeThreshold input and improve swipe navigation #187 - #733
intermetric wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: TEDI-Design-System/angular/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
♿ Accessibility — ✅ no blocking violationsNo accessibility violations in the components changed by this PR. 🔕 Known issues — 19 stories marked
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
good change, maybe add swipeThreshold to reacts carousel too in the future? |
Yup, makes sense. Created an issue: TEDI-Design-System/react#941. |
942d905 to
0d82f29
Compare
0d82f29 to
ad1639a
Compare
ad1639a to
10089bf
Compare
| const FLICK_WINDOW = 100; | ||
|
|
||
| /** Drags shorter than this (px) never move the carousel, so taps and jitter stay put. */ | ||
| const MIN_SWIPE_DISTANCE = 10; |
There was a problem hiding this comment.
MIN_SWIPE_DISTANCE is 10px for every input type. It's reasonable as a touch value, but a mouse drag is more precise, so the carousel can feel sticky with a pointer.
onPointerDown gets a PointerEvent, so we could read ev.pointerType and keep 10 only for touch.
Or is the single value intentional?
🎨 ChromaticNo visual changes. Built from |
Summary by CodeRabbit
New Features
Tests