Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-17653 Remove metadata call for youtube links #3493

Merged
merged 10 commits into from
Sep 2, 2019

Conversation

sudheerDev
Copy link
Contributor

Summary

This removes the a API call made for youtube links and consumes data from metadata to remove scroll pop

Ticket Link

https://mattermost.atlassian.net/browse/MM-17653

@sudheerDev sudheerDev added this to the v5.15.0 milestone Aug 20, 2019
@sudheerDev sudheerDev requested review from hmhealey and a team August 20, 2019 19:01
@sudheerDev sudheerDev added the 2: Dev Review Requires review by a core commiter label Aug 20, 2019
@ghost ghost requested review from saturninoabril and removed request for a team August 20, 2019 19:01
@sudheerDev sudheerDev added CherryPick/Approved Meant for the quality or patch release tracked in the milestone 3: QA Review Requires review by a QA tester Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Aug 20, 2019
@mattermod mattermod removed the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Aug 20, 2019
@mattermost mattermost deleted a comment from mattermod Aug 20, 2019
@sudheerDev sudheerDev added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Aug 20, 2019
@sudheerDev sudheerDev added Setup Cloud Test Server Setup a test server using Mattermost Cloud and removed Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Aug 20, 2019
@@ -3529,6 +3529,5 @@
"widgets.users_emails_input.loading": "Loading",
"widgets.users_emails_input.no_user_found_matching": "No one found matching **{text}**, type email address",
"widgets.users_emails_input.valid_email": "Add **{email}**",
"yourcomputer": "Your computer",
"youtube_video.notFound": "Video not found"
Copy link
Member

Choose a reason for hiding this comment

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

Was curious on this one so I tested with youtube link with available and unavailable video (only by changing the last character):

On master/5.14, second post showed unavailable thumbnail placeholder from youtube (probably expected but not entirely sure as I was expecting a message saying "Video not found")
Screen Shot 2019-08-22 at 6 14 31 PM

On this PR, thumbnails shown as if both videos are available (clicking on second post reveals that the video is unavailable)
Screen Shot 2019-08-22 at 6 16 03 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. The thumbnail populated is from opengraph data so it must have returned so, i don't think this would be a bug we should fix here in webapp. In any case let me check and file a ticket for the bug

Copy link
Contributor Author

@sudheerDev sudheerDev Aug 26, 2019

Choose a reason for hiding this comment

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

@saturninoabril Seems related to how opengraph provides data. Weird it happens for that link. I tried couple of other links and if it is not a valid youtube link all you see is the link as a message as there will be no metadata.

@hmhealey Quick thoughts? Should we be creating a ticket for this?

components/youtube_video/youtube_video.jsx Outdated Show resolved Hide resolved
components/youtube_video/youtube_video.jsx Outdated Show resolved Hide resolved
components/youtube_video/youtube_video.jsx Outdated Show resolved Hide resolved
components/youtube_video/youtube_video.test.jsx Outdated Show resolved Hide resolved
Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

LGTM

@saturninoabril saturninoabril removed 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Aug 30, 2019
@saturninoabril saturninoabril added the 4: Reviews Complete All reviewers have approved the pull request label Aug 30, 2019
@sudheerDev sudheerDev merged commit 97cba9d into mattermost:master Sep 2, 2019
@sudheerDev sudheerDev deleted the MM-17653 branch September 2, 2019 07:35
@mattermod mattermod added AutomatedCherryPick and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Sep 2, 2019
sudheerDev pushed a commit that referenced this pull request Sep 2, 2019
* MM-17653 Remove metadata call for youtube links

* Fix lint

* Fix in8 issue

* Add fallback for image url

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Fix review comments

* Update snapshots
@amyblais amyblais added Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation labels Sep 3, 2019
@stevemudie stevemudie added the Tests/Done Release tests have been written label Sep 9, 2019
lieut-data added a commit that referenced this pull request Sep 10, 2019
#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
lieut-data added a commit that referenced this pull request Sep 10, 2019
#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
hanzei pushed a commit that referenced this pull request Sep 11, 2019
#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
mattermost-build pushed a commit to mattermost-build/mattermost-webapp that referenced this pull request Sep 11, 2019
mattermost#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
hanzei pushed a commit that referenced this pull request Sep 11, 2019
#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
* MM-17653 Remove metadata call for youtube links

* Fix lint

* Fix in8 issue

* Add fallback for image url

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Fix review comments

* Update snapshots
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
mattermost#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
* MM-17653 Remove metadata call for youtube links

* Fix lint

* Fix in8 issue

* Add fallback for image url

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Update components/youtube_video/youtube_video.jsx

Co-Authored-By: Harrison Healey <[email protected]>

* Fix review comments

* Update snapshots
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
mattermost#3493 unintentionally removed the import of `actions/integration_actions`, which defined a side effect necessary to the correct functioning of interactive dialogs.

I've relocated this somewhere that is more intentionally imported, and commented details as to the issues with this code block. I'm not explicitly fixing the issues right now, and I'm not sure if I can unit test this, so I'm just restoring the import for now.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request AutomatedCherryPick Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
6 participants