Skip to content

fix: scrubber beacon label immediate updates#570

Merged
hcopp merged 2 commits intomasterfrom
hunter/scrubber-beacon-single-frame-delay-fix
Mar 31, 2026
Merged

fix: scrubber beacon label immediate updates#570
hcopp merged 2 commits intomasterfrom
hunter/scrubber-beacon-single-frame-delay-fix

Conversation

@hcopp
Copy link
Copy Markdown
Contributor

@hcopp hcopp commented Mar 31, 2026

What changed? Why?

This PR fixes a potential single frame delay in scrubber beacon labels. This caused the label to sometimes be at the previous y value location for 1 frame too long and thus would glitch as the user started scrubbing.

Root cause (required for bugfixes)

This happened because useAnimatedReaction, wouldn't always immediately update as scrubbing occurred, resulting in a single frame where the labels were off vertically.

Switching to using useAnimatedReaction for the animations only (as we do elsewhere) and relying on useDerivedValue to set the y position of labels when scrubbing solves this.

UI changes

Not sure if the gif showcases this but it is visible in predictions for college basketball tournament. Much easier to tell from a human eye.

iOS Old iOS New
image image
Adobe Express - ScreenRecording_03-31-2026 15-52-27_1 (1) Adobe Express - ScreenRecording_03-31-2026 15-52-11_1

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Mar 31, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS ✅ See below

CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 1/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

const y = useDerivedValue(
() => (unwrapAnimatedValue(isIdle) ? idleAnimatedY.value : targetY.value),
[isIdle, idleAnimatedY, targetY],
);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This ensures we are always up to date vs potentially 1 frame behind.

idleAnimatedY.value = buildTransition(current.y, updateTransition);
} else {
animatedY.value = buildTransition(current.y, updateTransition);
idleAnimatedY.value = current.y;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Similar logic as before but simpler.

@hcopp hcopp marked this pull request as ready for review March 31, 2026 20:48
Copy link
Copy Markdown
Contributor

@cb-ekuersch cb-ekuersch left a comment

Choose a reason for hiding this comment

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

LGTM!

@hcopp hcopp merged commit 28bf7b7 into master Mar 31, 2026
44 of 46 checks passed
@hcopp hcopp deleted the hunter/scrubber-beacon-single-frame-delay-fix branch March 31, 2026 21:06
@github-actions
Copy link
Copy Markdown
Contributor

cb-ekuersch pushed a commit that referenced this pull request Apr 2, 2026
* fix: scrubber beacon label immediate updates

* Bump version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants