DEV Community

dbelokon
dbelokon

Posted on

Release 2.9: Progress - Adding the YouTube Banner

I would like to write a quick update on the YouTube banner
situation for Telescope!

For Telescope 2.9, we managed to ship the YouTube banner,
unfortunately on an incomplete state โ˜ ๐Ÿ˜ข

So, the banner will originally pop up every time you find
a post from an article that comes from a YouTube feed (extra
work is necessary to make it so that it identifies any
YouTube link available in the poster).

There's one big problem: the subscriber count and the
view count are shown as negative numbers!๐Ÿ™ˆ

This was intentional. I wanted my PR to just nail the styling
of the banner, without worrying about the logic of getting the
view count and the subscriber count. The next step would be
filing a PR that cares about that logic.

The reason why it didn't fit into the release 2.9 window was because the first PR was merged really close to the actual release, so there was no time to review the PR that added this logic.

The logic for the PR itself is not super complicated, but it might
look like that because the way that React deals with state and
hooks.

I actually finished the code for this PR, but I would like to
leave the explanation of it for the next post!

Top comments (0)