Доработка генератора - #81
Closed
fabulous-unicorn wants to merge 0 commit into
Closed
Conversation
fabulous-unicorn
changed the base branch from
main
to
feature/DS-762-input-otp
September 2, 2026 10:19
fabulous-unicorn
force-pushed
the
feature/DS-762-input-otp-tokens
branch
from
September 2, 2026 11:29
3797318 to
856a355
Compare
fabulous-unicorn
force-pushed
the
feature/DS-762-input-otp-tokens
branch
from
September 4, 2026 14:11
856a355 to
dcceb3a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Обновляем логику генерации component-токенов для случаев, когда colorScheme.light и colorScheme.dark имеют разную структуру.
Генератор строит объединённый набор путей обеих цветовых схем. Если значение отсутствует в выбранной теме, оно берётся по такому же пути из базовой части компонента - уровнем выше colorScheme.
Например:
Тогда генератор формирует:
Значение из противоположной темы не используется как fallback, поэтому dark-токен не может случайно попасть в light-тему.
Логика работает и для полностью отсутствующей ветки, и для отдельных отсутствующих вложенных путей. Если путь есть в одной цветовой схеме, но отсутствует и в другой схеме, и в базовой части компонента, генератор завершится ошибкой с точным путём.
Изменение применяется только к components.*.colorScheme; требования к структуре semantic.colorScheme не меняются.