lemverse
lemverse copied to clipboard
Feature flags
Except for the core of the app (i.e. people moving around and WebRTC being triggered when two people are close), it would be great if all features could be toggled, through the settings or in-app.
Things we may want to enable or disable:
- chat
- user settings (or parts of it)
- reactions
- kick
- buttons
- inventory
- guilds
- etc. :)
This would also help when working on new features – we could release the code in production even when a feature is not 100% ready yet, keep working on it on a development instance and disable the feature in production. That way we wouldn't have to keep two distinct git branches with one lagging behind, which helps when you want to patch things.
Also, if we go through a module-based approach, we would make out-of-tree code standard, which would help minimizing the codebase here and contributions through third party codebases.
There is lp.isLemverseBeta('myBetaFlag')
to set flags on users, isn't that enough?
That works for new features but not the existing ones. We can't disable the chat that way, for example. :)
https://github.com/l3mpire/lemverse/pull/139
#161 started to implement a new features configuration model in the settings:
{
"features": {
"useMessaging": {
"enabled": true,
"guestEnabled": false,
"levelConfigurable": true
},
...
}
}
It covers most cases but now we have a lot of things to refactor to follow that model. :)