-
Notifications
You must be signed in to change notification settings - Fork 185
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(Switch): use m3 redesign #6957
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. |
e2e tests |
👀 Docs deployed
Commit 6f9e3c5 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6957 +/- ##
==========================================
+ Coverage 83.40% 83.42% +0.02%
==========================================
Files 352 352
Lines 10532 10546 +14
Branches 3496 3504 +8
==========================================
+ Hits 8784 8798 +14
Misses 1748 1748
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
caa78b6
to
cc3e126
Compare
4d1376f
to
62729e9
Compare
Поправил состояние `disabled` у iOS версии.
62729e9
to
33bb011
Compare
33bb011
to
ff11987
Compare
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.
Это не свитч, это бомба.
Идеи для бэклога:
- реакция на свайпы в вебвью (требует JS)
- продвинутая анимация (пока в самом нативе только упрощённая, целимся на однобразность)
- обработка зажатий на андроиде (сейчас удержание даже на полсекунды не переключает свитч)
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.
Шикарно 🔥
Вынес из `Link.module.css` условие `@media (hover: hover) and (pointer: fine)` в `shared.config.js`.
И в правду, Поправил ⚡ fd107fd |
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.
Шикарно! 🔥
Только одно место теперь смущает с useFocusVisible(false)
🙂
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.
💅
В #6957 пропустил, что обводка должна скрываться, поэтому вынес обводку в псевдоэлемент с `border`, который создаётся только при `Switch--default`, тем самым теперь оперируем переменной `--vkui_internal--Switch__track_shadow_visibility`.
Описание
Взял длительность анимации и функцию easing'а из этой реализации https://material-web.dev/components/switch/#interactive-demo.
Note
Отвязался от токенов
--vkui--size_switch_*
(обговорили с @VKCOM/design).Дополнительные изменения
Поправил состояние
disabled
в iOS версии – по дизайнуopacity
должен быть70%
.