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

feat(ActionSheet, Alert): add stopPropagation ignore #8166

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

BlackySoul
Copy link
Contributor

@BlackySoul BlackySoul commented Jan 20, 2025

  • Unit-тесты
  • Документация фичи
  • Release notes

Описание

На корневую обертку ActionSheet/Alert мы навешиваем обработчик на onClick с stopPropagation. Возможно, для того, чтобы клики на всплывашках не аффектили основное приложение? Но в Alert добавили обработчик, чтобы предотвратить ложные срабатывания onClose - больше это не проблема, мы поменяли немного логику.

Для чего клики нужны - глобальные обработчики клика для сбора аналитики.

Ещё у ActionSheetDropdownMenu навешивается обработчик на body - он не особо нужен, потому что у нас overlay растягивается на весь экран. Оставим на v8?

Изменения

  • добавлены allowClickPropagation для компонентов ActionSheet/Alert + есть возможность теперь прокинуть свои обработчики onClick. Но, наверное, будет не совсем правильно убирать это в рамках минорной версии.

Release notes

  • ActionSheet: добавлено свойство allowClickPropagation для всплытия onClick и возможность передать кастомный onClick
  • Alert: добавлено свойство allowClickPropagation для всплытия onClick и возможность передать кастомный onClick

@BlackySoul BlackySoul added this to the v7.2.0 milestone Jan 20, 2025
@BlackySoul BlackySoul self-assigned this Jan 20, 2025
@BlackySoul BlackySoul requested a review from a team as a code owner January 20, 2025 08:37
@github-actions github-actions bot added the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Jan 20, 2025
Copy link

codesandbox-ci bot commented Jan 20, 2025

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.

Copy link
Contributor

github-actions bot commented Jan 20, 2025

size-limit report 📦

Path Size
JS 392.93 KB (+0.06% 🔺)
JS (gzip) 119.15 KB (+0.06% 🔺)
JS (brotli) 98.09 KB (+0.21% 🔺)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 344.21 KB (0%)
CSS (gzip) 42.66 KB (0%)
CSS (brotli) 33.99 KB (0%)

Copy link
Contributor

github-actions bot commented Jan 20, 2025

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Jan 20, 2025

👀 Docs deployed

Commit 29d34b5

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.49%. Comparing base (caa1e30) to head (29d34b5).
Report is 39 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8166      +/-   ##
==========================================
- Coverage   95.50%   95.49%   -0.02%     
==========================================
  Files         401      401              
  Lines       11435    11467      +32     
  Branches     3774     3798      +24     
==========================================
+ Hits        10921    10950      +29     
- Misses        514      517       +3     
Flag Coverage Δ
unittests 95.49% <100.00%> (-0.02%) ⬇️

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

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

@BlackySoul BlackySoul removed the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Jan 20, 2025
@BlackySoul BlackySoul changed the title fix(ActionSheet, Alert): add stopPropagation ignore feat(ActionSheet, Alert): add stopPropagation ignore Jan 20, 2025
@BlackySoul BlackySoul force-pushed the blackysoul/actionsheet_fix_click branch from 0bef3d2 to 29d34b5 Compare January 27, 2025 04:39
@BlackySoul BlackySoul merged commit 363b5cd into master Jan 27, 2025
28 of 29 checks passed
@BlackySoul BlackySoul deleted the blackysoul/actionsheet_fix_click branch January 27, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants