-
Notifications
You must be signed in to change notification settings - Fork 185
feat(DirectionProvider): add direction to ConfigProvider #8236
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
Conversation
# Conflicts: # packages/vkui/src/testing/e2e/ComponentPlayground.tsx
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. |
e2e tests |
👀 Docs deployed
Commit 550b194 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8236 +/- ##
==========================================
- Coverage 95.54% 95.46% -0.09%
==========================================
Files 404 406 +2
Lines 11641 11610 -31
Branches
8000
3859 3847 -12
==========================================
- Hits 11122 11083 -39
- Misses 519 527 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# Conflicts: # packages/vkui/src/components/Pagination/Pagination.tsx # packages/vkui/src/testing/e2e/ComponentPlayground.tsx
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.
Отличная работа 🎉
packages/vkui/src/components/ConfigProvider/ConfigProviderContext.tsx
Outdated
Show resolved
Hide resolved
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.
🚀
…vider' into e.muhamethanov/rtl/direction-provider
# Conflicts: # packages/vkui/src/testing/e2e/ComponentPlayground.tsx # packages/vkui/src/testing/e2e/utils.tsx
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.
💅
✅ v7.2.0 🎉 |
Описание
Текущий подход использует хук
useDirection
, который определяетdirection
черезgetComputedStyle
при каждой первой отрисовке компонента. При большом количестве компонентов это влияет на производительность.Предлагаемое решение
Добавить direction как параметр в
ConfigProvider
, который можно:direction
уbody
Изменения
direction
вConfigProvider
DirectionProvider
для переопределения directionuseConfigDirection
ComponentPlayground
так чтобы поддерживался рендеринг компонентов вrtl
mockRtlDirection
Release notes
Новые компоненты
direction
Улучшения
direction
, который по умолчанию определяется исходя из атрибутаdir
вbody
страницы