CodeForPhilly / CodeForPhilly/balancer-main
[Insight extractor] Chat Input Box Does Not Shrink After Expanding
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
### 🐞 Bug: Chat Input Box Does Not Shrink After Expanding
**User Story**
As a user, when I expand the chat input box (by pressing `Shift+Enter`), I want it to shrink back automatically when I delete all the text, so the input box doesn’t stay oversized unnecessarily.
---
### 📝 Current Behavior
- Input box starts small.
- Pressing `Shift+Enter` expands it.
- Even after deleting all text (`Ctrl+A` → Delete), the box stays expanded.
- No way to shrink it back without refreshing.
---
### 🎯 Expected Behavior
- Input box should **auto-shrink** back to its default height when empty.
- Normal multi-line expansion behavior (`Shift+Enter`) should still work.
- Typing → expands as needed, clearing → shrinks.
---
### ✅ Acceptance Criteria
- [ ] Input box shrinks to default height when all text is cleared.
- [ ] Pressing `Shift+Enter` expands box as expected while text is present.
- [ ] Box size resets when user submits an empty message.
- [ ] Behavior works consistently across browsers.
---
### 🔨 Task Breakdown
- [ ] **Frontend**
- Add auto-resize logic tied to text length.
- Detect when content length = 0 → reset to default height.
- [ ] **QA**
- Verify expansion works with multi-line text.
- Verify shrinking works on `Ctrl+A → Delete`.
- Verify shrinking works after backspacing to empty.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.