canonical / canonical-mattermost-themes

Canonical's mattermost themes
2 stars 3 forks source link

The Canonical Dark theme doesn't have syntax highlighting #9

Closed d0ugal closed 4 years ago

d0ugal commented 4 years ago

For some reason the Canonical Dark theme doesn't colour code. The Canonical Light and all other themes do.

"codeTheme": "github-dark"

Maybe this should be "monokai" or another name? I guess github-dark doesn't exist?

d0ugal commented 4 years ago

Moved from https://bugs.launchpad.net/canonical-mattermost/+bug/1887958

anthonydillon commented 4 years ago

The codeTheme does exist but there seems to being some issues with updating themes automatically. Could you switch to another theme and back to the Canonical dark theme and see if that refreshes the styles. Another option to test this is to copy these settings as a custom theme and see it work. If you still see the issue please reopen and comment.

d0ugal commented 4 years ago

Changing themes works very reliably for me with every theme. The only difference is that Canonical Dark does not highlight the code. If I edit the theme and change it to "github" or "monokai" then it also works fine. If I use "github-dark" on another theme it then also drops the colours.

FWIW, I tested it with a very simple message in a chat with myself.

```python
print(1)
print("two")
```

I am also using the MM snap if that makes a difference.

anthonydillon commented 4 years ago

Oh I see what you mean the syntax highlighting is missing. Strange, the classes are there.

anthonydillon commented 4 years ago

@d0ugal PR ready if you wanted to review ^

d0ugal commented 4 years ago

Looks good to me, thanks!

Saviq commented 4 years ago

Hey @anthonydillon, we're still seeing the issue and @hatched has found something.

hatched commented 4 years ago

I dug a bit deeper. It looks like the culprit is the monokai theme not having the appropriate classes (or maybe isn't being applied at all). Maybe we can change that to something else? Does this need to be installed separately?

https://github.com/canonical-web-and-design/canonical-mattermost-themes/blob/master/darkTheme.json#L25

anthonydillon commented 4 years ago

It was fixed in the latest released version: https://github.com/canonical-web-and-design/canonical-mattermost-themes/releases/tag/v1.0.2

Here is the ticket to release it: https://portal.admin.canonical.com/C126959/

relaxdiego commented 4 years ago

It was fixed in the latest released version: https://github.com/canonical-web-and-design/canonical-mattermost-themes/releases/tag/v1.0.2

Here is the ticket to release it: https://portal.admin.canonical.com/C126959/

Just confirming that I pasted the contents of the canonical dark theme in my MM client (MacOS) custom theme textbox and it fixed the syntax highlighting issue.

relaxdiego commented 4 years ago

Although, I checked with the mobile client (iPhone) and the syntax highlighting isn't working.

anthonydillon commented 4 years ago

We are unfortunately blocked waiting for this change to be rolled out.

anthonydillon commented 4 years ago

This has now been released. Please change your theme to the light one and then back to the dark one to get the latest changes.

image