matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
283 stars 68 forks source link

add dark mode and compound colors #807

Closed HarHarLinks closed 9 months ago

HarHarLinks commented 1 year ago

I've finally played around with hookshot dark mode and, while i'm at it, the new compound libraries.

compound-design-tokens seems to be where the colors are stored, at least that's the only place I found them. However, it puts them into css classes such as .cpd-theme-light.cpd-theme-light and I haven't found a way to access them based on media queries because of that. so right now I can only statically add the class e.g. <html lang="en" class="cpd-theme-dark"> in index.html.

Best idea I got for now is adding the proper class onload with js based on ?theme=$org.matrix.msc2873.client_theme that then I'd need to add to the widget URL.

To do:

My dev env is local and I don't have access to all supported services, so my testing is limited, but here is how it looks for me:

light mode:

before after
image image
image image
image image

dark mode:

before after
image image
image image
image image
note the icon image

Signed-off-by: Kim Brose 2803622+HarHarLinks@users.noreply.github.com

Half-Shot commented 9 months ago

So I've gone and added compound (which has both light and dark themes) to hookshot, so I think this issue is resolved. Thanks for kicking the work off though!!