fix(ui): prevent bio textarea overlap and add character limit (#26903) #26969
+26
−8
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.
What does this PR do?
This PR fixes a UI bug where the Bio textarea on the onboarding page could be resized infinitely, causing it to overlap with the footer buttons. It also adds a missing character limit to the bio field to prevent potential database or UI issues with excessively long text.
Frontend:
Added maxHeight="200px" to the
Editor
component to constrain vertical resizing.
Added a character counter (e.g., 0/256) below the bio field.
implemented a 256 character limit enforcement in the setText handler.
Refactored
UserProfile
to use watch("bio") for reliable character counting.
Fixes #26903
Visual Demo (For contributors especially)
The bio field is now constrained, does not overlap the footer, and shows a character counter
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Login or Sign up locally (e.g., as a new user).
Navigate to the onboarding flow: http://localhost:3000/getting-started/user-profile.
Verify UI:
Try to resize the Bio textarea. It should stop resizing at 200px height and show a scrollbar for content.
Verify it does not overlap with the "Finish setup" buttons at the bottom.
Verify Logic:
Type in the Bio field and observe the character counter updating (e.g., 5/256).
Copy-paste a text longer than 256 characters (e.g., Lorem Ipsum).
Verify the text is truncated to 256 characters and the value is updated correctly.
Checklist
Checked all the pointers