A quick update for Telescope 2.6
Tags: osd700, opensource
Published: 2022-01-29 03:33:42

I am not really sure how, but we are doing a lot for release 2.6!

I cannot explain how much, since there is a lot of moving parts while I am writing this post, so we would have to wait for the changelog of the release next week.

However, I can describe what I managed to work for this week:

* Fix the syntax highlighting so that it is adapted to the dark theme of Telescope.
* Figure out what to do for the MVP of the Twitch integration feature in Telescope.
* Suggest a design for a YouTube summary bar shown for video posts in Telescope.

## Syntax Highlighting Madness

The issue ([#2377](https://github.com/Seneca-CDOT/telescope/issues/2377)) was fairly simple: fix the code block colours so that they adapt to the dark theme.

The issue was tackled by another person on December of last year, but the [PR](https://github.com/Seneca-CDOT/telescope/pull/2500) was closed per request of the author, and it wasn't picked up again until last week.

When I read the old PR, a problem was highlighted (pun not entirely intended): the colour seemed to not adapt well in the light theme.

I started to ask myself "why? Why did the PR caused this problem?". I read the front-end code to figure out, but I didn't have much progress, so I head to the production website and started to "inspect element" to understand how the current syntax highlighting worked.

I read a familiar class name: `hljs`. I remember reading something similar to that before, and that's when I remembered: `that's the classes of the `highlight.js` library!"

I had a really nice keyword to use for searching around. I went through the front-end to figure out how the code blocks were parsed by `highlight.js`, since the library first had to analyze the text to annotate the keywords properly with the `css` classes.

I didn't have much luck, and of course, the annotation of the keywords wasn't happening in the front-end, but instead in the [back-end](https://github.com/Seneca-CDOT/telescope/blob/545c3edfe6f5efd4f0006986c2bfdc8fcb7614dd/src/backend/utils/html/index.js)!

Anyway, this was an interesting revelation, and it also helped me to clear out one doubt: where was the `highlight.js` annotation happening.

The second problem was figuring out how to change the style sheet that sets the syntax highlighting to the `hljs` annotated elements given in the front-end depending on the theme.

One of my teammates, @dukemanh recommended me to follow the usage in the `highlight.js` demo. And so I did! It was fairly easy to set up, but I have to make some changes given in the review of my [PR](https://github.com/Seneca-CDOT/telescope/pull/2769).

## MVP Twitch Integration

The sequel to the YouTube Integration chapter: Twitch Integration. I didn't research much until today, when another of my teammates, @sirinoks found a cool repo that creates a service that caches responses from the Twitch API and gives an RSS feed as a response.

While we haven't forked yet, we are planning to provide Docker support, since that would help us immensely on integrating this feature!

The discussion of this issue is found [here](https://github.com/Seneca-CDOT/telescope/issues/2728).

## YouTube Summary Bar

While this issue has not been advanced much yet, I pitched a rough sketch how I think the YouTube summary bar should look like.

I will be waiting for any feedback in the [issue thread](https://github.com/Seneca-CDOT/telescope/issues/2680)!.

## Last words

So, yeah, a lot of issues are getting closed near the release date! Hopefully, I will be able to focus on other issues, like [#2725](https://github.com/Seneca-CDOT/telescope/issues/2725), [#2730](https://github.com/Seneca-CDOT/telescope/issues/2730),
[#2736](https://github.com/Seneca-CDOT/telescope/issues/2736),
and [#2737](https://github.com/Seneca-CDOT/telescope/issues/2737).