задать ширину drawer по размерам - #138
Open
khaliulin wants to merge 3 commits into
Open
Conversation
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.
Ширины боковой панели заданы по таблице Figma (коллекция
sizing, переменнаяwidth): sm 280, base 350, lg 420, xlg 630.До этого правил для
p-drawer-sm/lg/xlgв CSS кита не было вовсе — компонент навешивал класс размера, но обрабатывать его было некому, и все размеры давали одну ширину 400px.Что изменено
src/lib/providers/prime-preset/tokens/components/drawer.ts:.p-drawer-left/rightsizing.175x…&.p-drawer-smsizing.140x…&.p-drawer-lgsizing.210x…&.p-drawer-xlgsizing.315xПроверено в браузере на story
Components/Overlay/Drawer → Sizes, каждый размер в чистой загрузке: 350 / 280 / 420 / 630 px.Гейты:
check-component.mjs drawer— 0 FAIL, 2 WARN (advisory G8:extend.width,extend.scaleне применены);check-dt-refs.mjs— мёртвых ссылок drawer нет; prettier иtsc --noEmitчисто.Вопросы к дизайну
tokens.jsonу drawer единственная ширина —extend.width={dimension.size.2000}= 25rem = 400px, а таблицаsizing.widthдаёт base = 350. Здесь взято значение из таблицы, поэтомуextend.widthостался неиспользованным (первый WARN).sizing.140x/175x/210x/315x), как это уже сделано вdialog.ts. По-хорошему они должны приезжать реэкспортом какdrawer.extend.overlayWidth.*.