Skip to content

Commit 523b5d5

Browse files
authored
Add feature flag to advanced formulas checkbox (baserow#4127)
* Add feature flag to advanced formulas checkbox * Revert css change for advanced formula
1 parent 0c27a31 commit 523b5d5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

web-frontend/modules/core/assets/scss/components/form.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
.control__elements--flex {
3535
display: flex;
36-
align-items: flex-start;
36+
align-items: center;
3737
gap: 5px;
3838
}
3939

web-frontend/modules/core/components/formula/FormulaInputField.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@input="emitAdvancedChange"
3232
/>
3333

34-
<div v-if="enableAdvancedMode" class="margin-top-1">
34+
<div v-if="showAdvancedCheckbox" class="margin-top-1">
3535
<label class="checkbox">
3636
<Checkbox
3737
:checked="isAdvancedMode"
@@ -72,6 +72,7 @@ import DataExplorer from '@baserow/modules/core/components/dataExplorer/DataExpl
7272
import { RuntimeGet } from '@baserow/modules/core/runtimeFormulaTypes'
7373
import { isElement, onClickOutside } from '@baserow/modules/core/utils/dom'
7474
import { isFormulaValid } from '@baserow/modules/core/formula'
75+
import { FF_ADVANCED_FORMULA } from '@baserow/modules/core/plugins/featureFlags'
7576
7677
export default {
7778
name: 'FormulaInputField',
@@ -222,6 +223,12 @@ export default {
222223
nodeSelected() {
223224
return this.dataNodeSelected?.attrs?.path || null
224225
},
226+
showAdvancedCheckbox() {
227+
return (
228+
this.enableAdvancedMode &&
229+
this.$featureFlagIsEnabled(FF_ADVANCED_FORMULA)
230+
)
231+
},
225232
},
226233
watch: {
227234
disabled(newValue) {

web-frontend/modules/core/plugins/featureFlags.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const FF_AUTOMATION = 'automation'
33
export const FF_ASSISTANT = 'assistant'
44
export const FF_WORKSPACE_SEARCH = 'workspace-search'
55
export const FF_DATE_DEPENDENCY = 'date_dependency'
6+
export const FF_ADVANCED_FORMULA = 'advanced-formula'
67

78
/**
89
* A comma separated list of feature flags used to enable in-progress or not ready

0 commit comments

Comments
 (0)