element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.02k stars 1.96k forks source link

Available themes are defined by matrix-react-sdk, but should be defined by the skin #8693

Open abeluck opened 5 years ago

abeluck commented 5 years ago

Use Case: A user might want to fork riot-web and provide a custom skin + css theme, while still using the official matrix-react-sdk.

Problem: In develop, the list of supported themes is defined by matrix-react-sdk in src/themes.js, and there is no way to override this list without patching matrix-react-sdk

Repro:

  1. Fork riot-web, for example myweb
  2. Create a css theme at my-web/res/themes/myweb/css/
  3. Set default_theme in config.json to be myweb
  4. Add myweb to the list of css themes in webpack.config.js
  5. Build and open my-web

Result: :cry: The light theme is used by default.

(not so nice) Workaround:

  1. Edit src/themes.js, adding myweb to the list of THEMES
  2. Build and open myweb

Results: The myweb theme is used by default

Solution: Presumably the list of supported themes should be defined by the skin project, probably in config.json?

abeluck commented 5 years ago

Updated the issue to reflect recent changes to develop. This issue still exists.

According to @turt2live overriding the THEMES array in src/themes.js might be possible, but it's not clear how/where.