-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FRNT-532, FRNT-532] Implement box model, rewrite ButtonIcon and Chip #109
Conversation
e5af3fe
to
66f5b5e
Compare
66f5b5e
to
857c804
Compare
--local-padding: calc(1px * var(--woly-component-level) * var(--woly-main-level)); | ||
--local-icon-size: calc(var(--woly-line-height)); | ||
--local-button-size: calc(var(--local-icon-size) + (var(--local-vertical) * 2)); | ||
--local-icon-color: var(--woly-shape-default); |
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.
цвета не меняла, ток у Chip чуть поправила чтоб его видно было и удобно было смотреть, но пока не как в макетах, задачи такой не стояло
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.
а есть смысл заводить задачу только на то, чтобы 1 переменную для цвета поменять?
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.
ты просто в этой таске уже начала рефакторить цвета иконки, тут тогда не надо было совсем этого делать
|
||
interface ChipProps { | ||
action?: React.ReactNode; | ||
children?: string; |
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.
в этой ветке смотрим box-model, состояния как в макетах я не делала
|
||
interface ChipProps { | ||
action?: React.ReactNode; | ||
children?: string; | ||
className?: string; |
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.
ага, надо поправить, но в отдельной задаче по правке состояний чипа
|
||
interface ChipProps { | ||
action?: React.ReactNode; | ||
children?: string; | ||
className?: string; | ||
disabled?: boolean; |
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делать, в формулах gap = 0 и изза этого outline который выходит за ButtonIcon перекрывает текст
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.
тут нет outline у icon, это подсвечивается сам chip, icon-button никак не меняется
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.
тут дело не в icon-button, а в формуле компенсации для текста, у тебя текст может быть любой длины, при этом, иконка не должна залезать на него. Плюс у тебя сама иконка меньше по размерам, чем высота chip, а так не должно быть, по высоте они должны быть одинаковыми
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.
Тут надо обсудить уже подробнее и мб с дизайнерами, потому что пока что реализовано, что если фокус на иконку то вся плашка чипа тоже в фокусе, и вроде с Димой Марисоным обсуждали это и он говорил что это ок.
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.
можем втроем поглядеть, чтобы никому обидно не было ))
children?: string; | ||
className?: string; | ||
disabled?: boolean; | ||
icon?: React.ReactNode; |
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.
для XS размер 30, это у размера N - 24px.
бордеры учта и правила, погляди точно свежая версия ветки
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.
children?: string; | ||
className?: string; | ||
disabled?: boolean; | ||
icon?: React.ReactNode; | ||
onActionClick?: (event: React.MouseEvent<HTMLButtonElement>) => void; |
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.
в чем вопрос?
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.
это скрин к комменту выше
children?: string; | ||
className?: string; | ||
disabled?: boolean; | ||
icon?: React.ReactNode; | ||
onActionClick?: (event: React.MouseEvent<HTMLButtonElement>) => void; | ||
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void; |
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.
В нашей модели N = 24, XS = 30, S = 36, и тп
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.
ок ) выше написала коммент )
children, | ||
className, | ||
disabled, | ||
icon, | ||
onActionClick, | ||
leftIcon, |
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.
Зачем снова переименовывать иконки?
Оно так называлось, потому что иконки имели разную принадлежность. Это не просто иконка слева и справа. Это иконка чипа и иконка действия. Если вдруг добавим rtl получится криво, что leftIcon внезапно начнет отображаться справа.
Мне кажется, лучше переименовать обратно, или в chipIcon, actionIcon
@@ -6,6 +6,11 @@ export const Global = styled.div` | |||
font-family: 'Helvetica Neue', sans-serif; | |||
} | |||
|
|||
button { |
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.
Тот же комментарий что и в https://github.com/woly-ui/woly/pull/110/files#r628142059
@@ -0,0 +1,3 @@ | |||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
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.
Почему close? Если это крестик, то ни для чего другого его нельзя использовать? Например, для удаления.
@@ -22,24 +23,38 @@ const ButtonIconBase: React.FC<Props & Variant> = ({ | |||
); | |||
|
|||
export const ButtonIcon = styled(ButtonIconBase)` | |||
${box} | |||
--local-vertical: calc( |
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.
Может унести local-vertical внутрь box?
--local-icon-size: var(--woly-line-height); | ||
--local-icon-color: var(--woly-canvas-text-default); | ||
--local-padding: calc(1px * var(--woly-component-level) * var(--woly-main-level)); | ||
--local-icon-size: calc(var(--woly-line-height)); |
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.
а зачем тут calc?
</div> | ||
{rightIcon && <div data-icon>{rightIcon}</div>} |
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.
Иконка справа это действие с чипом, обычно закрытие.
И по умолчанию иконка действия должна быть передана — крестик.
Implement box model, rewrite ButtonIcon and Chip
[FRNT-435, FRNT-532]