Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

denivladislav
Copy link
Contributor

@denivladislav denivladislav commented Jun 20, 2024

TextArea

  • исправлена типизация (разбитие на три группы rows / cols, height / width, autoResize / minAuto / maxAuto)
  • исправлен расчёт autoResize
  • исправлена документация

What/why changed

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

Before / after (autoResize)

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

before-minAuto1-maxAuto1.mov

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

after-minAuto1-maxAuto1.mov

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

after-minAuto2-maxAuto4.mov

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

sExample.mov

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

after-minAuto0-maxAuto0.mov
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
# or 
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]

Copy link
Contributor

Theme Builder app deployed!

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

Copy link
Contributor

⚡ Component performance testing

Result: 🟢 OK

Copy link
Contributor

⚡ Component performance testing

Result: 🟢 OK

Copy link
Contributor Author

@denivladislav denivladislav Jun 25, 2024

Choose a reason for hiding this comment

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

апдейтнул доку sdds в связи с влитием #1263

relative link:
#1263 (comment)

Copy link
Contributor

⚡ 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.

Copy link
Contributor

⚡ 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.

Copy link
Contributor

⚡ 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.

Copy link
Contributor

⚡ Component performance testing

Result: 🟢 OK

@denivladislav denivladislav added this pull request to the merge queue Jun 25, 2024
Merged via the queue into dev with commit 23bbdb9 Jun 25, 2024
29 checks passed
@denivladislav denivladislav deleted the PLASMA-2337/textarea-height-width-fixes branch June 25, 2024 14:13
This was referenced Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Something isn't working plasma-components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants