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: resize textarea on input changes #1017

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

Skaiir
Copy link
Contributor

@Skaiir Skaiir commented Jan 31, 2024

Closes #1011

We need to also recalculate the text-area size on input changes so that it doesn't wait for deboucing to kick in.

This implementation ends up making the call twice (once on typing, once when the value change actually happens through debouncing), but we need to keep the value change one active so that the textarea still resizes when externals change its state.

Well it's only running twice if you type on character every 301ms. It's better to say it runs one extra time

Differentiating a self-triggered value change from an external one does not seem worth the effort. So I think this is the right fix.

@Skaiir Skaiir self-assigned this Jan 31, 2024
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 31, 2024
@Skaiir
Copy link
Contributor Author

Skaiir commented Jan 31, 2024

Visual regression failure is due to fonts not loading fully before the screenshots.

@Skaiir Skaiir force-pushed the 1011-fix-textarea-autosize branch from fb7009f to 0e59ec1 Compare January 31, 2024 05:25
@Skaiir Skaiir changed the base branch from master to merge-dev-to-master January 31, 2024 05:25
@vsgoulart vsgoulart merged commit 5985a3d into merge-dev-to-master Jan 31, 2024
14 checks passed
@vsgoulart vsgoulart deleted the 1011-fix-textarea-autosize branch January 31, 2024 09:12
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 31, 2024
vsgoulart added a commit that referenced this pull request Jan 31, 2024
* chore: update actions/setup-node digest to d86ebcd (#967)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(markdown): add margins to all markdown elements (#986)

* fix: improve image editor placeholder styles

Related to #994

* chore: adjust iframe placeholder font size

Related to #994

* feat: add `security` properties for iFrame

Closes #901

* feat: add warning step to iframe security attributes config

Related to #901

* fix: show iframe title in the editor

Closes #990

* chore(CHANGELOG): correct minor formatting issues (#1003)

* chore: update actions/cache action to v4 (#995)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: update actions/upload-artifact digest to 26f96df (#979)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: repeatable entry parameters now validate with errors

Closes #966

* feat: implement number field debouncing

Closes #958

* chore: remove superfluous useEffects

Related to #958

* fix: Prevent demo data from being created on edited tables

Closes #997

* chore: Add experimental tag

Related to #997

* chore: update actions/upload-artifact digest to d00351b (#1014)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: implement HTML display component

Closes #1004

* feat(schema): support HTML component

Related to #1004

* chore: remove our dependency on preact-markup

Related to #1004

* fix: limit cm-editor properties height to 400px

Related to #1004

* chore: cleanup html and text components

Related to #1004

* fix: handle native CSS scoping & added tests

#1004

* chore: updated snapshots

* chore: Update deps (#1008)

* chore: Update deps

* chore: Revert properties panel update

* chore: update dependency source-map-loader to v5 (#988)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: replace dependency npm-run-all with npm-run-all2 ^5.0.0 (#1012)

* chore: replace dependency npm-run-all with npm-run-all2 ^5.0.0

* chore: Update to 6.1.1

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vinicius Goulart <[email protected]>

* fix: resize textarea on input changes (#1017)

Closes #1011

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bpmn-io-bot <[email protected]>
Co-authored-by: Douglas Bouttell <[email protected]>
Co-authored-by: Vinicius Goulart <[email protected]>
Co-authored-by: Niklas Kiefer <[email protected]>
Co-authored-by: Nico Rehwaldt <[email protected]>
Co-authored-by: Skaiir <[email protected]>
Skaiir added a commit that referenced this pull request Jan 31, 2024
Skaiir added a commit that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants