Skip to content

fix: LEAP-1931: Correct frame offset calculation in Timeline #7244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 20, 2025

Conversation

Gondragos
Copy link
Collaborator

@Gondragos Gondragos commented Mar 18, 2025

Reason for change:

The frame offset calculation in the Timeline component did not account for currentOffsetX, which led to improper determination of valid offset ranges. This caused inconsistent behavior in seeking the right video frame for displaying.

Before:
Screen Recording 2025-03-18 at 15 05 56

Solution:

The check for frame offsets was adjusted to include currentOffsetX. This ensures accurate calculations and resolves the inconsistency.

After:
Screen Recording 2025-03-18 at 15 22 21

Rollout strategy:

This code will be rolled out as part of the next release and does not require feature flags or environment variables.

Testing:

  • Manually tested.

Risks:

This change modifies a critical calculation in the Timeline. There is a minor risk of unforeseen edge cases that might have been missed.

Reviewer Notes:

From the code perspective offset contains the value of the current mouse x coordinate related to the timeline itself plus currentOffsetX which is basically scrollLeft. Although it's unclear why that method was called getMouseToFrame, it's pretty clear that the next condition was working fine only when the timeline's frame is placed at the left edge.

Adjusted the frame offset check to account for `currentOffsetX`, ensuring proper behavior when determining the valid offset range.
@github-actions github-actions bot added the fix label Mar 18, 2025
Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit b566a5f
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67dbe85205a93e0008a0e26e

Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit b566a5f
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67dbe852f15fa5000812648a

@Gondragos Gondragos requested review from nass600 and hlomzik March 18, 2025 15:25
@Gondragos
Copy link
Collaborator Author

Gondragos commented Mar 19, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/tools/design-tokens-converter/package.json

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 20, 2025

/git merge

Workflow run
Successfully merged: 18 files changed, 117 insertions(+), 60 deletions(-)

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Mar 20, 2025

/fm sync

Workflow run

@Gondragos Gondragos merged commit 6b4ef15 into develop Mar 20, 2025
34 checks passed
@Gondragos Gondragos deleted the fb-LEAP-1931/timelabels-drag-limits branch March 20, 2025 12:25
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.

5 participants