-
Notifications
You must be signed in to change notification settings - Fork 184
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(ModalRoot): fix modal overlay #5805
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. Latest deployment of this branch, based on commit d4bcebb:
|
e2e tests |
👀 Docs deployed
Commit d4bcebb |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #5805 +/- ##
==========================================
+ Coverage 81.99% 82.02% +0.03%
==========================================
Files 298 298
Lines 9839 9846 +7
Branches 3115 3117 +2
==========================================
+ Hits 8067 8076 +9
+ Misses 1772 1770 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Шикардос!
Есть необязательный коммент по тесту
3542e36
3542e36
to
d4bcebb
Compare
* fix(ModalRoot): fix overlay missing * feat(ModalRoot): add unit test for mask * fix(ModalRoot): add type and style safe func
* fix(ModalRoot): fix overlay missing * feat(ModalRoot): add unit test for mask * fix(ModalRoot): add type and style safe func
[ ] e2e-тесты[ ] Дизайн-ревьюОписание
Для случая, когда модальные окна сменяются (
modal1 - null - modal2
) достаточно быстро (в пределах длительности анимации закрытия), теряли подложку у модального окна (она оставалась вopacity: 0
, а при появлении нового окна (из состоянияnull
) мы всегда полагались на то, что компонент с подложкой будет замаунчен заново).Изменения
Теперь в
entering
-фазе всегда проставляем подложкеopacity: 1
.Для десктопной версии завернула изменение стилей в
requestAnimationFrame
, чтобы сохранить очередность событий