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

fix(ui5-textarea): Calc properly TextArea's size for showExceeds property #4152

Merged
merged 7 commits into from
Dec 2, 2021

Conversation

d3xter666
Copy link
Contributor

Fixes: #4142

When showExceeds property was used, remainning characters text's size was not taken into consideration
for TextArea's root height calculations.

…erty

When showExceeds property was used, remainning characters text's size was not taken into consideration
for TextArea's root height calculations.
Copy link
Contributor

@niyap niyap left a comment

Choose a reason for hiding this comment

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

Let's leave it with the magic number 32, as it looks better.
I will propose you to add a sample showing the use case : ui5-textarea with showExceededText property set to true and rows="1". Because,we could not add tests, since currently we do not have visual tests and if somebody makes a change in these calculations, I am sure that he will not have in mind to test that use case :)

@d3xter666
Copy link
Contributor Author

Let's leave it with the magic number 32, as it looks better. I will propose you to add a sample showing the use case : ui5-textarea with showExceededText property set to true and rows="1". Because,we could not add tests, since currently we do not have visual tests and if somebody makes a change in these calculations, I am sure that he will not have in mind to test that use case :)

HI @niyap ,

Just added a sample in the test page.

Cheers

<br>
<ui5-textarea id="textarea-single-row"
show-exceeded-text="true"
growing-max-lines="0"
Copy link
Contributor

@niyap niyap Nov 29, 2021

Choose a reason for hiding this comment

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

"growing" property is false by default, so without adding it, growing-max-lines does not influence the component. Also, 0 is the default value, so you do not have to specify it.

@d3xter666 d3xter666 merged commit 6f06963 into master Dec 2, 2021
@d3xter666 d3xter666 deleted the textarea-exceeding-chars-visibility branch December 2, 2021 11:53
niyap pushed a commit that referenced this pull request Dec 2, 2021
…erty (#4152)

* fix(ui5-textarea): Calc properly TextArea's size for showExceeds property

When showExceeds property was used, remainning characters text's size was not taken into consideration
for TextArea's root height calculations.

* Fix eslint errors

* Add single row textarea sample

* Update sample
niyap added a commit that referenced this pull request Dec 2, 2021
…erty (#4152) (#4417)

* fix(ui5-textarea): Calc properly TextArea's size for showExceeds property

When showExceeds property was used, remainning characters text's size was not taken into consideration
for TextArea's root height calculations.

* Fix eslint errors

* Add single row textarea sample

* Update sample

Co-authored-by: Yavor Ivanov <d3xter666@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextArea: max length text is cut short when using rows=1, required field has no effect
3 participants