Skip to content
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

ref(replay): Refactor replay for mobile touch start/end parity check #82515

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Dec 23, 2024

Instead of doing this check inside the VideoReplayerWithInteractions constructor i just moved it up one level to the react component that creates that new instance, and wrapped it into a hook because react.

It was previously guarded by:

      if (root === null || isFetching) {
        return null;
      }

      // check if this is a video replay and if we can use the video (wrapper) replayer
      if (!isVideoReplay || !videoEvents || !startTimestampMs) {
        return null;
      }

and now we're just guarding the check with:

    replay: isFetching ? null : replay
    ...
    if (!replay || !replay.getVideoEvents()) {
      return;
    }

But it'll run at the same time as before: once whenever the replay is fully loaded.

@ryan953 ryan953 requested a review from a team as a code owner December 23, 2024 03:20
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #82515   +/-   ##
=======================================
  Coverage   80.43%   80.43%           
=======================================
  Files        7317     7316    -1     
  Lines      322637   322623   -14     
  Branches    21046    21043    -3     
=======================================
+ Hits       259498   259499    +1     
+ Misses      62732    62717   -15     
  Partials      407      407           

@ryan953 ryan953 merged commit 4b25ba2 into master Dec 23, 2024
43 checks passed
@ryan953 ryan953 deleted the ryan953/ref-useTouchEventsCheck branch December 23, 2024 15:57
andrewshie-sentry pushed a commit that referenced this pull request Jan 2, 2025
…82515)

Instead of doing this check inside the `VideoReplayerWithInteractions`
constructor i just moved it up one level to the react component that
creates that new instance, and wrapped it into a hook because react.

It was previously guarded by:
```
      if (root === null || isFetching) {
        return null;
      }

      // check if this is a video replay and if we can use the video (wrapper) replayer
      if (!isVideoReplay || !videoEvents || !startTimestampMs) {
        return null;
      }
```
and now we're just guarding the check with:
```
    replay: isFetching ? null : replay
    ...
    if (!replay || !replay.getVideoEvents()) {
      return;
    }
```
But it'll run at the same time as before: once whenever the replay is
fully loaded.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants