Repository navigation
feat: typography tokens editor and ds-service typography style operations - #125
Merged
vkaltyrin merged 6 commits intoOct 20, 2026
Conversation
Read and edit typography styles of a theme (OpenSpec change
add-typography-tokens-editor):
- GET /tenants/{tenantId}/typography-styles returns the styles of
screen-l, screen-m and screen-s in px with variant tokens, the font
families of the design system and the components that use each style;
- PATCH /tenants/{tenantId}/typography-styles/{tokenId} writes size, line
height and letter spacing to the three style tokens of the token screen,
variant weights and the font family to the style on every screen, in the
platform formats of web, android and ios, and checks and increments the
shared theme editRevision.
Values are validated with the prototype messages; weights are limited to
100..900 in steps of 100 and map to iOS words as the token parser does.
Replace the old typography screen with the prototype Typography screen: screen switch, style tree, scale board and inspector with style, variant weights and component usage. Edits are saved by ds-service style operations with the colors autosave queue; typography entries of the old draft can be saved or discarded. The old screen, its add and disable actions and TypographyPicker are removed.
…y editor The typography module and screen add logic-dense code (domain, autosave queue, draft migration) while the removed old screen was mostly markup, so the client complexity density rises from 9.4 to 9.6. The baseline is recomputed by the developer's decision.
Mark the implemented tasks, name details.field as the location of the invalid field in INVALID_TYPOGRAPHY_VALUE and list the save status in the toolbar among the prototype differences.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Board rows keep the prototype heights, which are tuned for the default theme values, and grow when the letters of the sample (0.75 of the font size plus 8 px) do not fit, so an enlarged style is not cropped.
The prototype board is fixed to the 1440 px window (719 px) and leaves an empty area on wide screens; the board now takes the canvas width and the sample column grows. The single-line sample uses a line height not smaller than the font size, so a style with a short line height is not cropped.
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.
Что это
Реализация OpenSpec change
add-typography-tokens-editor(#121). PR открыт поверх ветки change, поэтому в диффе только реализация. После мержа #121 база сменится наdev.Раздел «Типографика» переведён на прототип SDDS Portal и на операции
ds-service, как «Палитра» и «Цвета».ds-service
GET /api/ds/tenants/{tenantId}/typography-stylesотдаёт:screen-l,screen-m,screen-sв px с токенами начертаний;body.m.normal), с экраном и черезtoken_id.PATCH /api/ds/tenants/{tenantId}/typography-styles/{tokenId}пишет в текущую тему в одной транзакции:design.md:remпри базе 16, нулевой трекинг —"normal";thin, 200ultraLight.400 INVALID_TYPOGRAPHY_VALUE, поле передаётся вdetails.field.route-manifest.jsonи OpenAPI.Клиент
modules/typographyTokens:pages/typography:409;.typography-screen, какcolor-tokens.css. Меню семейства вынесено из поля сoverflow: hidden.TypographyPicker.Проверки
token_id, имя с экраном и инварианты;tools/verify full --change add-typography-tokens-editor— PASS.javascript-clientобновлена по решению разработчика. Плотность сложности 9.4 → 9.6: новый код несёт логику, а удалённый экран был в основном разметкой.base_default):screen-l.body.m.*на трёх платформах,screen-mиscreen-sне меняются;dsbuilder theme fetchс изменёнными значениями. Change будет заархивирован после этой проверки.Расхождения с прототипом
Таблица — в
design.md. К согласованным в #121 добавилась одна строка: в панели инструментов есть состояние сохранения и «Повторить», как в «Цветах».