-
Notifications
You must be signed in to change notification settings - Fork 20
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(plasma-theme-builder): Actualize default tokens #1127
Conversation
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-1127/ |
88b3dc6
to
83a750e
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1127/ |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-1127/ |
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.
Всё ок
83a750e
to
80feb61
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1127/ |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-1127/ |
...uilder/themeTokenGetters/controlsSurfacesTokenGetters/getSurfaceTransparentPositiveTokens.ts
Outdated
Show resolved
Hide resolved
...uilder/themeTokenGetters/controlsSurfacesTokenGetters/getSurfaceTransparentTertiaryTokens.ts
Show resolved
Hide resolved
const normalizedThemeData = useMemo(() => getNormalizeThemeSections(defaultThemeData), [defaultThemeData]); | ||
|
||
return normalizedThemeData; | ||
return useMemo(() => createTheme(defaultConfig), []); |
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.
а зачем тут useMemo ?
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.
просто хук useDefaultThemeData
лежит в main файле, и вызывается на каждый ререндер (по-хорошему это нужно будет переделать), поэтому чтобы не делать тыщу раз большой объём вычислений замемоизировал
surfaceAccentMinorGradient: getSurfaceAccentMinorGradientTokens, | ||
surfaceTransparentAccent: getSurfaceTransparentAccentTokens, | ||
surfaceTransparentAccentGradient: getSurfaceTransparentAccentGradientTokens, | ||
surfacePromo: getSurfacePromoTokens, |
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.
surfacePromo у нас в базовой теме теперь ??
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.
просто разные продукты иногда называют эти токены по-разному (например surfacePromoMAIN), и чтобы не было такого разнообразия (и неконсистетности), мы сами даём пользователям названия
comment, | ||
darkValue, | ||
lightValue, | ||
darkSubGroup = 'onDark', |
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.
а почему тут то onDark
то просто dark
??
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.
это только для background группы. Уже очень давно именно в этой группе мы сделал dark / light, т.к. это более семантически корректно. Ну то есть onDark бэграунд не может быть (это насколько я помню, мне Гена объяснял тогда)
| 'outlinePromoMinor' | ||
| 'outlinePromoMinorGradient' | ||
| 'outlineInfo' | ||
| 'outlinePositiveMinor' |
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.
интересный нейминиг
то primary / secondary
то _ / minor
=/
@@ -33,10 +32,6 @@ const GradientTokenLayers = styled.div` | |||
|
|||
const StyledTextArea = styled(TextArea)` | |||
flex: 1; | |||
|
|||
textarea { |
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.
ну да :C Я помню, как тогда говорил о том, что в textArea нельзя высоту никак менять, поэтому костылял
...rc/builder/themeTokenGetters/controlsSurfacesTokenGetters/getSurfaceTransparentCardTokens.ts
Outdated
Show resolved
Hide resolved
80feb61
to
55aaa56
Compare
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1127/ |
55aaa56
to
382f8a7
Compare
Documentation preview deployed! website:https://plasma.sberdevices.ru/pr/pr-1127/ |
Plasma Theme Builder
outline
, используемая в обводках / рамкахWhat/why changed
Необходимо было произвести актуализацию токенов, т.к. добавилось много новых + обновились старые
🐤 Download canary assets:
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via: