-
Notifications
You must be signed in to change notification settings - Fork 111
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
Conversation
This file contains 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
Visual regression failure is due to fonts not loading fully before the screenshots. |
Skaiir
force-pushed
the
1011-fix-textarea-autosize
branch
from
January 31, 2024 05:25
fb7009f
to
0e59ec1
Compare
vsgoulart
approved these changes
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
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.
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.