Treat printText duration 0 as persistent and add test#531
Conversation
Deploying flockxr with
|
| Latest commit: |
508efb9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://463034e3.flockxr.pages.dev |
| Branch Preview URL: | https://codex-make-printtext-block-p.flockxr.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying flockdev with
|
| Latest commit: |
508efb9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7e5fafc8.flockdev.pages.dev |
| Branch Preview URL: | https://codex-make-printtext-block-p.flockdev.pages.dev |
Motivation
printTexttreats adurationof0as “persistent” (no auto-fade) instead of scheduling a timeout to remove it.Description
timeoutIdfrom aconsttoletand initialize it tonullinapi/ui.jsto represent no scheduled timeout.setTimeout(fadeOut, ...)whensafeDuration > 0, so adurationof0will not schedule an automatic fade.clearTimeoutwhentimeoutId !== null, avoiding unnecessary clearing when no timeout was scheduled.should keep the control when duration is 0intests/printtext.test.jsthat asserts the background control still exists after a short delay.Testing
should keep the control when duration is 0test, and all tests passed.should print text,should use white as the default text color,should use the specified text color,should remove the control after the duration expires) were run and remained green.Codex Task
Summary by CodeRabbit
Bug Fixes
Tests