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

enhance(macros/EmbedYouTube): add optional title attribute #10504

Merged
merged 4 commits into from
May 3, 2024

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Feb 13, 2024

edit: reverting to change title only per reviewer feedback

Summary

This PR adds a few more parameters to the YouTube embed macro.

Problem

Currently the title, width and height are hardcoded, so it would be nice to be able to customize these.

Solution

Add three optional parameters that fall back to current hardcoded values if not given.

Screenshots

image

How did you test this change?

{{EmbedYouTube("hs3piaN4b5I", "Awesome Flexbox video", 200, 100)}}
yarn && yarn dev

@bsmth bsmth requested a review from a team as a code owner February 13, 2024 08:38
@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Feb 13, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Let's only add the title now, for accessibility, as the width/height is a separate issue.

@caugner caugner marked this pull request as draft February 28, 2024 15:34
@github-actions github-actions bot added the idle label Mar 29, 2024
@bsmth bsmth changed the title chore: add optional title, width, height attrs to YouTube embed chore: add optional title attr to YouTube embed May 3, 2024
@bsmth bsmth marked this pull request as ready for review May 3, 2024 12:00
@caugner caugner changed the title chore: add optional title attr to YouTube embed enhance(macros/EmbedYouTube): add optional title attribute May 3, 2024
@caugner caugner merged commit 4d215d3 into mdn:main May 3, 2024
10 checks passed
@caugner
Copy link
Contributor

caugner commented May 3, 2024

FYI @fiji-flo

@bsmth bsmth deleted the youtube-embed branch May 6, 2024 08:14
@bsmth
Copy link
Member Author

bsmth commented May 6, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle macros tracking issues related to kumascript macros
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants