Skip to content

DISC-263: Percentage funded displayed text lacking animation#2535

Merged
Arkariang merged 2 commits into
masterfrom
imartin/DISC-263
Jun 18, 2026
Merged

DISC-263: Percentage funded displayed text lacking animation#2535
Arkariang merged 2 commits into
masterfrom
imartin/DISC-263

Conversation

@Arkariang

@Arkariang Arkariang commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📲 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:

  • coercedTarget clamps targetProgress to 0f..1f.
  • sweepFraction is animatedProgress / coercedTarget (clamped to 0f..1f), i.e. how far along the arc currently is relative to its target — 0f when the target is 0.
  • When text parses as an integer (the percentage), displayText is that value scaled by sweepFraction and rounded, so it counts up from 0 to the target as the ring sweeps. If text isn't an integer, it falls back to the original text unchanged.
  • Added a kotlin.math.roundToInt import for the rounding. No changes to the public composable signature or to call sites.

👀 See

Screen_recording_20260618_140043.mp4

| | |

📋 QA

  • Open the Video Feed.
  • Find a campaign card that is in progress (not yet at 100%) so the percentage text is visible inside the ring.
  • As the card's progress indicator animates in, confirm the number counts up from 0 to the campaign's percentage in sync with the ring sweeping, rather than the number appearing at its final value instantly.

Story 📖

DISC-236

…tin/DISC-263

# Conflicts:
#	app/src/main/java/com/kickstarter/ui/compose/designsystem/KSProgressIndicators.kt
@Arkariang Arkariang changed the title - Displayed text on progress indicator is now animated instead of jum… DISC-263: Percentage funded displayed text lacking animation Jun 18, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.55%. Comparing base (9c89ac5) to head (d785cbe).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 displayText based on the progress animation fraction and use it for the text overlay.
  • Clamp target progress to 0f..1f and avoid divide-by-zero when the target is 0f.
  • Add kotlin.math.roundToInt to round the animated number to an integer for display.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arkariang Arkariang marked this pull request as ready for review June 18, 2026 22:01

@tonyteate tonyteate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Arkariang Arkariang merged commit a8b721c into master Jun 18, 2026
4 checks passed
@Arkariang Arkariang deleted the imartin/DISC-263 branch June 18, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants