feat(useSnackbarManager): imperative snackbar API#9514
Open
EldarMuhamethanov wants to merge 8 commits intomasterfrom
Open
feat(useSnackbarManager): imperative snackbar API#9514EldarMuhamethanov wants to merge 8 commits intomasterfrom
EldarMuhamethanov wants to merge 8 commits intomasterfrom
Conversation
Contributor
size-limit report 📦
|
Contributor
e2e tests |
Contributor
Contributor
👀 Docs deployed
📦 Package ✅yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9514/7bfa829ccb1a3427c01c268cacfe4d3aa8bc80e2/pkg/@vkontakte/vkui/_pkg.tgzCommit 7bfa829 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #9514 +/- ##
==========================================
- Coverage 95.31% 95.16% -0.16%
==========================================
Files 441 445 +4
Lines 12112 12245 +133
Branches 4405 4427 +22
==========================================
+ Hits 11545 11653 +108
- Misses 567 592 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d4cad26 to
bd7d71b
Compare
bd7d71b to
58de6eb
Compare
# Conflicts: # packages/vkui/src/hooks/useSnackbarManager/helpers/useSnackbarActionsWithStore.ts # packages/vkui/src/hooks/useSnackbarManager/helpers/useSnackbarConfig.ts
SevereCloud
reviewed
Mar 11, 2026
# Conflicts: # packages/vkui/src/index.ts
added 2 commits
April 13, 2026 14:18
# Conflicts: # website/components/mdx/Playground/scope.ts
# Conflicts: # website/components/mdx/Playground/scope.ts # website/content/components/use-snackbar-manager.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Добавлен императивный API для управления снекбарами: можно вызывать показ/закрытие уведомлений через глобальный объект
snackbarManagerили свой экземпляр изcreateSnackbarManager(), без использования хукаuseSnackbarManagerв месте вызова.Основное:
snackbarManager.open({ children: '...' })из любого места (компонент, сервис, колбэк). Контейнер для снекбаров монтируется автоматически при первом вызовеopen()илиopenCustom().Поведение хука
useSnackbarManagerсохранено без изменений. Логика действий (open, close, update и т.д.) вынесена в общую функциюcreateSnackbarActions, которую используют и хук, и императивный менеджер.Release notes
Улучшения
snackbarManagerиcreateSnackbarManager()позволяют показывать уведомления из любого места без хука. Контейнер монтируется автоматически при первом вызовеopen().