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

fix: change the text color of disabled controls #2304

Merged
merged 10 commits into from
Apr 13, 2021
Merged

Conversation

draugi
Copy link
Contributor

@draugi draugi commented Mar 4, 2021

Новая переменная тему - textColorDisabledContrast. Отвечает за цвет текста на отключённых контролах, у которых есть тёмный фон.

Полный список этих контролов:

  1. Button
  2. Select
  3. Switcher
  4. Input
  5. FxInput
  6. CurrencyInput
  7. DateInput
  8. DatePicker
  9. Token
  10. TokenInput
  11. ComboBox
  12. Textarea

fix #2207

BREAKING CHANGE: Text color of disabled Button, Token, TokenInput changed from #a0a0a0 to #808080
@draugi draugi force-pushed the disabled-change-text-color branch from cec0f1c to c096eeb Compare March 15, 2021 18:00
packages/react-ui/internal/themes/DefaultTheme.ts Outdated Show resolved Hide resolved
packages/react-ui/internal/themes/DefaultTheme.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Input/Input.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Input/Input.tsx Outdated Show resolved Hide resolved
@dzekh
Copy link

dzekh commented Mar 30, 2021

BREAKING CHANGE

а чо, реально это настолько BREAKING CHANGE?
АПИ же не меняется, только цвет. ничего не должно сломаться

@draugi
Copy link
Contributor Author

draugi commented Mar 30, 2021

BREAKING CHANGE

а чо, реально это настолько BREAKING CHANGE?
АПИ же не меняется, только цвет. ничего не должно сломаться

Мне казалось, что Breaking change это более широкое понятие, не только про апи. Например, у кого-то могут полечь скриншотные тесты в проекте

@vercel
Copy link

vercel bot commented Mar 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

storybook-default – ./packages/react-ui

🔍 Inspect: https://vercel.com/reactui/storybook-default/8j1ySpKQphusXmNT6SLqgbz7Q4CX
✅ Preview: https://storybook-default-git-disabled-change-text-color-reactui.vercel.app

storybook-flat – ./packages/react-ui

🔍 Inspect: https://vercel.com/reactui/storybook-flat/8qJrD2JoFmnQtJu56MbFwuKDkQHU
✅ Preview: https://storybook-flat-git-disabled-change-text-color-reactui.vercel.app

storybook-8px – ./packages/react-ui

🔍 Inspect: https://vercel.com/reactui/storybook-8px/F7tAu9VCqespZpUCeBVmc9sYZEB4
✅ Preview: https://storybook-8px-git-disabled-change-text-color-reactui.vercel.app

@vercel vercel bot temporarily deployed to Preview – storybook-default March 30, 2021 18:13 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook-flat March 30, 2021 18:13 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook-8px March 30, 2021 18:13 Inactive
@draugi draugi requested a review from lossir March 30, 2021 18:32
@vercel
Copy link

vercel bot commented Apr 1, 2021

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/reactui/settings/billing.

@draugi draugi force-pushed the disabled-change-text-color branch from ced9233 to 5c5af3f Compare April 1, 2021 18:40
@draugi draugi requested a review from lossir April 1, 2021 19:00
Copy link
Member

@lossir lossir left a comment

Choose a reason for hiding this comment

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

Для нескольких тестов обновились скриншоты, хотя на вид они не изменились:

  • Input/Inputs with different sizes/With long typed text large/ie11/With long typed text.png
  • Input/Inputs with different sizes/With long typed text large/ie11Flat/With long typed text.png

Попробовал прогнать тест со старым скриншотом, и вроде норм. Надо проверить.

@draugi draugi requested a review from lossir April 1, 2021 22:27
lossir
lossir previously approved these changes Apr 2, 2021
@draugi draugi marked this pull request as ready for review April 2, 2021 07:41
@draugi draugi requested review from StathamJason, dzekh and zhzz April 2, 2021 07:41
Copy link
Member

@zhzz zhzz left a comment

Choose a reason for hiding this comment

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

Вроде все круто. Единственное, я бы предложил немного переименовать переменные:

  1. inputPlaceholderDisabledColor -> inputPlaceholderColorDisabled
    и подобные, в соответсвии с нашим неписанным соглашением

  2. textColorDisabledOnDark -> textColorDisabledContrast
    субъективно кажется более подходящее название

@zhzz
Copy link
Member

zhzz commented Apr 5, 2021

Во время влития нужно будет засквошить и убрать пометку BREAKING CHANGE.

…hange-text-color

# Conflicts:
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chrome/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chrome/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chrome/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chrome/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chrome/page - 5.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chromeFlat/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chromeFlat/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chromeFlat/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chromeFlat/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/chromeFlat/page - 5.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefox/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefox/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefox/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefox/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefox/page - 5.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefoxFlat/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefoxFlat/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefoxFlat/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefoxFlat/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/firefoxFlat/page - 5.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11/page - 5.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11Flat/page - 1.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11Flat/page - 2.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11Flat/page - 3.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11Flat/page - 4.png
#	packages/react-ui/.creevey/images/Button/disabled combinations/simple/ie11Flat/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chrome/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chrome/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chrome/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chrome/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chrome/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chromeFlat/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chromeFlat/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chromeFlat/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chromeFlat/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/chromeFlat/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefox/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefox/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefox/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefox/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefox/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefoxFlat/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefoxFlat/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefoxFlat/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefoxFlat/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/firefoxFlat/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11/page - 5.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11Flat/page - 1.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11Flat/page - 2.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11Flat/page - 3.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11Flat/page - 4.png
#	packages/react-ui/.creevey/images/Button/loading combinations/simple/ie11Flat/page - 5.png
#	packages/react-ui/.creevey/images/Button/text styles reset/chrome.png
#	packages/react-ui/.creevey/images/Button/text styles reset/chromeFlat.png
#	packages/react-ui/.creevey/images/Button/text styles reset/firefox.png
#	packages/react-ui/.creevey/images/Button/text styles reset/firefoxFlat.png
#	packages/react-ui/.creevey/images/Button/text styles reset/ie11.png
#	packages/react-ui/.creevey/images/Button/text styles reset/ie11Flat.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/focused first element/chrome/focused first element.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/focused first element/firefox/focused first element.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/focused first element/ie11/focused first element.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/plain/chrome/plain.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/plain/firefox/plain.png
#	packages/react-ui/.creevey/images/ComboBoxView/input like text/plain/ie11/plain.png
#	packages/react-ui/.creevey/images/FxInput/with disabled/chrome.png
#	packages/react-ui/.creevey/images/FxInput/with disabled/firefox.png
#	packages/react-ui/.creevey/images/FxInput/with disabled/ie11.png
#	packages/react-ui/.creevey/images/Switcher/disabled/chrome.png
#	packages/react-ui/.creevey/images/Switcher/disabled/firefox.png
#	packages/react-ui/.creevey/images/Switcher/disabled/firefoxFlat.png
#	packages/react-ui/.creevey/images/Switcher/disabled/ie11.png
#	packages/react-ui/.creevey/images/Switcher/disabled/ie11Flat.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Focus/chrome/Focus.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Focus/firefox/Focus.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Focus/ie11/Focus.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Typed/chrome/Typed.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Typed/firefox/Typed.png
#	packages/react-ui/.creevey/images/Textarea/Different states/Typed/ie11/Typed.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/Focus/chrome/Focus.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/Focus/ie11/Focus.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusAutoresize/chrome/FocusAutoresize.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusAutoresize/ie11/FocusAutoresize.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpClosed/chrome/CounterWithHelp.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpClosed/ie11/CounterWithHelp.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpOpened/chrome/CounterWithHelpOpened.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpOpened/chromeFlat/CounterWithHelpOpened.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpOpened/ie11/CounterWithHelpOpened.png
#	packages/react-ui/.creevey/images/Textarea/Textarea with length counter/FocusWithHelpOpened/ie11Flat/CounterWithHelpOpened.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/dark theme top/chrome/dark theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/dark theme top/firefox/dark theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/dark theme top/ie11/dark theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/default theme top/chrome/default theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/default theme top/firefox/default theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/default theme top/ie11/default theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/flat theme top/chrome/flat theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/flat theme top/firefox/flat theme top.png
#	packages/react-ui/.creevey/images/ThemePlayground/playground/flat theme top/ie11/flat theme top.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call hide after show/chrome/call hide after show.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call hide after show/firefox/call hide after show.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call hide after show/ie11/call hide after show.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call show/chrome/call show.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call show/firefox/call show.png
#	packages/react-ui/.creevey/images/Tooltip/manual control/call show/ie11/call show.png
#	packages/react-ui/internal/themes/DefaultTheme.ts
@lossir lossir force-pushed the disabled-change-text-color branch from 1920b89 to 3559acf Compare April 12, 2021 08:02
textColorDisabledOnDark -> textColorDisabledContrast
inputPlaceholderDisabledColor -> inputPlaceholderColorDisabled
selectPlaceholderDisabledColor -> selectPlaceholderColorDisabled
textareaPlaceholderDisabledColor -> textareaPlaceholderColorDisabled
tokenInputPlaceholderDisabledColor -> tokenInputPlaceholderColorDisabled
@lossir lossir requested a review from zhzz April 12, 2021 11:03
@lossir lossir changed the title feat(Button, Token, TokenInput): text color of disabled elements changed fix: change the text color of disabled controls Apr 13, 2021
@lossir lossir merged commit 09e27e9 into next Apr 13, 2021
@lossir lossir deleted the disabled-change-text-color branch April 13, 2021 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Button] [Input] [Token] Цвет текста на заблокированных контролах
4 participants