Configurable feature toggles
- Get rid of
custom/features.json
, allow admins to toggle features on and off through Soapbox Config in soapboxConfig.features
(we can do this now that we wait for Soapbox Config to load before displaying the UI)
- Create a UI for displaying all features, with the ability to toggle any of them on or off.
- Expose this UI both to admins (
/soapbox/config/features
) and users (verify_credentials.settings_store.features
, managed under /developers
).
- MAYBE: Allow the API to also send a features map on
verify_credentials.source.features
for A/B testing(???)
- In
useFeatures()
hook, combine these maps with precedence like: features.ts
<-- soapboxConfig.features
<-- verify_credentials.source.features
<-- verify_credentials.settings_store.features
. (Since it's a flat map, merging is super easy with Object.assign
)
- Boom, we support every backend with ease, allow toggling unwanted features (at least in the UI) and make A/B testing possible! All in one fell swoop.