DISC-263: Percentage funded displayed text lacking animation#2535
Conversation
…ping from 0 to displayed text
…tin/DISC-263 # Conflicts: # app/src/main/java/com/kickstarter/ui/compose/designsystem/KSProgressIndicators.kt
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2535 +/- ##
=========================================
Coverage 65.55% 65.55%
- Complexity 2536 2537 +1
=========================================
Files 402 402
Lines 31752 31752
Branches 4505 4505
=========================================
+ Hits 20814 20815 +1
Misses 8539 8539
+ Partials 2399 2398 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates KSVideoProgressIndicator so the percentage text in the center of the video feed campaign progress ring animates (counts up) in sync with the ring sweep, instead of instantly showing the final value.
Changes:
- Compute a
displayTextbased on the progress animation fraction and use it for the text overlay. - Clamp target progress to
0f..1fand avoid divide-by-zero when the target is0f. - Add
kotlin.math.roundToIntto round the animated number to an integer for display.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📲 What
The numeric text inside the KSVideoProgressIndicator (the funding percentage shown in the center of the circular progress ring on the video feed campaign cards) now animates and counts up in sync with the ring sweep, instead of instantly showing the final value while the ring fills.
🛠 How
In the text-overlay block of KSVideoProgressIndicator, instead of rendering the raw text directly, we now compute a displayText from the arc's animation progress:
👀 See
Screen_recording_20260618_140043.mp4
| | |
📋 QA
Story 📖
DISC-236