feat(widgets): add Scrollbar tests and fix StatusIndicator setters#699
feat(widgets): add Scrollbar tests and fix StatusIndicator setters#699anirudhagarwal-dev wants to merge 1 commit into
Conversation
|
Hi @anirudhagarwal-dev 👋 ⭐ Star this repo before your PR merges. Why? GSSoC 2026 contributors who star get priority review and points credit. After you star, push any commit (or re-run this check). The Thanks for your contribution to TermUI. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a markDirty call to StatusIndicator's ChangesWidget state mutation and rendering
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🎉 Thanks for your first PR to TermUI, @anirudhagarwal-dev.
Before your PR merges:
- ⭐ Star the repo. Required. The
star-checkjob blocks your merge otherwise. - ✅ All checks green:
build,test,typecheck. - 🏷 PR title follows
type: short description. Example:fix: handle empty list. - 🔗 Link your closing issue in the description.
GSSoC 2026 points come from labels after merge:
gssoc:approved. +50 base points.level:beginner/intermediate/advanced/critical. +20 / +35 / +55 / +80.quality:clean/exceptional. x 1.2 / x 1.5.type:*. Stackable bonus.
Your reviewer responds within 48 hours. Ping @Karanjot786 on Discord for urgent help.
🚀 Welcome to the cohort.
|
I'd like to work on this project under gssoc2026. Please assign this to me |
Description
This PR introduces a comprehensive unit test suite for the
Scrollbarwidget and fixes a state mutation bug in theStatusIndicatorwidget. It ensures that the scrollbar renders correctly across all orientations and that both widgets properly notify the renderer when their state changes.Related Issue
Closes #670
Which package(s)?
@termuijs/widgets
Type of Change
type:bug)type:testing)Checklist
Gauge.test.ts).Screenbuffer for verification.this.markDirty()calls to state-mutating methods.@termuijs/widgetspackage.bun run build && bun vitest run && bun run typecheckand all pass.Screenshots (if applicable)
N/A - This is a testing and internal logic PR.
Additional Note for Reviewers
The
Scrollbartests cover:verticalRight,verticalLeft,horizontalTop, andhorizontalBottom.The
StatusIndicatorfix adds missingmarkDirty()calls tosetStatus()andsetLabel(), which were previously preventing the UI from refreshing when these values changed.Summary by CodeRabbit
Release Notes
Bug Fixes
Tests