Skip to content

feat: improve animation for check for new data #598#624

Merged
andrewtavis merged 3 commits intoscribe-org:mainfrom
prince-0408:fix-issue-598-check-data-animation
Mar 24, 2026
Merged

feat: improve animation for check for new data #598#624
andrewtavis merged 3 commits intoscribe-org:mainfrom
prince-0408:fix-issue-598-check-data-animation

Conversation

@prince-0408
Copy link
Copy Markdown
Contributor

@prince-0408 prince-0408 commented Mar 24, 2026

Description

Closes #598

Replaces the static RadioCircle toggle on the "Check for new data" row in the Update Data card with a new animated CheckDataSpinner component, matching the Figma design spec.

Changes

New component: CheckDataSpinner
Replaces RadioCircle in UpdateDataCardView with a three-state animated spinner:

  • idle — empty gray circle, tap to start checking
  • checking — rotating orange arc (~60fps via Timer) with an X in the center to cancel
  • checked — filled orange circle with a white checkmark, tap to reset to idle

Removed: RadioCircle
The old static radio button toggle has been removed and fully replaced.

Screenshots

Idle Checking Checked
Gray empty circle Rotating orange arc + X Filled orange circle + checkmark

Notes

  • The 2-second delay in startChecking() is a placeholder simulating a network check. This should be replaced with the actual API call once the backend check endpoint is available.
  • Spinner uses a Timer at 16ms intervals (~60fps) for smooth rotation instead of SwiftUI's RotationEffect animation loop, giving more control over cancellation.
Screen.Recording.2026-03-24.at.4.28.32.PM.mov
Screen.Recording.2026-03-24.at.3.15.02.PM.mov

- Replace RadioCircle with CheckDataSpinner component
- Add three states: idle (gray circle), checking (rotating arc + X cancel), checked (filled orange + checkmark)
- Animate spinner using Timer at ~60fps for smooth rotation
- Tap X during check to cancel back to idle
- Auto-transitions to checked state after check completes
@github-actions
Copy link
Copy Markdown

Thank you for the pull request! 💙

The Scribe-iOS team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and iOS rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the CI unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Copy Markdown
Member

Would you be able to fix the conflicts on the PR, @prince-0408? We just merged in some updates to the download functionality :)

@andrewtavis
Copy link
Copy Markdown
Member

Thanks so much for the PR, btw! Videos are looking great. Looking forward to the review 😊

@prince-0408
Copy link
Copy Markdown
Contributor Author

Hello, @andrewtavis Conflicts have been settled; the CheckDataSpinner implementation has been retained, and the most recent upstream download functionality updates have been integrated. I appreciate the heads-up! 😊

@andrewtavis andrewtavis self-requested a review March 24, 2026 19:00
Copy link
Copy Markdown
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

praise: Is working great, @prince-0408! Thanks so much for your efforts here and updating the PR with main 😊

if isSelected {
switch state {
case .idle:
// Empty gray circle
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nitpick: In the future it'd be great if comments that are their own line end in periods, as we like to have them as complete sentences :)

@andrewtavis andrewtavis merged commit 82437a9 into scribe-org:main Mar 24, 2026
3 checks passed
catreedle pushed a commit to catreedle/Scribe-iOS that referenced this pull request Mar 25, 2026
…-org#624)

- Replace RadioCircle with CheckDataSpinner component
- Add three states: idle (gray circle), checking (rotating arc + X cancel), checked (filled orange + checkmark)
- Animate spinner using Timer at ~60fps for smooth rotation
- Tap X during check to cancel back to idle
- Auto-transitions to checked state after check completes

Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve animation for check for new data

2 participants