-
Notifications
You must be signed in to change notification settings - Fork 180
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(Cell/SimpleCell/MiniInfoCell/RichCell): Use spacing size tokens #7033
base: master
Are you sure you want to change the base?
feat(Cell/SimpleCell/MiniInfoCell/RichCell): Use spacing size tokens #7033
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 caf76a8 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7033 +/- ##
=======================================
Coverage 83.78% 83.78%
=======================================
Files 357 357
Lines 10676 10676
Branches 3551 3551
=======================================
Hits 8945 8945
Misses 1731 1731
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
👍
Ответы на вопросы:
- Вообще можно было бы комбинировать, но боюсь, что и читать сложнее станет, и конечному пользователю будет переопределять сложнее. Предлагаю пока оставить как есть.
- @VKCOM/vkui-design ?
0a4afbd
to
caf76a8
Compare
Описание
Заменяем константы отступов на токены системы расстояний.
Токены системы расстояний из vkui-tokens:
https://github.com/VKCOM/vkui-tokens/blob/2222b5b2208df9ea2d1f8d449e683f34696c6cd4/src/themeDescriptions/base/vk.ts#L730-L741
Вопросы
1.
Стоит ли нам заменять на токены отступы в режиме
removable
такие как44px
и48px
?VKUI/packages/vkui/src/components/Cell/Cell.module.css
Lines 28 to 29 in f20e790
VKUI/packages/vkui/src/components/Cell/Cell.module.css
Line 57 in f20e790
Так как у нас нет соответствующих токенов для таких размеров, то можно было бы использовать сложение имеющихся токенов, например
вместо
44px
писатьcalc(var(--vkui--spacing_size_3xl) + var(--vkui--spacing_size_4xl))
а вместо
48px
писатьcalc(var(--vkui--spacing_size_4xl) * 2)
Ответ: в данном случае оставим как есть, потому что тут не расстояние а размер иконки, и не хотелось бы, что это поехало при изменении токенов расстояний.
2.
У
RichCell
есть нестандартный отступ у группыbottom
-5px
. Оставим как есть или может быть в дизайне до6px
увеличим?VKUI/packages/vkui/src/components/RichCell/RichCell.module.css
Lines 100 to 102 in 991c631
Ответ: решили использовать
--vkui--spacing_size_s
(6px) для того чтобы всё привести к единой системе.