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

WIP: Palette 再考 #912

Closed
wants to merge 7 commits into from
Closed

WIP: Palette 再考 #912

wants to merge 7 commits into from

Conversation

takurinton
Copy link
Contributor

ref #872

コメント書きながら壁打ちしていきます。

@netlify
Copy link

netlify bot commented Jul 26, 2022

Deploy Preview for ingred-ui ready!

Name Link
🔨 Latest commit 1031d17
🔍 Latest deploy log https://app.netlify.com/sites/ingred-ui/deploys/6305ae3de0f1af0009052441
😎 Deploy Preview https://deploy-preview-912--ingred-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 34 to 45
export type PaletteAction = {
active: string;
hover: string;
selected: string;
selectedOpacity: number;
disabled: string;
disabledBackground: string;
focus: string;
focusOpacity: number;
activeBackground: string;
hoverBackground: string;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

palette に関しては一旦、こんな形で定義をしてみる。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

これらの値は全部1パターンではないので、opacity をうまく使いながら既存実装を再現していきたい

@takurinton
Copy link
Contributor Author

しばらく時間が空いてしまった、続き

disabled: theme.palette.gray.light,
disabled: theme.palette.background.disabled,
Copy link
Contributor Author

@takurinton takurinton Aug 7, 2022

Choose a reason for hiding this comment

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

background に disabled ってプロパティを足してみた
disabled な background に gray を使っていそうなところはこんな感じで対応すれば良さそう。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc: @youchann

Copy link
Contributor Author

Choose a reason for hiding this comment

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

これはたまたま見つけたそれっぽいところにこれを指定しただけで、大した意味はないです。
他にもたくさんこういうところあるはず。

Copy link
Contributor Author

@takurinton takurinton Aug 7, 2022

Choose a reason for hiding this comment

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

text.disabled と色が近いから contrast 文脈で a11y 的にはよくないが(やってないからわからないけどおそらく lighthouse には怒られる)既存の色を合わせただけなのでそこまで気にする必要なし。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

focus, hover もここにないと不自然か?

@takurinton
Copy link
Contributor Author

takurinton commented Aug 8, 2022

MEMO
このブランチは最終的には奪ってもらうか close するけど、これ考える過程で気になったところはメモしたりコメント残したりしてるから汚くなるかも。
本格的な実装の際の手がかりにしてもらえるとmm

@takurinton
Copy link
Contributor Author

脱線するけど、state の変数名も統一したいなー
focus だけでも isFocus と focused と isFocused の3種類があったりしてる

@takurinton
Copy link
Contributor Author

gray が使われてる箇所

  • background
    • hover
    • focus
    • disable
    • active
    • これらを定義すれば解決??
  • border
    • border property で解決
  • shadow
    • ksk さんが定義してくれて解決

Comment on lines +131 to +134
active: colors.blue[50] as string,
hover: "",
selected: "",
disabled: colors.basic[200],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wip だけどこんな感じ
opacity とかは primary.main からいい感じに色を導くためのもので、今のうちの形だと不要なので消した。
とはいえ、これだけだと不十分でもう少し根本的な見直しが必要になりそう。ちょっと厳しさが見えてきた。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hover, selected は後で定義

@takurinton
Copy link
Contributor Author

一旦 close

@takurinton takurinton closed this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant