-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Galery): fix autoPlay when dragging slides #7877
fix(Galery): fix autoPlay when dragging slides #7877
Conversation
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
e2e tests
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7877 +/- ##
==========================================
- Coverage 95.37% 95.36% -0.01%
==========================================
Files 378 378
Lines 11160 11165 +5
Branches 3711 3712 +1
==========================================
+ Hits 10644 10648 +4
- Misses 516 517 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
👀 Docs deployed
Commit c81ef9c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Шикарно отрефакторил и useImperativeHandle
очень к месту пришелся! 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💅
❌ PatchНе удалось автоматически применить исправление на ветке 7.0-stable.
Чтобы изменение попало в ветку 7.0-stable, выполните следующие действия:
git stash # опционально
git fetch origin 7.0-stable
git checkout -b patch/pr7877 origin/7.0-stable
git cherry-pick --no-commit 3661e98a0a3df99584a8d90623e240c44cde5427
git checkout HEAD **/__image_snapshots__/*.png
git diff --quiet HEAD || git commit --no-verify --no-edit
git push --set-upstream origin patch/pr7877
gh pr create --base 7.0-stable --title "patch: pr7877" --body "- patch #7877" |
* fix(Galery): fix autoPlay when dragging slides * fix(HorizontalScroll): remove unused useEffect * fix(Gallery): rm useImperativeHandler and return controls from hook * fix(Gallery): rm import * fix(useAutoPlay): use useCallback * fix(useAutoPlay): rm import
* fix(Galery): fix autoPlay when dragging slides * fix(HorizontalScroll): remove unused useEffect * fix(Gallery): rm useImperativeHandler and return controls from hook * fix(Gallery): rm import * fix(useAutoPlay): use useCallback * fix(useAutoPlay): rm import (cherry picked from commit 3661e98)
* fix(Galery): fix autoPlay when dragging slides * fix(HorizontalScroll): remove unused useEffect * fix(Gallery): rm useImperativeHandler and return controls from hook * fix(Gallery): rm import * fix(useAutoPlay): use useCallback * fix(useAutoPlay): rm import (cherry picked from commit 3661e98)
Описание
Сейчас при включеном autoPlay в компоненте Gallery при попытке потянуть слайд, таймер не сбрасывается, из-за чего происходит переход прямо во время drag
Изменения
Сделал рефакторинг хука
useAutoPlay
, добавил возможность сделатьpause
иresume
во время работы с GalleryRelease notes
Исправления
drag
происходит остановка автопереключения слайдов