salute-developers / plasma

Salute Design System
MIT License
28 stars 20 forks source link

plasma-new-hope: TextArea height / width fixes #1261

Closed denivladislav closed 1 week ago

denivladislav commented 2 weeks ago

TextArea

What/why changed

Правки, связанные с высотой и шириной компонента

Before / after (autoResize)

До: Пусть minAuto = 1, maxAuto = 1. Пусть написана одна строка текста. Высота textarea в этом случае равна 2rem, что неверно.

https://github.com/salute-developers/plasma/assets/71961494/95c2150f-342d-4b19-a5c5-67c78e1e42de

После: Поскольку сейчас minAuto и minAuto отвечают за отображаемое кол-во строк, то высота textarea в этом случае должна быть равна одному line-height (20px для размера m):

https://github.com/salute-developers/plasma/assets/71961494/a4b08d75-cace-4f03-9bb6-0abc50e8df61

После: Пример для minAuto = 2, maxAuto = 4

https://github.com/salute-developers/plasma/assets/71961494/94050172-5b3e-4820-9397-e56345228ec8

После: Пример для другого размера шрифта:

https://github.com/salute-developers/plasma/assets/71961494/637c24df-424a-480a-a61e-7e7f8bf1b04e

После: Если нет ограничений (minAuto / maxAuto), то высота растёт бесконечно:

https://github.com/salute-developers/plasma/assets/71961494/166dd3be-bfe8-473e-a54e-5752ae9627fb

📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @salutejs/caldera-online@0.52.0-canary.1261.9663085538.0 npm install @salutejs/plasma-asdk@0.95.0-canary.1261.9663085538.0 npm install @salutejs/plasma-b2c@1.337.0-canary.1261.9663085538.0 npm install @salutejs/plasma-new-hope@0.92.0-canary.1261.9663085538.0 npm install @salutejs/plasma-web@1.338.0-canary.1261.9663085538.0 npm install @salutejs/sdds-serv@0.65.0-canary.1261.9663085538.0 # or yarn add @salutejs/caldera-online@0.52.0-canary.1261.9663085538.0 yarn add @salutejs/plasma-asdk@0.95.0-canary.1261.9663085538.0 yarn add @salutejs/plasma-b2c@1.337.0-canary.1261.9663085538.0 yarn add @salutejs/plasma-new-hope@0.92.0-canary.1261.9663085538.0 yarn add @salutejs/plasma-web@1.338.0-canary.1261.9663085538.0 yarn add @salutejs/sdds-serv@0.65.0-canary.1261.9663085538.0 ```
github-actions[bot] commented 2 weeks ago

Theme Builder app deployed!

https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1261/

github-actions[bot] commented 2 weeks ago

Documentation preview deployed!

website:https://plasma.sberdevices.ru/pr/pr-1261/ caldera-online storybook: https://plasma.sberdevices.ru/pr/pr-1261/caldera-online-storybook/ asdk storybook: https://plasma.sberdevices.ru/pr/pr-1261/asdk-storybook/ b2c storybook: https://plasma.sberdevices.ru/pr/pr-1261/b2c-storybook/ new-hope storybook: https://plasma.sberdevices.ru/pr/pr-1261/new-hope-storybook/ web storybook: https://plasma.sberdevices.ru/pr/pr-1261/web-storybook/ sdds-serv storybook: https://plasma.sberdevices.ru/pr/pr-1261/sdds-serv-storybook/ ui storybook: https://plasma.sberdevices.ru/pr/pr-1261/ui-storybook/

github-actions[bot] commented 2 weeks ago

⚡ Component performance testing

Result: 🟢 OK

github-actions[bot] commented 2 weeks ago

⚡ Component performance testing

Result: 🟢 OK

github-actions[bot] commented 2 weeks ago

⚡ Component performance testing

Result: 🟢 OK

github-actions[bot] commented 1 week ago

⚡ Component performance testing

Result: 🟢 OK

github-actions[bot] commented 1 week ago

⚡ Component performance testing

Result: 💀 WASTED

Performance tests are broken. If the current changes are the cause, please fix it immediately in this PR. If not, please schedule their repair. For any questions, come to the Speed team.

github-actions[bot] commented 1 week ago

⚡ Component performance testing

Result: 💀 WASTED

Performance tests are broken. If the current changes are the cause, please fix it immediately in this PR. If not, please schedule their repair. For any questions, come to the Speed team.

github-actions[bot] commented 1 week ago

⚡ Component performance testing

Result: 💀 WASTED

Performance tests are broken. If the current changes are the cause, please fix it immediately in this PR. If not, please schedule their repair. For any questions, come to the Speed team.

github-actions[bot] commented 1 week ago

⚡ Component performance testing

Result: 🟢 OK