-
Notifications
You must be signed in to change notification settings - Fork 127
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
chore: remove old themes and theme specific styles #3459
base: 5.x
Are you sure you want to change the base?
Conversation
fileUploaderDisabledIconColor: '#ADADAD', | ||
}; | ||
|
||
export const THEME_2022 = applyMarkers( |
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.
Решил пока так слить апдейт цветов, чтобы избежать лишних изменений в скриншотах. Например, когда новые disabled цвета появились в темной теме.
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.
Не понял что за лишние изменения?
@@ -37,8 +36,6 @@ const customViewports = { | |||
const themes = { | |||
DEFAULT_THEME, |
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.
Не уверен, стоит ли удалять дефолтные темы отсюда и из функции decorators ниже.
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.
Надо удалить. Если мы и оставим DEFAULT_THEME
, то это будет простой редирект на THEME_2022
.
И чисто для пользователей где-то в packages/react-ui/lib/theming/themes
1. Кривой Тултип в докеЕсли в доке зайти на страницу Иногда после перехода на другую страницу надо немного поскроллить слева. 2. Удалить старые иконкиИз папки Все остальные иконки в папке надо удалить. Если они где-то ещё используются, то надо заменить на эквиваленты из соседней папки Саму папку можно переименовать в 3. Таблица удалённых переменныхНужна таблица со всеми удаленными переменными, и их новыми эквивалентами. 4. Кодмод для переменных темДля переменных, вместо которых появились однозначные эквиваленты, надо написать кодмод. Пример можешь подсмотреть тут Как им пользоваться можно посмотреть тут 5. Удалить
|
fileUploaderDisabledIconColor: '#ADADAD', | ||
}; | ||
|
||
export const THEME_2022 = applyMarkers( |
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.
Не понял что за лишние изменения?
DEFAULT_THEME, | ||
DARK_THEME, |
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.
Эти темы надо убрать.
К теме THEME_2022
можно сделать приписку в скобочках, типа "по-умолчанию", или покороче "default".
<Tabs.Tab id={ThemeType.Default}>Дефолтная</Tabs.Tab> | ||
<Tabs.Tab id={ThemeType.Dark}>Темная</Tabs.Tab> |
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.
Тут тоже надо удалить
browsers: { | ||
chrome8px: { | ||
browserName: 'chrome', |
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.
Ниже надо удалить конфиги для ie.
Также ещё остались скриншоты, т.к. мы лишь закоментили конфиги. Их тоже надо удалить.
@@ -37,8 +36,6 @@ const customViewports = { | |||
const themes = { | |||
DEFAULT_THEME, |
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.
Надо удалить. Если мы и оставим DEFAULT_THEME
, то это будет простой редирект на THEME_2022
.
И чисто для пользователей где-то в packages/react-ui/lib/theming/themes
// return ( | ||
// <label data-tid={InputDataTids.root} {...labelProps}> | ||
// <span className={styles.sideContainer()}> | ||
// {this.renderLeftIcon()} | ||
// {this.renderPrefix()} | ||
// </span> | ||
// <span className={styles.wrapper()}> | ||
// {input} | ||
// {this.renderPlaceholder()} | ||
// </span> | ||
// <span className={cx(styles.sideContainer(), styles.rightContainer())}> | ||
// {this.renderSuffix()} | ||
// {this.renderRightIcon()} | ||
// </span> | ||
// </label> | ||
// ); |
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.
Забыл удалить. Ниже тоже осталось.
@@ -69,7 +67,7 @@ export interface PagingProps extends CommonProps { | |||
* | |||
* @default false | |||
*/ | |||
shouldBeVisibleWithLessThanTwoPages?: boolean; | |||
shouldBeVisibleWithLessThanTwoPages?: boolean; // TODO Delete in 5.0 |
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.
Лишняя тудушка)
input2022(t: Theme) { | ||
return css` |
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.
Неправильно слил стили.
В старом классе input()
надо удалить все стили кроме первых 2-х правил.
position: absolute;
opacity: 0;
... далее стили из input2022
return styles.activeHandleLarge(this.theme); | ||
case 'medium': | ||
return styles.activeHandleMedium(this.theme); | ||
case 'small': | ||
default: | ||
return styles.activeHandleSmall(this.theme); |
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.
Эти классы остались в стилях.
@@ -1578,7 +1578,6 @@ export class DefaultTheme { | |||
} | |||
|
|||
public static toggleBgFocus = 'linear-gradient(-180deg, #f1f1f1, #dedede)'; | |||
public static toggleBgActive = '#e5e5e5'; |
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.
Вместо этой переменной теперь надо рекомендовать toggleContainerBgDisabled
или toggleContainerBgDisabledChecked
.
Вряд ли кодмод сейчас умеет заменять одну переменную на 2, но можно использовать первую.
Проблема
В рамках мажорного релиза принято решение удалить все старые темы.
Решение
deprecated
переменные.default theme
иdark theme
.default theme
иdark theme
. Теперь они ссылаются внутри наtheme2022
иtheme2022dark
соответственно.Ссылки
resolve IF-1791
Чек-лист перед запросом ревью
Добавлены тесты на все изменения
⬜ unit-тесты для логики
✅ скриншоты для верстки и кросс-браузерности
⬜ нерелевантно
Добавлена (обновлена) документация
⬜ styleguidist для пропов и примеров использования компонентов
⬜ jsdoc для утилит и хелперов
⬜ комментарии для неочевидных мест в коде
✅ прочие инструкции (
README.md
,contributing.md
и др.)⬜ нерелевантно
Изменения корректно типизированы
⬜ без использования
any
(см. PR2856
)✅ нерелевантно
Прочее
⬜ все тесты и линтеры на CI проходят
⬜ в коде нет лишних изменений
✅ заголовок PR кратко и доступно отражает суть изменений (он попадет в changelog)