Skip to content
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

Tokens for UTSlider #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions components/slider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put this in platformcomponents/desktop as mobile has this component (https://www.figma.com/file/z6oi9Ku3X7rM1Wj2451B9u/Components---Android?node-id=11917%3A56753) but the colors are not the same

"slider": {
"comment": "applies to sliders",
"figma": "https://www.figma.com/file/NaNrfXjygZtRgMfHAFHjsp/Components---Windows?node-id=46518%3A104257",
"track-empty": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not grouping like:

"track":{
      "empty": ...,
      "full": ...
}

"#normal": {
"background": "@theme-control-inactive-normal"
},
"#disabled": {
"background": "@theme-control-inactive-disabled"
}
},
"track-full": {
"#normal": {
"background": "@theme-control-active-normal"
},
"#disabled": {
"background": "@theme-control-active-disabled"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find this one in the component's Figma. It is a darker blue, in theory. But cannot see it. When I see a full track disabled, I find @theme-control-inactive-disabled assigned to the full track (both the full and the empty track overlap, making the full track look lighter than the empty one
image

}
},
"handle": {
"#normal": {
"background": "@theme-background-solid-primary-normal",
"border": "@theme-outline-primary-normal"
},
"#hovered": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not have a hover state in the component's figma, right? do we need to create one in the repo? if yes, we should we ask the momentum team to add this state to their Figma

"background": "@theme-background-solid-secondary-normal",
"border": "@theme-outline-primary-normal"
},
"#pressed": {
"background": "@theme-background-solid-secondary-normal",
"border": "@theme-outline-primary-normal"
},
"#focused": {
"background": "@theme-background-solid-primary-normal",
"border": "@theme-control-active-normal"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this in the component figma? cannot find it

},
"#disabled": {
"background": "@theme-background-solid-tertiary-normal",
"border": "@theme-background-solid-tertiary-normal"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can put "border": "none". "none" is a keyword that makes the "background" colour of that object be assigned to its "border". The output is the same as you have here, but it is just more readable that this handle has no border on disabled.

}
}
}
}
4 changes: 2 additions & 2 deletions theme-data/win-system-hc/win-system-hc-common.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@
"disabled": "@color-hc-SystemColorGrayTextColor"
},
"inactive": {
"normal": "@color-hc-PlaceholderColor",
"normal": "@color-hc-SystemColorButtonTextColor",
"hover": "@color-hc-PlaceholderColor",
"pressed": "@color-hc-PlaceholderColor",
"disabled": "@color-hc-PlaceholderColor"
"disabled": "@color-hc-SystemColorGrayTextColor"
}
},
"indicator": {
Expand Down