u-wave / web

Web client for üWave, the self-hosted collaborative listening platform.
https://demo.u-wave.net
MIT License
68 stars 15 forks source link

Client config #57

Closed goto-bus-stop closed 7 years ago

goto-bus-stop commented 8 years ago

hosts should be able to configure things on the client-side somehow. some ideas:

javascript:

css:

colours for example could be configurable. they should be passed both to JS (MuiTheme) & CSS (vars.css).

other stuff that should be configurable:

without explicit server support (which we probably should not assume for things like colours) we're pretty much limited to configuring in the build step. that should be fine, though, probably.

goto-bus-stop commented 8 years ago

i prefer the global JSON config object (eg. uWaveConfig) injected into the HTML. that way we only have to recompile a very small part to change config—the HTML task usually takes like 10ms (it's just minifying a file), versus 20 seconds for a full optimised JavaScript build on SSD.

goto-bus-stop commented 8 years ago

A full optimised CSS build also takes around 10 seconds, but i'm not sure if we can do much about that.

fawaf commented 8 years ago

ideally, it would be great if the config did not need to be during build time, but at least it is configurable.

goto-bus-stop commented 8 years ago

Yeah. we want to be able to run the client as static html/js files though, so we do need a way to do config during the build. We could of course have runtime config as well for people who use the Express middleware.

goto-bus-stop commented 7 years ago

Config is now injected at runtime. Closing, build-time config will go to #240 instead.