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: title when YouTube is pasted as the title to composer #12565

Merged
merged 1 commit into from Mar 31, 2021

Conversation

lis2
Copy link
Contributor

@lis2 lis2 commented Mar 31, 2021

When the YouTube link is passed to the composer, it should extract the title.

https://meta.discourse.org/t/youtube-link-not-generate-title/183776

@lis2 lis2 requested a review from nlalonde March 31, 2021 06:20
await fillIn("#reply-title", "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
assert.equal(
queryAll(".title-input input").val(),
"Rick Astley - Never Gonna Give You Up (Video)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice choice.

@nlalonde
Copy link
Member

Shouldn't it be returning an <aside class="onebox">, but it's returning an <img>? Looks odd to me.

@lis2 lis2 merged commit b317962 into discourse:master Mar 31, 2021
@lis2 lis2 deleted the yt-title-onebox branch March 31, 2021 23:19
@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/youtube-link-not-generate-title/183776/9

@riking
Copy link
Contributor

riking commented Apr 1, 2021

@nlalonde The preview_html doesn't need to be fancy, it just needs to indicate that we're fetching the right thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants