matrix-org / matrix-org/matrix.org

Improve the YouTube consent placeholder

Open
#2,073 4 comments 0 reactions 0 assignees View on GitHub
blog enhancement
Dominant language
JavaScript
Stars
616
Forks
463
Avg merge
2d 3h
Merged PRs (30d)
19

Description

The YouTube consent placeholder is currently a shortcode, which could be nice but the markdown parser gets in the way.

A better way to do it would be to define a `youtube-player` web component that asks for consent. The component would be defined in a `/js/components.js` file in which all the web components used on m.org are defined (so far only the youtube-player). That file would need to be added globally via the `skel.html` template. This allows us to use `` everywhere without having to worry about embedding the `components.js` file

It should also be possible to un-consent, likely by going to the privacy policy page and adding a button to set the `ytConsent` key to `false` in the localStorage

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing YouTube shortcode and the global skel.html template, then inspect the privacy policy page for the consent controls. Define the youtube-player web component in /js/components.js, make it available globally, and ensure the privacy page can unset ytConsent; done means the component can be used throughout the site without markdown-parser issues and consent can be withdrawn.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.