Skip to content

Генерация тем#89

Merged
nschpy merged 7 commits intoPORTFOLIO-38073from
THEMES_CONFIG
Apr 8, 2025
Merged

Генерация тем#89
nschpy merged 7 commits intoPORTFOLIO-38073from
THEMES_CONFIG

Conversation

@nschpy
Copy link
Collaborator

@nschpy nschpy commented Apr 1, 2025

No description provided.

@nschpy nschpy requested a review from VDA22 April 1, 2025 22:36
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ультраневажно, но тут можно и без #

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поправлю

Copy link
Collaborator

Choose a reason for hiding this comment

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

first мб? Или тут специально чтобы крашнулось?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Лучше на first. Брал этот код через copy/paste просто

fallbackWarning(warningPrefix: theme.name, tokenName: token.name, fallbackTheme: fallbackTheme.name)
}

return resolvedToken ?? fallbackToken
Copy link
Collaborator

Choose a reason for hiding this comment

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

Мб fallbackToken ресолвить только если нет основного токена?
Или есть прям какая-то необходимость в том чтобы фолбек для каждого цвета впринципе был?

Copy link
Collaborator Author

@nschpy nschpy Apr 7, 2025

Choose a reason for hiding this comment

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

Да, нужно чтобы fallback для цвета всегда был, т.к сейчас цвета для тем отличаются, то-есть 1 цвет, есть в одной теме, но его нет в другой. Поэтому цвета должны браться, только если существует(удалось зарезолвить) fallback вариант.

Copy link
Collaborator

Choose a reason for hiding this comment

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

а *10/10 для чего? Чтобы округлить? Знаки после запятой чем-то мешают?
У этих точек какая мощность? от -1.0 до 1.0? Или это прям поинты на экране?

Если юнит поинты - 0.1 точности мало будет - всякие 0.25 до 0.2 порежутся например (это визуально значимое различие будет на больших площадях). Я бы минимум 3 знака брал (0.125 например). Либо даже вообще не округлял.
Если это поинты на экране - то можно и в целые обвести.

Copy link
Collaborator

@VDA22 VDA22 Apr 7, 2025

Choose a reason for hiding this comment

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

подозреваю, что это из-за моего коммента https://forgejo.pyn.ru/hhru/ios-apps/pulls/24038#issuecomment-2077328

Copy link
Collaborator

Choose a reason for hiding this comment

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

тоже можно first, если не нужно при nil явно падать.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поменяю

@nschpy nschpy merged commit 9c012a4 into PORTFOLIO-38073 Apr 8, 2025
@nschpy nschpy deleted the THEMES_CONFIG branch April 8, 2025 09:24
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.

3 participants

Comments