-
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
[BREAKING CHANGE] feat(Popover): mv to stable #6129
[BREAKING CHANGE] feat(Popover): mv to stable #6129
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 2f071e9:
|
e2e tests |
👀 Docs deployed
Commit 2f071e9 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6129 +/- ##
==========================================
+ Coverage 80.16% 80.78% +0.62%
==========================================
Files 312 315 +3
Lines 9814 9807 -7
Branches 3297 3305 +8
==========================================
+ Hits 7867 7923 +56
+ Misses 1947 1884 -63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
769d13d
to
1563164
Compare
1563164
to
c6505ce
Compare
c6505ce
to
dbd1dae
Compare
dbd1dae
to
66ab260
Compare
66ab260
to
5b7fb62
Compare
5b7fb62
to
e026d9e
Compare
А в гайде по миграции не нужно расписать, что компонент больше не нестабильный?) |
🎉 Теперь экспортируется как стабильный компонент. ```diff <Popover - action="hover" + trigger="hover" - offsetDistance={0} + offsetByMainAxis={0} - offsetSkidding={0} + offsetByCrossAxis={0} - shownDelay={0} - hideDelay={10} + hoverDelay={[0, 10]} > <div>Target</div> </Popover> ``` - `trigger` – помимо `"click"` и `"hover"`, теперь принимает `"focus"` или комбинацию этих событий. Также можно передать `"manual"`, что сделает компонент полностью контролируемым, в `onShownChange` будет вызываться при нажатии за пределы целевого и всплывающего элементов, по кнопке ESC или при вызове `onClose` из свойства `content`. - `content` теперь принимает [render prop](https://react.dev/reference/react/cloneElement#passing-data-with-a-render-prop). В аргументе функции можно получить метод `onClose`, с помощью которого можно программно закрывать всплывающий элемента. - `onShownChange` – вторым аргументом теперь приходит `reason`, который даёт понять по какой причине показался/скрылся всплывающий элемент. - `hoverDelay` – принимает либо общее число задержки для `trigger="hover"`, либо массив чисел типа `[<показ>, <скрытие>]`. - `autoFocus` – включать ли авто-фокусирование на всплывающий элемент (работает при навигации с клавиатуры). - `noStyling` – убирает стилизацию по умолчанию. - `usePortal` – рендерить ли всплывающий элемент в портале. Вместо `boolean`, можно передать контейнер, куда должен отрендериться всплывающий элемент.
e026d9e
to
fbab034
Compare
🙈 Будет в ветке https://github.com/VKCOM/VKUI/tree/blackysoul/update_migration_guide ) |
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.
🔥
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.
🔥
Описание
action
->trigger
showDelay
/hideDelay
->hoverDelay
content
– теперь может быть функциейoffsetDistance
->offsetByMainAxis
offsetSkidding
->offsetByCrossAxis
autoFocus
noStyling
usePortal
lib/animation
.Видео Popover
2023-12-01.11.02.59.mov
Изменения
injectAriaExpandedPropByRole
, который добавляет в пропыaria-expanded
с тоглом значения