From cd7d20237fd3704bb00838c9db6f57ba4a26b7db Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 8 May 2025 14:20:46 +0530 Subject: [PATCH 01/18] chore: run-behaviour add automatic --- app/client/package.json | 2 +- .../types/PluginActionTypes.ts | 35 +++++++------ app/client/src/ce/entities/FeatureFlag.ts | 2 + .../formConfig/ApiSettingsConfig.ts | 5 +- .../formConfig/GoogleSheetsSettingsConfig.ts | 5 +- .../formConfig/PluginSettings.ts | 27 ++++++++++ .../formConfig/QuerySettingsConfig.ts | 5 +- .../components/JSFunctionSettings.tsx | 6 +-- app/client/src/sagas/PluginSagas.ts | 28 +++++++++-- app/client/src/utils/PluginUtils.ts | 50 +++++++++++++++++++ .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- .../src/main/resources/setting.json | 35 ++++++++++++- 22 files changed, 543 insertions(+), 42 deletions(-) create mode 100644 app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts create mode 100644 app/client/src/utils/PluginUtils.ts diff --git a/app/client/package.json b/app/client/package.json index b7bb16bbf1b9..ed8fedee4899 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -427,4 +427,4 @@ "axios": "^1.8.3", "esbuild": "^0.25.1" } -} \ No newline at end of file +} diff --git a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts index cb3947afcd9b..90c2e8f3b42f 100644 --- a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts +++ b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts @@ -5,23 +5,26 @@ export const THEME = EditorTheme.LIGHT; export enum ActionRunBehaviour { ON_PAGE_LOAD = "ON_PAGE_LOAD", MANUAL = "MANUAL", + AUTOMATIC = "AUTOMATIC", } -export const RUN_BEHAVIOR = { - ON_PAGE_LOAD: { - label: "On page load", - subText: "Query runs when the page loads or when manually triggered", - value: ActionRunBehaviour.ON_PAGE_LOAD, - children: "On page load", - }, - MANUAL: { - label: "Manual", - subText: "Query only runs when called in an event or JS with .run()", - value: ActionRunBehaviour.MANUAL, - children: "Manual", - }, -}; +export type ActionRunBehaviourType = `${ActionRunBehaviour}`; -export const RUN_BEHAVIOR_VALUES = Object.values(RUN_BEHAVIOR); +interface PluginActionSettingsConfigChildren { + label: string; + configProperty: string; + controlType: string; + initialValue?: string | boolean; + options?: Array<{ label: string; value: string }>; + tooltipText?: string; + placeholder?: string; + dataType?: string; + subtitle?: string; + name?: string; +} -export type ActionRunBehaviourType = `${ActionRunBehaviour}`; +export interface PluginActionSettingsConfig { + sectionName: string; + id: number; + children: PluginActionSettingsConfigChildren[]; +} diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 63f151e0e7bf..d895a8e0975a 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -60,6 +60,7 @@ export const FEATURE_FLAG = { "license_external_saas_plugins_enabled", release_computation_cache_enabled: "release_computation_cache_enabled", release_ai_chat_integrations_enabled: "release_ai_chat_integrations_enabled", + release_reactive_actions_enabled: "release_reactive_actions_enabled", } as const; export type FeatureFlag = keyof typeof FEATURE_FLAG; @@ -110,6 +111,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { license_external_saas_plugins_enabled: false, release_computation_cache_enabled: false, release_ai_chat_integrations_enabled: false, + release_reactive_actions_enabled: false, }; export const AB_TESTING_EVENT_KEYS = { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index 2f3c2b4f1275..1b87bbd97871 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -9,7 +9,8 @@ import { import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/types/PluginActionTypes"; + RUN_BEHAVIOR_CONFIG_PROPERTY, +} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; export default [ { @@ -18,7 +19,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehaviour", + configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index 48072b8bbedc..b413defeab3e 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -1,7 +1,8 @@ import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/types/PluginActionTypes"; + RUN_BEHAVIOR_CONFIG_PROPERTY, +} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; export default [ { @@ -10,7 +11,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehaviour", + configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts new file mode 100644 index 000000000000..45c9f0708765 --- /dev/null +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts @@ -0,0 +1,27 @@ +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; + +export const RUN_BEHAVIOR_CONFIG_PROPERTY = "runBehaviour"; + +export const RUN_BEHAVIOR = { + ON_PAGE_LOAD: { + label: "On page load", + subText: "Query runs when the page loads or when manually triggered", + value: ActionRunBehaviour.ON_PAGE_LOAD, + children: "On page load", + }, + MANUAL: { + label: "Manual", + subText: "Query only runs when called in an event or JS with .run()", + value: ActionRunBehaviour.MANUAL, + children: "Manual", + }, +}; + +export const AUTOMATIC_RUN_BEHAVIOR = { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: ActionRunBehaviour.AUTOMATIC, + children: "Automatic", +}; + +export const RUN_BEHAVIOR_VALUES = Object.values(RUN_BEHAVIOR); diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index af05483b56b4..560a8ec64c8e 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -1,7 +1,8 @@ import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/types/PluginActionTypes"; + RUN_BEHAVIOR_CONFIG_PROPERTY, +} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; export default [ { @@ -10,7 +11,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehaviour", + configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index ea180c9b029c..3923c15b7ccc 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -14,11 +14,9 @@ import { } from "ee/constants/messages"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; -import { - RUN_BEHAVIOR_VALUES, - type ActionRunBehaviourType, -} from "PluginActionEditor/types/PluginActionTypes"; +import { type ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; import styled from "styled-components"; +import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; const OptionLabel = styled(Text)` color: var(--ads-v2-color-fg); diff --git a/app/client/src/sagas/PluginSagas.ts b/app/client/src/sagas/PluginSagas.ts index 9c887c2c4907..41dcb5585437 100644 --- a/app/client/src/sagas/PluginSagas.ts +++ b/app/client/src/sagas/PluginSagas.ts @@ -45,6 +45,8 @@ import type { } from "utils/DynamicBindingUtils"; import type { ActionDataState } from "ee/reducers/entityReducers/actionsReducer"; import { getFromServerWhenNoPrefetchedResult } from "./helper"; +import { updatePluginRunBehaviourForPluginSettings } from "utils/PluginUtils"; +import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; function* fetchPluginsSaga( action: ReduxAction< @@ -164,11 +166,21 @@ function* fetchPluginFormConfigsSaga(action?: { const dependencies: FormDependencyConfigs = {}; const datasourceFormButtonConfigs: FormDatasourceButtonConfigs = {}; + const featureFlagEnabled: boolean = yield select( + selectFeatureFlagCheck, + "release_reactive_actions_enabled", + ); + + const updatedPluginSettings = updatePluginRunBehaviourForPluginSettings( + defaultActionSettings, + featureFlagEnabled, + ); + Array.from(pluginIdFormsToFetch).forEach((pluginId, index) => { const plugin = plugins.find((plugin) => plugin.id === pluginId); if (plugin && plugin.type === PluginType.JS) { - settingConfigs[pluginId] = defaultActionSettings[plugin.type]; + settingConfigs[pluginId] = updatedPluginSettings[plugin.type]; editorConfigs[pluginId] = defaultActionEditorConfigs[plugin.type]; formConfigs[pluginId] = []; dependencies[pluginId] = defaultActionDependenciesConfig[plugin.type]; @@ -186,7 +198,7 @@ function* fetchPluginFormConfigsSaga(action?: { // Action settings form if not available use default if (plugin && !pluginFormData[index].setting) { - settingConfigs[pluginId] = defaultActionSettings[plugin.type]; + settingConfigs[pluginId] = updatedPluginSettings[plugin.type]; } else { settingConfigs[pluginId] = pluginFormData[index].setting; } @@ -236,6 +248,16 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { pluginId, ); + const featureFlagEnabled = yield select( + selectFeatureFlagCheck, + "release_reactive_actions_enabled", + ); + + const updatedPluginSettings = updatePluginRunBehaviourForPluginSettings( + defaultActionSettings, + featureFlagEnabled, + ); + if (!formConfig) { const formConfigResponse: ApiResponse = yield PluginApi.fetchFormConfig(pluginId); @@ -243,7 +265,7 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { yield validateResponse(formConfigResponse); if (!formConfigResponse.data.setting) { - formConfigResponse.data.setting = defaultActionSettings[plugin.type]; + formConfigResponse.data.setting = updatedPluginSettings[plugin.type]; } if (!formConfigResponse.data.editor) { diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts new file mode 100644 index 000000000000..3c93553549b8 --- /dev/null +++ b/app/client/src/utils/PluginUtils.ts @@ -0,0 +1,50 @@ +import { objectKeys } from "@appsmith/utils"; +import type { PluginType } from "entities/Plugin"; +import { + AUTOMATIC_RUN_BEHAVIOR, + RUN_BEHAVIOR_CONFIG_PROPERTY, +} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; + +export const updatePluginRunBehaviourForPluginSettings = ( + pluginSettings: Record, + flagValueForReactiveActions: boolean, +) => { + if (!flagValueForReactiveActions) { + return objectKeys(pluginSettings).reduce( + (acc: Record, pluginType) => { + acc[pluginType] = pluginSettings[pluginType].map( + (plugin: PluginActionSettingsConfig) => { + return { + ...plugin, + children: plugin.children.map((child) => { + if ( + child.configProperty === RUN_BEHAVIOR_CONFIG_PROPERTY && + child.options + ) { + return { + ...child, + options: [ + AUTOMATIC_RUN_BEHAVIOR, + ...child.options.filter( + (option) => + option.value !== AUTOMATIC_RUN_BEHAVIOR.value, + ), + ], + }; + } + + return child; + }), + }; + }, + ); + + return acc; + }, + pluginSettings, + ); + } + + return pluginSettings; +}; diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json index 4f94c3d58b0e..b36da2b00704 100644 --- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json index 29eeef3f9072..2423dba973d5 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json index 29eeef3f9072..2423dba973d5 100644 --- a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json index b40e119aa13f..bc90ccb578ee 100644 --- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json index 29eeef3f9072..2423dba973d5 100644 --- a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json index 6ef51a82605e..efa3507d602c 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json index d3b65d13187b..782fa172f0cb 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json index c6d9b84f30f0..463592e78b53 100644 --- a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json index c6d9b84f30f0..463592e78b53 100644 --- a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json index 29eeef3f9072..2423dba973d5 100644 --- a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json index 1b1100df5992..1a0fe3a43d3b 100755 --- a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json index c6d9b84f30f0..463592e78b53 100644 --- a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json @@ -20,7 +20,40 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ] + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": false + } + }, + { + "label": "Run behavior", + "configProperty": "runBehaviour", + "controlType": "DROP_DOWN", + "initialValue": "MANUAL", + "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, + { + "label": "On page load", + "subText": "Query runs when the page loads or when manually triggered", + "value": "ON_PAGE_LOAD" + }, + { + "label": "Manual", + "subText": "Query only runs when called in an event or JS with .run()", + "value": "MANUAL" + } + ], + "hidden": { + "flagValue": "release_reactive_actions_enabled", + "comparison": "FEATURE_FLAG", + "value": true + } }, { "label": "Request confirmation before running this query", From ffe58f4e5eb9bff08053e7fd2b1ec3b3f3494489 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 8 May 2025 15:28:57 +0530 Subject: [PATCH 02/18] chore: run-behaviour add automatic --- .../constants/AppsmithActionConstants/ActionConstants.tsx | 8 +++++--- app/client/src/sagas/PluginSagas.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx b/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx index e703da5a31f0..c4dcd7925cf9 100644 --- a/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx +++ b/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx @@ -8,6 +8,7 @@ import saasActionSettingsConfig from "constants/AppsmithActionConstants/formConf import apiActionDependencyConfig from "constants/AppsmithActionConstants/formConfig/ApiDependencyConfigs"; import apiActionDatasourceFormButtonConfig from "constants/AppsmithActionConstants/formConfig/ApiDatasourceFormsButtonConfig"; import type { EntityTypeValue } from "ee/entities/DataTree/types"; +import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; export interface ExecuteActionPayloadEvent { type: EventType; @@ -166,9 +167,10 @@ export const POSTMAN = "POSTMAN"; export const CURL = "CURL"; export const Swagger = "Swagger"; -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const defaultActionSettings: Record = { +export const defaultActionSettings: Record< + PluginType, + PluginActionSettingsConfig[] +> = { [PluginType.API]: apiActionSettingsConfig, [PluginType.DB]: queryActionSettingsConfig, [PluginType.SAAS]: saasActionSettingsConfig, diff --git a/app/client/src/sagas/PluginSagas.ts b/app/client/src/sagas/PluginSagas.ts index 41dcb5585437..c3eccd2b610a 100644 --- a/app/client/src/sagas/PluginSagas.ts +++ b/app/client/src/sagas/PluginSagas.ts @@ -248,7 +248,7 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { pluginId, ); - const featureFlagEnabled = yield select( + const featureFlagEnabled: boolean = yield select( selectFeatureFlagCheck, "release_reactive_actions_enabled", ); From 9545860a50c3b2aea270c75847815449a0ea3236 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 8 May 2025 15:54:44 +0530 Subject: [PATCH 03/18] chore: run-behaviour add automatic --- app/client/src/utils/PluginUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index 3c93553549b8..3a1dcf781334 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -10,7 +10,7 @@ export const updatePluginRunBehaviourForPluginSettings = ( pluginSettings: Record, flagValueForReactiveActions: boolean, ) => { - if (!flagValueForReactiveActions) { + if (flagValueForReactiveActions) { return objectKeys(pluginSettings).reduce( (acc: Record, pluginType) => { acc[pluginType] = pluginSettings[pluginType].map( From 33af67719912cda49c43452739aa9cd73f6de339 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 9 May 2025 14:57:45 +0530 Subject: [PATCH 04/18] chore: added run behaviour for js actions --- .../components/JSFunctionSettings.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 3923c15b7ccc..a68f4387fe7c 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -16,7 +16,11 @@ import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; import { type ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; import styled from "styled-components"; -import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { + RUN_BEHAVIOR_VALUES, + AUTOMATIC_RUN_BEHAVIOR, +} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; const OptionLabel = styled(Text)` color: var(--ads-v2-color-fg); @@ -45,8 +49,20 @@ interface FunctionSettingsRowProps extends Omit { const FunctionSettingRow = (props: FunctionSettingsRowProps) => { const [runBehaviour, setRunBehaviour] = useState(props.action.runBehaviour); - const options = RUN_BEHAVIOR_VALUES as SelectOptionProps[]; + let options = RUN_BEHAVIOR_VALUES as SelectOptionProps[]; const selectedValue = options.find((opt) => opt.value === runBehaviour); + const flagValueForReactiveActions = useFeatureFlag( + "release_reactive_actions_enabled", + ); + + if (flagValueForReactiveActions) { + options = [ + AUTOMATIC_RUN_BEHAVIOR, + ...options.filter( + (option) => option.value !== AUTOMATIC_RUN_BEHAVIOR.value, + ), + ]; + } const onSelectOptions = useCallback( (newRunBehaviour: ActionRunBehaviourType) => { From 8d6718f43cba972394b887100c59038f5ab690f6 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 9 May 2025 19:27:12 +0530 Subject: [PATCH 05/18] removing unnecessary code --- .../PartialExportModal/unitTestUtils.ts | 24 +++++++++++++ .../formConfig/ApiSettingsConfig.ts | 3 +- .../formConfig/GoogleSheetsSettingsConfig.ts | 3 +- .../formConfig/PluginSettings.ts | 23 ++++++------ .../formConfig/QuerySettingsConfig.ts | 3 +- .../components/JSFunctionSettings.tsx | 14 ++------ .../SaaSEditor/__data__/FinalState.json | 35 +++++++++++++++++++ .../SaaSEditor/__data__/InitialState.json | 35 +++++++++++++++++++ app/client/src/utils/PluginUtils.ts | 11 ++---- app/client/test/factories/MockPluginsState.ts | 20 +++++++++++ .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- .../src/main/resources/setting.json | 30 +--------------- 22 files changed, 145 insertions(+), 386 deletions(-) diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index d00c56822f49..261b638644d4 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -10043,6 +10043,12 @@ export const defaultAppState = { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: + "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC", + }, { label: "On page load", subText: @@ -10094,6 +10100,12 @@ export const defaultAppState = { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: + "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC", + }, { label: "On page load", subText: @@ -10145,6 +10157,12 @@ export const defaultAppState = { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: + "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC", + }, { label: "On page load", subText: @@ -10225,6 +10243,12 @@ export const defaultAppState = { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: + "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC", + }, { label: "On page load", subText: diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index 1b87bbd97871..9a2f84a8b2ac 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -7,7 +7,6 @@ import { HTTP_PROTOCOL_VERSIONS, } from "PluginActionEditor/constants/CommonApiConstants"; import { - RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; @@ -21,7 +20,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: RUN_BEHAVIOR.MANUAL.label, + initialValue: "MANUAL", options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index b413defeab3e..780f1f22d814 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -1,5 +1,4 @@ import { - RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; @@ -13,7 +12,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: RUN_BEHAVIOR.MANUAL.label, + initialValue: "MANUAL", options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts index 45c9f0708765..ff0dfc07892d 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts @@ -2,26 +2,23 @@ import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export const RUN_BEHAVIOR_CONFIG_PROPERTY = "runBehaviour"; -export const RUN_BEHAVIOR = { - ON_PAGE_LOAD: { +export const RUN_BEHAVIOR_VALUES = [ + { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: ActionRunBehaviour.AUTOMATIC, + children: "Automatic", + }, + { label: "On page load", subText: "Query runs when the page loads or when manually triggered", value: ActionRunBehaviour.ON_PAGE_LOAD, children: "On page load", }, - MANUAL: { + { label: "Manual", subText: "Query only runs when called in an event or JS with .run()", value: ActionRunBehaviour.MANUAL, children: "Manual", }, -}; - -export const AUTOMATIC_RUN_BEHAVIOR = { - label: "Automatic", - subText: "Query runs on page load or when a variable it depends on changes", - value: ActionRunBehaviour.AUTOMATIC, - children: "Automatic", -}; - -export const RUN_BEHAVIOR_VALUES = Object.values(RUN_BEHAVIOR); +]; diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index 560a8ec64c8e..0b872e7c53d0 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -1,5 +1,4 @@ import { - RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; @@ -13,7 +12,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: RUN_BEHAVIOR.MANUAL.label, + initialValue: "MANUAL", options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index a68f4387fe7c..27608b3d8052 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -16,10 +16,7 @@ import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; import { type ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; import styled from "styled-components"; -import { - RUN_BEHAVIOR_VALUES, - AUTOMATIC_RUN_BEHAVIOR, -} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; const OptionLabel = styled(Text)` @@ -55,13 +52,8 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { "release_reactive_actions_enabled", ); - if (flagValueForReactiveActions) { - options = [ - AUTOMATIC_RUN_BEHAVIOR, - ...options.filter( - (option) => option.value !== AUTOMATIC_RUN_BEHAVIOR.value, - ), - ]; + if (!flagValueForReactiveActions) { + options = [...options.filter((option) => option.value !== "AUTOMATIC")]; } const onSelectOptions = useCallback( diff --git a/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json b/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json index 7b500b43447a..4a8c7eaf1496 100644 --- a/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json +++ b/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json @@ -2548,6 +2548,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2594,6 +2599,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2640,6 +2650,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2692,6 +2707,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2731,6 +2751,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2777,6 +2802,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2823,6 +2853,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", diff --git a/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json b/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json index b4d8f0b251a5..3a197ce6cef4 100644 --- a/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json +++ b/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json @@ -2547,6 +2547,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2593,6 +2598,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2639,6 +2649,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2691,6 +2706,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2730,6 +2750,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2776,6 +2801,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", @@ -2822,6 +2852,11 @@ "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ + { + "label": "Automatic", + "subText": "Query runs on page load or when a variable it depends on changes", + "value": "AUTOMATIC" + }, { "label": "On page load", "subText": "Query runs when the page loads or when manually triggered", diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index 3a1dcf781334..add433ca7d0a 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,16 +1,13 @@ import { objectKeys } from "@appsmith/utils"; import type { PluginType } from "entities/Plugin"; -import { - AUTOMATIC_RUN_BEHAVIOR, - RUN_BEHAVIOR_CONFIG_PROPERTY, -} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; export const updatePluginRunBehaviourForPluginSettings = ( pluginSettings: Record, flagValueForReactiveActions: boolean, ) => { - if (flagValueForReactiveActions) { + if (!flagValueForReactiveActions) { return objectKeys(pluginSettings).reduce( (acc: Record, pluginType) => { acc[pluginType] = pluginSettings[pluginType].map( @@ -25,10 +22,8 @@ export const updatePluginRunBehaviourForPluginSettings = ( return { ...child, options: [ - AUTOMATIC_RUN_BEHAVIOR, ...child.options.filter( - (option) => - option.value !== AUTOMATIC_RUN_BEHAVIOR.value, + (option) => option.value !== "AUTOMATIC", ), ], }; diff --git a/app/client/test/factories/MockPluginsState.ts b/app/client/test/factories/MockPluginsState.ts index f2c78870fc35..6d1b3991b794 100644 --- a/app/client/test/factories/MockPluginsState.ts +++ b/app/client/test/factories/MockPluginsState.ts @@ -6957,6 +6957,11 @@ export default { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC" + }, { label: "On page load", subText: @@ -7037,6 +7042,11 @@ export default { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC" + }, { label: "On page load", subText: @@ -7117,6 +7127,11 @@ export default { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC" + }, { label: "On page load", subText: @@ -7161,6 +7176,11 @@ export default { controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ + { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: "AUTOMATIC" + }, { label: "On page load", subText: diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json index b36da2b00704..9b5d6e185699 100644 --- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json index 2423dba973d5..664e50c657fe 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json index 2423dba973d5..664e50c657fe 100644 --- a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json index bc90ccb578ee..3bd55fa8e595 100644 --- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json index 2423dba973d5..664e50c657fe 100644 --- a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json index efa3507d602c..ee870c8646e6 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json index 782fa172f0cb..458aab4e1d26 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json index 463592e78b53..7b2d6ef719ec 100644 --- a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json index 463592e78b53..7b2d6ef719ec 100644 --- a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json index 2423dba973d5..664e50c657fe 100644 --- a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json index 1a0fe3a43d3b..906241476d0e 100755 --- a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", diff --git a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json index 463592e78b53..7b2d6ef719ec 100644 --- a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json @@ -4,29 +4,6 @@ "sectionName": "", "id": 1, "children": [ - { - "label": "Run behavior", - "configProperty": "runBehaviour", - "controlType": "DROP_DOWN", - "initialValue": "MANUAL", - "options": [ - { - "label": "On page load", - "subText": "Query runs when the page loads or when manually triggered", - "value": "ON_PAGE_LOAD" - }, - { - "label": "Manual", - "subText": "Query only runs when called in an event or JS with .run()", - "value": "MANUAL" - } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": false - } - }, { "label": "Run behavior", "configProperty": "runBehaviour", @@ -48,12 +25,7 @@ "subText": "Query only runs when called in an event or JS with .run()", "value": "MANUAL" } - ], - "hidden": { - "flagValue": "release_reactive_actions_enabled", - "comparison": "FEATURE_FLAG", - "value": true - } + ] }, { "label": "Request confirmation before running this query", From 43cc91c09dffe8716eefea964c991fd1084fcae9 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 9 May 2025 19:54:33 +0530 Subject: [PATCH 06/18] addressing coderrabbitai comments --- .../JSEditorToolbar/components/JSFunctionSettings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 27608b3d8052..d8af31da2af1 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -47,7 +47,6 @@ interface FunctionSettingsRowProps extends Omit { const FunctionSettingRow = (props: FunctionSettingsRowProps) => { const [runBehaviour, setRunBehaviour] = useState(props.action.runBehaviour); let options = RUN_BEHAVIOR_VALUES as SelectOptionProps[]; - const selectedValue = options.find((opt) => opt.value === runBehaviour); const flagValueForReactiveActions = useFeatureFlag( "release_reactive_actions_enabled", ); @@ -56,6 +55,8 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { options = [...options.filter((option) => option.value !== "AUTOMATIC")]; } + const selectedValue = options.find((opt) => opt.value === runBehaviour); + const onSelectOptions = useCallback( (newRunBehaviour: ActionRunBehaviourType) => { setRunBehaviour(newRunBehaviour); @@ -88,7 +89,6 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { Date: Sat, 10 May 2025 00:12:23 +0530 Subject: [PATCH 07/18] adding the filtering logic for automatic dropdown option only on frontend --- .../PluginActionContext.tsx | 3 +- .../PluginActionSettings/SettingsPopover.tsx | 15 +++- .../types/PluginActionTypes.ts | 2 +- .../src/ce/selectors/featureFlagsSelectors.ts | 6 +- .../formConfig/ApiSettingsConfig.ts | 3 +- .../formConfig/GoogleSheetsSettingsConfig.ts | 3 +- .../formConfig/QuerySettingsConfig.ts | 3 +- .../components/JSFunctionSettings.tsx | 11 ++- app/client/src/sagas/PluginSagas.ts | 6 +- app/client/src/utils/PluginUtils.ts | 82 +++++++++++-------- 10 files changed, 84 insertions(+), 50 deletions(-) diff --git a/app/client/src/PluginActionEditor/PluginActionContext.tsx b/app/client/src/PluginActionEditor/PluginActionContext.tsx index 6a4e3672dad8..af915fbdcf8e 100644 --- a/app/client/src/PluginActionEditor/PluginActionContext.tsx +++ b/app/client/src/PluginActionEditor/PluginActionContext.tsx @@ -8,12 +8,13 @@ import type { Action } from "entities/Action"; import type { Plugin } from "entities/Plugin"; import type { Datasource, EmbeddedRestDatasource } from "entities/Datasource"; import type { ActionResponse } from "api/ActionAPI"; +import type { PluginActionSettingsConfig } from "./types/PluginActionTypes"; interface PluginActionContextType { action: Action; actionResponse?: ActionResponse; editorConfig?: unknown[]; - settingsConfig?: unknown[]; + settingsConfig?: PluginActionSettingsConfig[]; plugin: Plugin; datasource?: EmbeddedRestDatasource | Datasource; } diff --git a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx index af8fc1658519..1d3f8f175751 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx @@ -8,7 +8,7 @@ import { API_EDITOR_TAB_TITLES, MORE_ON_QUERY_SETTINGS, } from "ee/constants/messages"; -import { useDispatch, useSelector } from "react-redux"; +import { useDispatch, useSelector, type DefaultRootState } from "react-redux"; import { isPluginActionSettingsOpen, openPluginActionSettings, @@ -16,6 +16,8 @@ import { import { THEME } from "../../types/PluginActionTypes"; import { type DocsLink, openDoc } from "constants/DocumentationLinks"; import { ToolbarSettingsPopover } from "IDE"; +import { updateRunBehaviourForActionSettings } from "utils/PluginUtils"; +import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; export interface SettingsProps { formName: string; @@ -41,6 +43,15 @@ const PluginActionSettingsPopover = (props: SettingsProps) => { const [isOpen, setIsOpen] = useState(false); const dispatch = useDispatch(); + const featureFlagEnabled: boolean = useSelector((state: DefaultRootState) => + selectFeatureFlagCheck(state, "release_reactive_actions_enabled"), + ); + + const updateSettingsConfig = updateRunBehaviourForActionSettings( + settingsConfig || [], + featureFlagEnabled, + ); + const handleOpenChange = useCallback( (open: boolean) => { setIsOpen(open); @@ -74,7 +85,7 @@ const PluginActionSettingsPopover = (props: SettingsProps) => { > diff --git a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts index 90c2e8f3b42f..9769cfb0b101 100644 --- a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts +++ b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts @@ -10,7 +10,7 @@ export enum ActionRunBehaviour { export type ActionRunBehaviourType = `${ActionRunBehaviour}`; -interface PluginActionSettingsConfigChildren { +export interface PluginActionSettingsConfigChildren { label: string; configProperty: string; controlType: string; diff --git a/app/client/src/ce/selectors/featureFlagsSelectors.ts b/app/client/src/ce/selectors/featureFlagsSelectors.ts index e6c554b49511..7d4ee2d4df18 100644 --- a/app/client/src/ce/selectors/featureFlagsSelectors.ts +++ b/app/client/src/ce/selectors/featureFlagsSelectors.ts @@ -5,7 +5,11 @@ import type { OverriddenFeatureFlags } from "utils/hooks/useFeatureFlagOverride" const combineFeatureFlags = memoize( (featureFlags: FeatureFlags, overriddenFlags: OverriddenFeatureFlags) => { - return { ...featureFlags, ...overriddenFlags }; + return { + ...featureFlags, + ...overriddenFlags, + release_reactive_actions_enabled: false, + }; }, ); diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index 9a2f84a8b2ac..c74936e79a4c 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -10,6 +10,7 @@ import { RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export default [ { @@ -20,7 +21,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: "MANUAL", + initialValue: ActionRunBehaviour.MANUAL, options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index 780f1f22d814..73a5ca299b2f 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -2,6 +2,7 @@ import { RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export default [ { @@ -12,7 +13,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: "MANUAL", + initialValue: ActionRunBehaviour.MANUAL, options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index 0b872e7c53d0..28611ae53012 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -2,6 +2,7 @@ import { RUN_BEHAVIOR_VALUES, RUN_BEHAVIOR_CONFIG_PROPERTY, } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export default [ { @@ -12,7 +13,7 @@ export default [ label: "Run behavior", configProperty: RUN_BEHAVIOR_CONFIG_PROPERTY, controlType: "DROP_DOWN", - initialValue: "MANUAL", + initialValue: ActionRunBehaviour.MANUAL, options: RUN_BEHAVIOR_VALUES, }, { diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index d8af31da2af1..489b6c12a9b4 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -46,15 +46,14 @@ interface FunctionSettingsRowProps extends Omit { const FunctionSettingRow = (props: FunctionSettingsRowProps) => { const [runBehaviour, setRunBehaviour] = useState(props.action.runBehaviour); - let options = RUN_BEHAVIOR_VALUES as SelectOptionProps[]; const flagValueForReactiveActions = useFeatureFlag( "release_reactive_actions_enabled", ); - - if (!flagValueForReactiveActions) { - options = [...options.filter((option) => option.value !== "AUTOMATIC")]; - } - + const options = RUN_BEHAVIOR_VALUES.filter( + (option) => + (option.value !== "AUTOMATIC" && !flagValueForReactiveActions) || + flagValueForReactiveActions, + ) as SelectOptionProps[]; const selectedValue = options.find((opt) => opt.value === runBehaviour); const onSelectOptions = useCallback( diff --git a/app/client/src/sagas/PluginSagas.ts b/app/client/src/sagas/PluginSagas.ts index c3eccd2b610a..96dda98a0ad2 100644 --- a/app/client/src/sagas/PluginSagas.ts +++ b/app/client/src/sagas/PluginSagas.ts @@ -45,7 +45,7 @@ import type { } from "utils/DynamicBindingUtils"; import type { ActionDataState } from "ee/reducers/entityReducers/actionsReducer"; import { getFromServerWhenNoPrefetchedResult } from "./helper"; -import { updatePluginRunBehaviourForPluginSettings } from "utils/PluginUtils"; +import { updateDefaultPluginSettings } from "utils/PluginUtils"; import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; function* fetchPluginsSaga( @@ -171,7 +171,7 @@ function* fetchPluginFormConfigsSaga(action?: { "release_reactive_actions_enabled", ); - const updatedPluginSettings = updatePluginRunBehaviourForPluginSettings( + const updatedPluginSettings = updateDefaultPluginSettings( defaultActionSettings, featureFlagEnabled, ); @@ -253,7 +253,7 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { "release_reactive_actions_enabled", ); - const updatedPluginSettings = updatePluginRunBehaviourForPluginSettings( + const updatedPluginSettings = updateDefaultPluginSettings( defaultActionSettings, featureFlagEnabled, ); diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index add433ca7d0a..b4cb458dd1df 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,45 +1,61 @@ -import { objectKeys } from "@appsmith/utils"; import type { PluginType } from "entities/Plugin"; import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; -import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; +import type { + PluginActionSettingsConfig, + PluginActionSettingsConfigChildren, +} from "PluginActionEditor/types/PluginActionTypes"; -export const updatePluginRunBehaviourForPluginSettings = ( +export const updateDefaultPluginSettings = ( pluginSettings: Record, flagValueForReactiveActions: boolean, -) => { +): Record => { if (!flagValueForReactiveActions) { - return objectKeys(pluginSettings).reduce( - (acc: Record, pluginType) => { - acc[pluginType] = pluginSettings[pluginType].map( - (plugin: PluginActionSettingsConfig) => { - return { - ...plugin, - children: plugin.children.map((child) => { - if ( - child.configProperty === RUN_BEHAVIOR_CONFIG_PROPERTY && - child.options - ) { - return { - ...child, - options: [ - ...child.options.filter( - (option) => option.value !== "AUTOMATIC", - ), - ], - }; - } + return Object.fromEntries( + Object.entries(pluginSettings).map(([pluginType, settings]) => { + let newSettings = settings; - return child; - }), - }; - }, - ); + if (newSettings.length > 0) { + newSettings = updateRunBehaviourForActionSettings( + settings, + flagValueForReactiveActions, + ); + } - return acc; - }, - pluginSettings, - ); + return [pluginType, newSettings]; + }), + ) as Record; } return pluginSettings; }; + +export const updateRunBehaviourForActionSettings = ( + pluginSettings: PluginActionSettingsConfig[], + flagValueForReactiveActions: boolean, +): PluginActionSettingsConfig[] => { + return pluginSettings.map((settings) => ({ + ...settings, + children: settings.children.map( + (settings: PluginActionSettingsConfigChildren) => { + if ( + settings.configProperty === RUN_BEHAVIOR_CONFIG_PROPERTY && + settings.options + ) { + return { + ...settings, + options: [ + ...settings.options.filter( + (option) => + (!flagValueForReactiveActions && + option.value !== "AUTOMATIC") || + flagValueForReactiveActions, + ), + ], + }; + } + + return settings; + }, + ), + })); +}; From 0823335202d6f7b7fbcf832fbe9b53e6153e63d6 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Sat, 10 May 2025 00:13:45 +0530 Subject: [PATCH 08/18] reverting a change --- app/client/src/ce/selectors/featureFlagsSelectors.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/client/src/ce/selectors/featureFlagsSelectors.ts b/app/client/src/ce/selectors/featureFlagsSelectors.ts index 7d4ee2d4df18..e6c554b49511 100644 --- a/app/client/src/ce/selectors/featureFlagsSelectors.ts +++ b/app/client/src/ce/selectors/featureFlagsSelectors.ts @@ -5,11 +5,7 @@ import type { OverriddenFeatureFlags } from "utils/hooks/useFeatureFlagOverride" const combineFeatureFlags = memoize( (featureFlags: FeatureFlags, overriddenFlags: OverriddenFeatureFlags) => { - return { - ...featureFlags, - ...overriddenFlags, - release_reactive_actions_enabled: false, - }; + return { ...featureFlags, ...overriddenFlags }; }, ); From db1eb04be2b1d1293bead30f8cfe02dedec334af Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Sat, 10 May 2025 00:33:05 +0530 Subject: [PATCH 09/18] fixing client build --- .../UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts index c017261fbccf..6bc03ad4ff72 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts @@ -7,6 +7,7 @@ import { getPathAndValueFromActionDiffObject } from "utils/getPathAndValueFromAc import { setActionProperty } from "actions/pluginActionActions"; import { usePluginActionContext } from "../../../../../PluginActionContext"; import { useDispatch } from "react-redux"; +import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; export const useGoogleSheetsSetDefaultProperty = () => { const { @@ -30,7 +31,9 @@ export const useGoogleSheetsSetDefaultProperty = () => { merge( initialValues, - getConfigInitialValues(settingsConfig as Record[]), + getConfigInitialValues( + settingsConfig as PluginActionSettingsConfig[], + ), ); // initialValues contains merge of action, editorConfig, settingsConfig and will be passed to redux form From 164db73f8c5e19afb6b91d86a1c30bea518f7c43 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Sat, 10 May 2025 02:21:11 +0530 Subject: [PATCH 10/18] minor refactoring --- .../PluginActionSettings/SettingsPopover.tsx | 15 ++-------- .../components/ActionSettings.tsx | 16 +++++++++-- app/client/src/sagas/PluginSagas.ts | 28 ++----------------- app/client/src/utils/PluginUtils.ts | 25 ----------------- 4 files changed, 19 insertions(+), 65 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx index 1d3f8f175751..af8fc1658519 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx @@ -8,7 +8,7 @@ import { API_EDITOR_TAB_TITLES, MORE_ON_QUERY_SETTINGS, } from "ee/constants/messages"; -import { useDispatch, useSelector, type DefaultRootState } from "react-redux"; +import { useDispatch, useSelector } from "react-redux"; import { isPluginActionSettingsOpen, openPluginActionSettings, @@ -16,8 +16,6 @@ import { import { THEME } from "../../types/PluginActionTypes"; import { type DocsLink, openDoc } from "constants/DocumentationLinks"; import { ToolbarSettingsPopover } from "IDE"; -import { updateRunBehaviourForActionSettings } from "utils/PluginUtils"; -import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; export interface SettingsProps { formName: string; @@ -43,15 +41,6 @@ const PluginActionSettingsPopover = (props: SettingsProps) => { const [isOpen, setIsOpen] = useState(false); const dispatch = useDispatch(); - const featureFlagEnabled: boolean = useSelector((state: DefaultRootState) => - selectFeatureFlagCheck(state, "release_reactive_actions_enabled"), - ); - - const updateSettingsConfig = updateRunBehaviourForActionSettings( - settingsConfig || [], - featureFlagEnabled, - ); - const handleOpenChange = useCallback( (open: boolean) => { setIsOpen(open); @@ -85,7 +74,7 @@ const PluginActionSettingsPopover = (props: SettingsProps) => { > diff --git a/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx b/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx index cccd1dfe1404..e18920d18182 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx @@ -6,6 +6,9 @@ import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorC import styled from "styled-components"; import { Text } from "@appsmith/ads"; import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper"; +import { useSelector, type DefaultRootState } from "react-redux"; +import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; +import { updateRunBehaviourForActionSettings } from "utils/PluginUtils"; interface ActionSettingsProps { // TODO: Fix this the next time the file is edited @@ -41,9 +44,18 @@ const ActionSettingsWrapper = styled.div` `; function ActionSettings(props: ActionSettingsProps): JSX.Element { + const featureFlagEnabled: boolean = useSelector((state: DefaultRootState) => + selectFeatureFlagCheck(state, "release_reactive_actions_enabled"), + ); + + const updateSettingsConfig = updateRunBehaviourForActionSettings( + props.actionSettingsConfig || [], + featureFlagEnabled, + ); + return ( - {!props.actionSettingsConfig ? ( + {!updateSettingsConfig ? ( Error: No settings config found @@ -52,7 +64,7 @@ function ActionSettings(props: ActionSettingsProps): JSX.Element { ) : ( /* TODO: Fix this the next time the file is edited */ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ - props.actionSettingsConfig.map((section: any) => + updateSettingsConfig.map((section: any) => renderEachConfig(section, props.formName), ) )} diff --git a/app/client/src/sagas/PluginSagas.ts b/app/client/src/sagas/PluginSagas.ts index 96dda98a0ad2..9c887c2c4907 100644 --- a/app/client/src/sagas/PluginSagas.ts +++ b/app/client/src/sagas/PluginSagas.ts @@ -45,8 +45,6 @@ import type { } from "utils/DynamicBindingUtils"; import type { ActionDataState } from "ee/reducers/entityReducers/actionsReducer"; import { getFromServerWhenNoPrefetchedResult } from "./helper"; -import { updateDefaultPluginSettings } from "utils/PluginUtils"; -import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; function* fetchPluginsSaga( action: ReduxAction< @@ -166,21 +164,11 @@ function* fetchPluginFormConfigsSaga(action?: { const dependencies: FormDependencyConfigs = {}; const datasourceFormButtonConfigs: FormDatasourceButtonConfigs = {}; - const featureFlagEnabled: boolean = yield select( - selectFeatureFlagCheck, - "release_reactive_actions_enabled", - ); - - const updatedPluginSettings = updateDefaultPluginSettings( - defaultActionSettings, - featureFlagEnabled, - ); - Array.from(pluginIdFormsToFetch).forEach((pluginId, index) => { const plugin = plugins.find((plugin) => plugin.id === pluginId); if (plugin && plugin.type === PluginType.JS) { - settingConfigs[pluginId] = updatedPluginSettings[plugin.type]; + settingConfigs[pluginId] = defaultActionSettings[plugin.type]; editorConfigs[pluginId] = defaultActionEditorConfigs[plugin.type]; formConfigs[pluginId] = []; dependencies[pluginId] = defaultActionDependenciesConfig[plugin.type]; @@ -198,7 +186,7 @@ function* fetchPluginFormConfigsSaga(action?: { // Action settings form if not available use default if (plugin && !pluginFormData[index].setting) { - settingConfigs[pluginId] = updatedPluginSettings[plugin.type]; + settingConfigs[pluginId] = defaultActionSettings[plugin.type]; } else { settingConfigs[pluginId] = pluginFormData[index].setting; } @@ -248,16 +236,6 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { pluginId, ); - const featureFlagEnabled: boolean = yield select( - selectFeatureFlagCheck, - "release_reactive_actions_enabled", - ); - - const updatedPluginSettings = updateDefaultPluginSettings( - defaultActionSettings, - featureFlagEnabled, - ); - if (!formConfig) { const formConfigResponse: ApiResponse = yield PluginApi.fetchFormConfig(pluginId); @@ -265,7 +243,7 @@ export function* checkAndGetPluginFormConfigsSaga(pluginId: string) { yield validateResponse(formConfigResponse); if (!formConfigResponse.data.setting) { - formConfigResponse.data.setting = updatedPluginSettings[plugin.type]; + formConfigResponse.data.setting = defaultActionSettings[plugin.type]; } if (!formConfigResponse.data.editor) { diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index b4cb458dd1df..c812e496822d 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,34 +1,9 @@ -import type { PluginType } from "entities/Plugin"; import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import type { PluginActionSettingsConfig, PluginActionSettingsConfigChildren, } from "PluginActionEditor/types/PluginActionTypes"; -export const updateDefaultPluginSettings = ( - pluginSettings: Record, - flagValueForReactiveActions: boolean, -): Record => { - if (!flagValueForReactiveActions) { - return Object.fromEntries( - Object.entries(pluginSettings).map(([pluginType, settings]) => { - let newSettings = settings; - - if (newSettings.length > 0) { - newSettings = updateRunBehaviourForActionSettings( - settings, - flagValueForReactiveActions, - ); - } - - return [pluginType, newSettings]; - }), - ) as Record; - } - - return pluginSettings; -}; - export const updateRunBehaviourForActionSettings = ( pluginSettings: PluginActionSettingsConfig[], flagValueForReactiveActions: boolean, From b88b3c2ac8f313f8e8965625d3cb7bdfb778410c Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 12 May 2025 12:16:47 +0530 Subject: [PATCH 11/18] updated the logic for filtering automatic run behaviour --- .../formConfig/PluginSettings.ts | 13 ++++++------ .../components/JSFunctionSettings.tsx | 21 ++++++++----------- app/client/src/utils/PluginUtils.ts | 20 +++++++----------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts index 45c9f0708765..919469772525 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts @@ -3,6 +3,12 @@ import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export const RUN_BEHAVIOR_CONFIG_PROPERTY = "runBehaviour"; export const RUN_BEHAVIOR = { + AUTOMATIC: { + label: "Automatic", + subText: "Query runs on page load or when a variable it depends on changes", + value: ActionRunBehaviour.AUTOMATIC, + children: "Automatic", + }, ON_PAGE_LOAD: { label: "On page load", subText: "Query runs when the page loads or when manually triggered", @@ -17,11 +23,4 @@ export const RUN_BEHAVIOR = { }, }; -export const AUTOMATIC_RUN_BEHAVIOR = { - label: "Automatic", - subText: "Query runs on page load or when a variable it depends on changes", - value: ActionRunBehaviour.AUTOMATIC, - children: "Automatic", -}; - export const RUN_BEHAVIOR_VALUES = Object.values(RUN_BEHAVIOR); diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index a68f4387fe7c..928d8dfc15f1 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -14,12 +14,12 @@ import { } from "ee/constants/messages"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; -import { type ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; -import styled from "styled-components"; import { - RUN_BEHAVIOR_VALUES, - AUTOMATIC_RUN_BEHAVIOR, -} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; + ActionRunBehaviour, + type ActionRunBehaviourType, +} from "PluginActionEditor/types/PluginActionTypes"; +import styled from "styled-components"; +import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; const OptionLabel = styled(Text)` @@ -55,13 +55,10 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { "release_reactive_actions_enabled", ); - if (flagValueForReactiveActions) { - options = [ - AUTOMATIC_RUN_BEHAVIOR, - ...options.filter( - (option) => option.value !== AUTOMATIC_RUN_BEHAVIOR.value, - ), - ]; + if (!flagValueForReactiveActions) { + options = options.filter( + (option) => option.value !== ActionRunBehaviour.AUTOMATIC, + ); } const onSelectOptions = useCallback( diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index 3a1dcf781334..10bc0d989256 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,16 +1,16 @@ import { objectKeys } from "@appsmith/utils"; import type { PluginType } from "entities/Plugin"; +import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { - AUTOMATIC_RUN_BEHAVIOR, - RUN_BEHAVIOR_CONFIG_PROPERTY, -} from "constants/AppsmithActionConstants/formConfig/PluginSettings"; -import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; + ActionRunBehaviour, + type PluginActionSettingsConfig, +} from "PluginActionEditor/types/PluginActionTypes"; export const updatePluginRunBehaviourForPluginSettings = ( pluginSettings: Record, flagValueForReactiveActions: boolean, ) => { - if (flagValueForReactiveActions) { + if (!flagValueForReactiveActions) { return objectKeys(pluginSettings).reduce( (acc: Record, pluginType) => { acc[pluginType] = pluginSettings[pluginType].map( @@ -24,13 +24,9 @@ export const updatePluginRunBehaviourForPluginSettings = ( ) { return { ...child, - options: [ - AUTOMATIC_RUN_BEHAVIOR, - ...child.options.filter( - (option) => - option.value !== AUTOMATIC_RUN_BEHAVIOR.value, - ), - ], + options: child.options.filter( + (option) => option.value !== ActionRunBehaviour.AUTOMATIC, + ), }; } From 45a3faecd376ecccb91bf3621ff3f52502cfcc60 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 12 May 2025 12:58:09 +0530 Subject: [PATCH 12/18] addressing review comments --- app/client/src/utils/PluginUtils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index c812e496822d..35c8817a32a7 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,7 +1,8 @@ import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; -import type { - PluginActionSettingsConfig, - PluginActionSettingsConfigChildren, +import { + ActionRunBehaviour, + type PluginActionSettingsConfig, + type PluginActionSettingsConfigChildren, } from "PluginActionEditor/types/PluginActionTypes"; export const updateRunBehaviourForActionSettings = ( @@ -22,7 +23,7 @@ export const updateRunBehaviourForActionSettings = ( ...settings.options.filter( (option) => (!flagValueForReactiveActions && - option.value !== "AUTOMATIC") || + option.value !== ActionRunBehaviour.AUTOMATIC) || flagValueForReactiveActions, ), ], From 7929ff86a573eebd6d13d54a5ebc329020a8168f Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 12 May 2025 12:59:32 +0530 Subject: [PATCH 13/18] addressing review comments --- .../JSEditorToolbar/components/JSFunctionSettings.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 489b6c12a9b4..18d5b3f206bf 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -14,7 +14,10 @@ import { } from "ee/constants/messages"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; -import { type ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; +import { + ActionRunBehaviour, + type ActionRunBehaviourType, +} from "PluginActionEditor/types/PluginActionTypes"; import styled from "styled-components"; import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; @@ -51,7 +54,8 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { ); const options = RUN_BEHAVIOR_VALUES.filter( (option) => - (option.value !== "AUTOMATIC" && !flagValueForReactiveActions) || + (option.value !== ActionRunBehaviour.AUTOMATIC && + !flagValueForReactiveActions) || flagValueForReactiveActions, ) as SelectOptionProps[]; const selectedValue = options.find((opt) => opt.value === runBehaviour); From 45fead2da78a652c509284108f0ac922b0de5cf4 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 12 May 2025 13:02:04 +0530 Subject: [PATCH 14/18] addressing review comments --- .../PluginActionEditor/types/PluginActionTypes.ts | 6 +++--- app/client/src/utils/PluginUtils.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts index 9769cfb0b101..f81d82a24857 100644 --- a/app/client/src/PluginActionEditor/types/PluginActionTypes.ts +++ b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts @@ -10,7 +10,7 @@ export enum ActionRunBehaviour { export type ActionRunBehaviourType = `${ActionRunBehaviour}`; -export interface PluginActionSettingsConfigChildren { +export interface ActionSettingsConfigChildren { label: string; configProperty: string; controlType: string; @@ -23,8 +23,8 @@ export interface PluginActionSettingsConfigChildren { name?: string; } -export interface PluginActionSettingsConfig { +export interface ActionSettingsConfig { sectionName: string; id: number; - children: PluginActionSettingsConfigChildren[]; + children: ActionSettingsConfigChildren[]; } diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index 35c8817a32a7..1fe73696a1ec 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -1,18 +1,18 @@ import { RUN_BEHAVIOR_CONFIG_PROPERTY } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { ActionRunBehaviour, - type PluginActionSettingsConfig, - type PluginActionSettingsConfigChildren, + type ActionSettingsConfig, + type ActionSettingsConfigChildren, } from "PluginActionEditor/types/PluginActionTypes"; export const updateRunBehaviourForActionSettings = ( - pluginSettings: PluginActionSettingsConfig[], + actionSettings: ActionSettingsConfig[], flagValueForReactiveActions: boolean, -): PluginActionSettingsConfig[] => { - return pluginSettings.map((settings) => ({ +): ActionSettingsConfig[] => { + return actionSettings.map((settings) => ({ ...settings, children: settings.children.map( - (settings: PluginActionSettingsConfigChildren) => { + (settings: ActionSettingsConfigChildren) => { if ( settings.configProperty === RUN_BEHAVIOR_CONFIG_PROPERTY && settings.options From 372a411d4a7be362adac4f2644377f6107dd5264 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 12 May 2025 13:19:49 +0530 Subject: [PATCH 15/18] addressing review comments --- .../JSEditorToolbar/components/JSFunctionSettings.tsx | 5 ++--- app/client/src/utils/PluginUtils.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 18d5b3f206bf..7c2aa679996b 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -54,9 +54,8 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { ); const options = RUN_BEHAVIOR_VALUES.filter( (option) => - (option.value !== ActionRunBehaviour.AUTOMATIC && - !flagValueForReactiveActions) || - flagValueForReactiveActions, + flagValueForReactiveActions || + option.value !== ActionRunBehaviour.AUTOMATIC, ) as SelectOptionProps[]; const selectedValue = options.find((opt) => opt.value === runBehaviour); diff --git a/app/client/src/utils/PluginUtils.ts b/app/client/src/utils/PluginUtils.ts index 1fe73696a1ec..72aaaa9ccb1d 100644 --- a/app/client/src/utils/PluginUtils.ts +++ b/app/client/src/utils/PluginUtils.ts @@ -22,9 +22,8 @@ export const updateRunBehaviourForActionSettings = ( options: [ ...settings.options.filter( (option) => - (!flagValueForReactiveActions && - option.value !== ActionRunBehaviour.AUTOMATIC) || - flagValueForReactiveActions, + flagValueForReactiveActions || + option.value !== ActionRunBehaviour.AUTOMATIC, ), ], }; From 7220957c7d941e2a162d0eacf4c6f5947db9aab7 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Tue, 13 May 2025 13:36:09 +0530 Subject: [PATCH 16/18] fixing client build --- .../PluginActionContext.tsx | 4 +-- .../useGoogleSheetsSetDefaultProperty.ts | 6 ++--- .../ActionConstants.tsx | 26 +++++++++---------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/app/client/src/PluginActionEditor/PluginActionContext.tsx b/app/client/src/PluginActionEditor/PluginActionContext.tsx index af915fbdcf8e..f267494aed3d 100644 --- a/app/client/src/PluginActionEditor/PluginActionContext.tsx +++ b/app/client/src/PluginActionEditor/PluginActionContext.tsx @@ -8,13 +8,13 @@ import type { Action } from "entities/Action"; import type { Plugin } from "entities/Plugin"; import type { Datasource, EmbeddedRestDatasource } from "entities/Datasource"; import type { ActionResponse } from "api/ActionAPI"; -import type { PluginActionSettingsConfig } from "./types/PluginActionTypes"; +import type { ActionSettingsConfig } from "./types/PluginActionTypes"; interface PluginActionContextType { action: Action; actionResponse?: ActionResponse; editorConfig?: unknown[]; - settingsConfig?: PluginActionSettingsConfig[]; + settingsConfig?: ActionSettingsConfig[]; plugin: Plugin; datasource?: EmbeddedRestDatasource | Datasource; } diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts index 6bc03ad4ff72..e012233f4673 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts @@ -7,7 +7,7 @@ import { getPathAndValueFromActionDiffObject } from "utils/getPathAndValueFromAc import { setActionProperty } from "actions/pluginActionActions"; import { usePluginActionContext } from "../../../../../PluginActionContext"; import { useDispatch } from "react-redux"; -import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; +import type { ActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; export const useGoogleSheetsSetDefaultProperty = () => { const { @@ -31,9 +31,7 @@ export const useGoogleSheetsSetDefaultProperty = () => { merge( initialValues, - getConfigInitialValues( - settingsConfig as PluginActionSettingsConfig[], - ), + getConfigInitialValues(settingsConfig as ActionSettingsConfig[]), ); // initialValues contains merge of action, editorConfig, settingsConfig and will be passed to redux form diff --git a/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx b/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx index c4dcd7925cf9..f630158f95a8 100644 --- a/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx +++ b/app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx @@ -8,7 +8,7 @@ import saasActionSettingsConfig from "constants/AppsmithActionConstants/formConf import apiActionDependencyConfig from "constants/AppsmithActionConstants/formConfig/ApiDependencyConfigs"; import apiActionDatasourceFormButtonConfig from "constants/AppsmithActionConstants/formConfig/ApiDatasourceFormsButtonConfig"; import type { EntityTypeValue } from "ee/entities/DataTree/types"; -import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; +import type { ActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes"; export interface ExecuteActionPayloadEvent { type: EventType; @@ -167,19 +167,17 @@ export const POSTMAN = "POSTMAN"; export const CURL = "CURL"; export const Swagger = "Swagger"; -export const defaultActionSettings: Record< - PluginType, - PluginActionSettingsConfig[] -> = { - [PluginType.API]: apiActionSettingsConfig, - [PluginType.DB]: queryActionSettingsConfig, - [PluginType.SAAS]: saasActionSettingsConfig, - [PluginType.REMOTE]: saasActionSettingsConfig, - [PluginType.JS]: [], - [PluginType.AI]: saasActionSettingsConfig, - [PluginType.INTERNAL]: saasActionSettingsConfig, - [PluginType.EXTERNAL_SAAS]: saasActionSettingsConfig, -}; +export const defaultActionSettings: Record = + { + [PluginType.API]: apiActionSettingsConfig, + [PluginType.DB]: queryActionSettingsConfig, + [PluginType.SAAS]: saasActionSettingsConfig, + [PluginType.REMOTE]: saasActionSettingsConfig, + [PluginType.JS]: [], + [PluginType.AI]: saasActionSettingsConfig, + [PluginType.INTERNAL]: saasActionSettingsConfig, + [PluginType.EXTERNAL_SAAS]: saasActionSettingsConfig, + }; // TODO: Fix this the next time the file is edited // eslint-disable-next-line @typescript-eslint/no-explicit-any From fe8f0aa8a46a2707120dd74232c0a055395cb3d5 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 16 May 2025 14:05:08 +0530 Subject: [PATCH 17/18] addressing review comment --- .../PluginActionToolbar/components/ActionSettings.tsx | 6 +++++- .../JSEditorToolbar/components/JSFunctionSettings.tsx | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx b/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx index e18920d18182..888a6eb9a5f5 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx @@ -9,6 +9,7 @@ import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper"; import { useSelector, type DefaultRootState } from "react-redux"; import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors"; import { updateRunBehaviourForActionSettings } from "utils/PluginUtils"; +import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; interface ActionSettingsProps { // TODO: Fix this the next time the file is edited @@ -45,7 +46,10 @@ const ActionSettingsWrapper = styled.div` function ActionSettings(props: ActionSettingsProps): JSX.Element { const featureFlagEnabled: boolean = useSelector((state: DefaultRootState) => - selectFeatureFlagCheck(state, "release_reactive_actions_enabled"), + selectFeatureFlagCheck( + state, + FEATURE_FLAG.release_reactive_actions_enabled, + ), ); const updateSettingsConfig = updateRunBehaviourForActionSettings( diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 7c2aa679996b..165151b9012d 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -21,6 +21,7 @@ import { import styled from "styled-components"; import { RUN_BEHAVIOR_VALUES } from "constants/AppsmithActionConstants/formConfig/PluginSettings"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; +import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; const OptionLabel = styled(Text)` color: var(--ads-v2-color-fg); @@ -50,7 +51,7 @@ interface FunctionSettingsRowProps extends Omit { const FunctionSettingRow = (props: FunctionSettingsRowProps) => { const [runBehaviour, setRunBehaviour] = useState(props.action.runBehaviour); const flagValueForReactiveActions = useFeatureFlag( - "release_reactive_actions_enabled", + FEATURE_FLAG.release_reactive_actions_enabled, ); const options = RUN_BEHAVIOR_VALUES.filter( (option) => From 4c4074ca8e36222c822f0a6addbe4a81aaa605eb Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 16 May 2025 15:08:29 +0530 Subject: [PATCH 18/18] reverting a file change --- app/client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/package.json b/app/client/package.json index ed8fedee4899..b7bb16bbf1b9 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -427,4 +427,4 @@ "axios": "^1.8.3", "esbuild": "^0.25.1" } -} +} \ No newline at end of file