feat(ActionSheet): add slotProps for iosCloseItem and deprecate mode="cancel" and isCancelItem#9307
Merged
EldarMuhamethanov merged 4 commits intomasterfrom Dec 18, 2025
Conversation
…="cancel"` and `isCancelItem`
Contributor
size-limit report 📦
|
Contributor
e2e tests
|
Contributor
Contributor
👀 Docs deployed
📦 Package ✅yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9307/47d6bf7e0ee857362423d7e30466cbc19277be92/pkg/@vkontakte/vkui/_pkg.tgzCommit 47d6bf7 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9307 +/- ##
=======================================
Coverage 95.01% 95.01%
=======================================
Files 416 417 +1
Lines 11225 11236 +11
Branches 4224 4229 +5
=======================================
+ Hits 10665 10676 +11
Misses 560 560
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:
|
inomdzhon
reviewed
Dec 16, 2025
packages/vkui/src/components/ActionSheet/ActionSheetDefaultIosCloseItem.tsx
Outdated
Show resolved
Hide resolved
inomdzhon
previously approved these changes
Dec 17, 2025
inomdzhon
approved these changes
Dec 18, 2025
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.
Описание
Рефакторинг компонентов
ActionSheetиActionSheetItemдля упрощения работы с кнопкой "Отмена" на iOS.Вместо использования устаревших пропсов
mode="cancel"иisCancelItemвActionSheetItem, теперь рекомендуется использовать компонентActionSheetDefaultIosCloseItemили передавать пропсы черезslotProps.iosCloseItemвActionSheet.Изменения сохраняют обратную совместимость: старый API продолжает работать, но показывает предупреждения об устаревании.
Изменения
ActionSheetItem
mode="cancel"иisCancelItem(Since 8.0.0, будет удалено в VKUI v10)data-action-sheet-cancel-itemmodeCancelприменяется как дляmode="cancel", так и для элементов сdata-action-sheet-cancel-itemweight="2"для cancel items на iOSActionSheetDefaultIosCloseItem
.modeCancel)mode="cancel"иisCancelItem, вместо этого использует data-атрибутdata-action-sheet-cancel-itemActionSheetDefaultIosCloseItemPropsдля типизацииActionSheet
slotProps.iosCloseItemдля передачи пропсов вActionSheetDefaultIosCloseItemДокументация
action-sheet.mdx:mode="cancel"иisCancelItemActionSheetDefaultIosCloseItemс описанием и примерамиslotProps.iosCloseItemТесты
ActionSheetDefaultIosCloseItemиslotProps.iosCloseItemRelease notes
Улучшения
ActionSheet: добавлена поддержка
slotProps.iosCloseItemдля упрощения локализации кнопки "Отмена"Теперь можно передавать пропсы напрямую в
ActionSheetDefaultIosCloseItemбез необходимости создавать обёртку:ActionSheetItem: Свойства
mode="cancel"иisCancelItemотмечены как устаревшие. Вместо этого используйте компонентActionSheetDefaultIosCloseItem.