Skip to content
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

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

BlackySoul
Copy link
Contributor

@BlackySoul BlackySoul commented Sep 14, 2023



  • Unit-тесты
  • [ ] e2e-тесты
  • [ ] Дизайн-ревью

Описание

Для случая, когда модальные окна сменяются (modal1 - null - modal2) достаточно быстро (в пределах длительности анимации закрытия), теряли подложку у модального окна (она оставалась в opacity: 0, а при появлении нового окна (из состояния null) мы всегда полагались на то, что компонент с подложкой будет замаунчен заново).

Изменения

Теперь в entering-фазе всегда проставляем подложке opacity: 1.
Для десктопной версии завернула изменение стилей в requestAnimationFrame, чтобы сохранить очередность событий

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2023

size-limit report 📦

Path Size
JS 346.28 KB (+0.06% 🔺)
JS (gzip) 103.26 KB (+0.04% 🔺)
JS (brotli) 84.37 KB (+0.06% 🔺)
JS import Div (tree shaking) 3.04 KB (0%)
CSS 278.32 KB (0%)
CSS (gzip) 36.27 KB (0%)
CSS (brotli) 28.73 KB (0%)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 14, 2023

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:

Sandbox Source
VKUI TypeScript Configuration
tender-khayyam-dhcf6v Issue #5740

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2023

e2e tests

Playwright Report

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2023

👀 Docs deployed

Commit d4bcebb

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03% 🎉

Comparison is base (c965048) 81.99% compared to head (d4bcebb) 82.02%.
Report is 1 commits behind head on master.

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     
Flag Coverage Δ
unittests 82.02% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ckages/vkui/src/components/ModalRoot/ModalRoot.tsx 52.60% <100.00%> (+0.63%) ⬆️
...vkui/src/components/ModalRoot/ModalRootDesktop.tsx 93.39% <100.00%> (+1.23%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BlackySoul BlackySoul changed the title Fix/5740/modal card fix overlay missing fix(ModalRoot): fix modal overlay Sep 14, 2023
@BlackySoul BlackySoul added v5 Автоматизация: PR продублируется в ветку v5 ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча labels Sep 14, 2023
eugpoloz
eugpoloz previously approved these changes Sep 14, 2023
SevereCloud
SevereCloud previously approved these changes Sep 14, 2023
inomdzhon
inomdzhon previously approved these changes Sep 14, 2023
Copy link
Contributor

@inomdzhon inomdzhon left a comment

Choose a reason for hiding this comment

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

Шикардос!

Есть необязательный коммент по тесту

@BlackySoul BlackySoul dismissed stale reviews from inomdzhon, SevereCloud, and eugpoloz via 3542e36 September 15, 2023 04:18
@BlackySoul BlackySoul force-pushed the fix/5740/ModalCard_fix_overlay_missing branch from 3542e36 to d4bcebb Compare September 15, 2023 04:58
@BlackySoul BlackySoul merged commit ae1c7d5 into master Sep 15, 2023
@BlackySoul BlackySoul deleted the fix/5740/ModalCard_fix_overlay_missing branch September 15, 2023 10:46
vkcom-publisher pushed a commit that referenced this pull request Sep 15, 2023
* fix(ModalRoot): fix overlay missing

* feat(ModalRoot): add unit test for mask

* fix(ModalRoot): add type and style safe func
vkcom-publisher pushed a commit that referenced this pull request Sep 15, 2023
* fix(ModalRoot): fix overlay missing

* feat(ModalRoot): add unit test for mask

* fix(ModalRoot): add type and style safe func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча v5 Автоматизация: PR продублируется в ветку v5
Projects
None yet
5 participants