Add compatibility for dark themes

AI-generated summary

The discussion is about adding compatibility for dark themes. md-misko suggests two improvements: automatically adding the wasm extension to settings.theme_authorized_extensions and detecting dark mode to render SVG lines and text in white. sam notes that the wasm extension is already added by default in the core, and promises to look into adding dark mode support. md-misko confirms they had manually added the extension, and thanks sam for considering dark mode support. pmusaraj announces that dark mode support has been added.

This is so cool :heart_eyes:

Two suggestions:

  • is it possible for the component to add wasm extension to settings.theme_authorized_extensions by itself (it requires an additional manual step now)
  • svg lines and text are rendered in black, which makes them invisible in dark mode. Is it possible to detect dark mode and render lines and text in white.

Please do Chart.js as a theme component next!!! (the Discourse-chart plugin exists, but is very limited).

5 Likes

Already changed in core to add wasm in the default allow list, are you sure you did not fiddle with extensions on your install?

Great suggestion will see if I can add dark mode support!

7 Likes

You’re right, I added extensions to the list manually before.

Thanks!

1 Like

Dark mode support now added.

9 Likes