Baserow uses basic feature flags currently to allow unfinished features to be merged and/or released.
Add/remove features flags to the list below:
To enable specific feature flags set the environment variable
FEATURE_FLAGS=feature1,feature2,feature3
. Using dev.sh
this would look like:
FEATURE_FLAGS=feature1,feature2,feature3 ./dev.sh xyz
You could also use a docker-compose .env
file and set the FEATURE_FLAGS variable in
there.
Use the *
feature flag to enable every single feature flag without having to specify
each one.
FEATURE_FLAGS=* ./dev.sh xyz
Feature flags should be:
- Alphanumeric with dashes.
- Not start or end with spaces (flags from the env variable will be trimmed for ease of use).
- Unique per feature.
# Add variable with feature flag to baserow.core.feature_flag in format
# FF_<FEATURE_NAME> = "feature_name"
# i.e.
FF_FEATURE1 = "feature1"
# In your feature file import flag you need and feature flag function
from baserow.core.feature_flag import FF_FEATURE1, feature_flag_is_enabled
# Use to check if feature is enabled
if feature_flag_is_enabled(FF_FEATURE1):
# do the feature
# or if you want to raise exception if the feature is not enabled
feature_flag_is_enabled(FF_FEATURE1, raise_if_disabled=True)
// add feature flag variable in @core/plugins/featureFlags.js in format
// FF_<FEATURE_NAME> = "feature_name"
// i.e.
export const FF_FEATURE1 = "feature1";
methods: {
someComponentMethod()
{
if (this.$featureFlagIsEnabled(FF_FEATURE1)){
// do the feature
}
}
}