-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Video preview isssue #30324 #31770
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
Open
gixid192
wants to merge
7
commits into
magento:2.4-develop
Choose a base branch
from
mageplaza:video-preview-isssue-#30324
base: 2.4-develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Video preview isssue #30324 #31770
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1be4239
Merge pull request #1 from magento/2.4-develop
gixid192 af8943f
fix old video preview thumbnail in add video modal
008597b
Merge branch '2.4-develop' into video-preview-isssue-#30324
gixid192 8f2a916
format code
gixid192 99eae8d
fix jscs rules
7e2ea61
update this
a0e2926
fix race condition saving video thumbnail
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @gixid192 ,
thank you for your contribution.
I have two questions for you:
a. Can you write a test for this PR?
b. I have found a new bug, I tell you a step to reproduce the bug:
b.1. Navigate to Add New Product page in backend
b.2. Open Image And Videos section
b.3. Click on Add Video button
b.4. Enter Vimeo or YouTube video URL in Url field and wait until the Save button is enabled
b.5. Click on Save button
b.6. Click on Add Video Button
b.7. paste URL in Url input, click Title and quickly click on X to close
b.8. Press on Add Video button
b.9. See an Preview Image (bottom left corner) from the previous video
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @danielrussob,
I tried it myself, couldn't reproduce the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
for point 2, i have tested it on your PR, if you want we can schedule a chat on slack of Magento Community Engineering
to reproduce the issue (you can found me with name Daniel Russo)
for point 1, see comment of @sivaschenko
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
So I tried again and reproduced the issue.
There's another ajax in the update image-placeholder:
magento2/app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js
Line 393 in cd857f9
I made the same approach and it fixed the problem! However, I don't understand the purpose of that
_loadRemotePreview
function.The
_loadRemotePreview
function does 2 things:The thing is those 2 things are not related, it does not take data from the request to show for users (instead the preview_image is taken from video's api). Also, if the request fail, there is no error handle for it (and the preview_image still show)
Should we split this function into 2 small separated ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielrussob: I updated new code to fix the issue you reported, just write new code, no splitting; kindly have a look when you have time.
If you have options on this
split into 2 functions
, please let me know.