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

fix: remove useEffect that fires before search params #465

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

KristinAoki
Copy link
Member

JIRA Ticket: TNL-11505

It was reported an issue regarding videos not populating the Video ID field when uploading a video via the video component. This issue results in the display of an error message stating, “No playable video source found,” due to the absence of the video ID in the designated field. A workaround for this video issue is to manually copy the video ID from the video block and paste it into the Video ID field.

Testing

  1. Open a course.
  2. Edit to the video component.
  3. Click "Replace video"
  4. Select the desired video for the unit.
  5. The video will upload with the Video ID

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 88.36%. Comparing base (5069cf8) to head (db52cdf).
Report is 10 commits behind head on main.

Files Patch % Lines
...ainers/VideoEditor/components/VideoEditorModal.jsx 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
- Coverage   89.09%   88.36%   -0.74%     
==========================================
  Files         234      247      +13     
  Lines        4310     4563     +253     
  Branches      889      956      +67     
==========================================
+ Hits         3840     4032     +192     
- Misses        449      503      +54     
- Partials       21       28       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@connorhaugh
Copy link
Contributor

Was this error a regression in functionality? if so, do we want to add a test for it?

Copy link
Contributor

@rayzhou-bit rayzhou-bit left a comment

Choose a reason for hiding this comment

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

Small nit on eslint comments. Change looks good to me!

React.useEffect(() => {
dispatch(thunkActions.video.loadVideoData(selectedVideoId, selectedVideoUrl));
}, []);
dispatch(thunkActions.video.loadVideoData(selectedVideoId, selectedVideoUrl));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:
The rules-of-hooks disable in L15 can be removed.
If returnToGallery is renamed to useReturnToGallery, the other rules-of-hooks disables can be removed as well.

@KristinAoki
Copy link
Member Author

Was this error a regression in functionality? if so, do we want to add a test for it?

This was not an regression in functionality. There bug has been around for a while and was not consistently reproducible. I do not think any additional tests are needed.

@KristinAoki KristinAoki merged commit 4fa1695 into main Mar 18, 2024
7 of 8 checks passed
BryanttV pushed a commit to eduNEXT/frontend-lib-content-components that referenced this pull request Apr 10, 2024
* fix: remove useEffect that fires before search params

* fix: remove disable lint lines
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.

3 participants