From 34e3401ebc07eadf1993cebe9e3e8e20c4e22f9f Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 20 Jan 2025 11:19:36 +0530 Subject: [PATCH 1/5] chore: Remove style from editor and setting config --- .../PluginActionSettings/SettingsPopover.tsx | 9 ------- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/editor/chat.json | 26 +++++++------------ .../src/main/resources/editor/vision.json | 20 ++++++-------- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/form.json | 6 ----- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- .../src/main/resources/setting.json | 3 +-- 16 files changed, 29 insertions(+), 68 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx index cbc5bb9ae1b0..d8d88c368a02 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx @@ -23,19 +23,10 @@ export interface SettingsProps { dataTestId?: string; } -/* TODO: Remove this after removing custom width from server side (Ankita) */ const SettingsWrapper = styled.div` display: flex; flex-direction: column; gap: var(--ads-v2-spaces-4); - - .t--form-control-INPUT_TEXT, - .t--form-control-DROP_DOWN { - > div { - min-width: unset; - width: 100%; - } - } `; const LearnMoreLink = styled(Link)` 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 cb5ad8bfc24f..b7cc1753e1b5 100644 --- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json index a1621376380e..66d6f58f0aac 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json @@ -21,7 +21,9 @@ "placeholderText": "All models will be fetched.", "fetchOptionsConditionally": true, "setFirstOptionAsDefault": true, - "alternateViewTypes": ["json"], + "alternateViewTypes": [ + "json" + ], "conditionals": { "enable": "{{true}}", "fetchDynamicValues": { @@ -44,11 +46,7 @@ "controlType": "INPUT_TEXT", "initialValue": "256", "isRequired": true, - "dataType": "NUMBER", - "customStyles": { - "width": "270px", - "minWidth": "270px" - } + "dataType": "NUMBER" } ] }, @@ -63,11 +61,7 @@ "controlType": "QUERY_DYNAMIC_TEXT", "placeholderText": "Write some text or use {{ }} to reference a dynamic text value", "initialValue": "", - "isRequired": false, - "customStyles": { - "width": "590px", - "minWidth": "400px" - } + "isRequired": false }, { "label": "Messages", @@ -78,7 +72,9 @@ "configProperty": "actionConfiguration.formData.messages.data", "controlType": "ARRAY_FIELD", "addMoreButtonLabel": "Add message", - "alternateViewTypes": ["json"], + "alternateViewTypes": [ + "json" + ], "schema": [ { "label": "Role", @@ -118,11 +114,7 @@ "controlType": "INPUT_TEXT", "dataType": "NUMBER", "initialValue": "1", - "isRequired": false, - "customStyles": { - "width": "270px", - "minWidth": "270px" - } + "isRequired": false } ] } diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json index 282ddac5355b..18ab97420815 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json @@ -21,7 +21,9 @@ "placeholderText": "All models will be fetched.", "fetchOptionsConditionally": true, "setFirstOptionAsDefault": true, - "alternateViewTypes": ["json"], + "alternateViewTypes": [ + "json" + ], "conditionals": { "enable": "{{true}}", "fetchDynamicValues": { @@ -44,11 +46,7 @@ "controlType": "INPUT_TEXT", "initialValue": "256", "isRequired": true, - "dataType": "NUMBER", - "customStyles": { - "width": "270px", - "minWidth": "270px" - } + "dataType": "NUMBER" } ] }, @@ -74,7 +72,9 @@ "configProperty": "actionConfiguration.formData.messages.data", "controlType": "ARRAY_FIELD", "addMoreButtonLabel": "Add message", - "alternateViewTypes": ["json"], + "alternateViewTypes": [ + "json" + ], "schema": [ { "label": "Role", @@ -130,11 +130,7 @@ "controlType": "INPUT_TEXT", "dataType": "NUMBER", "initialValue": "1", - "isRequired": false, - "customStyles": { - "width": "270px", - "minWidth": "270px" - } + "isRequired": false } ] } 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 f24806929a67..7fb951ba3a07 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json @@ -21,8 +21,7 @@ "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", "initialValue": 60000, - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 f24806929a67..7fb951ba3a07 100644 --- a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json @@ -21,8 +21,7 @@ "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", "initialValue": 60000, - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 10edd6468460..83026f023cf8 100644 --- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 f24806929a67..7fb951ba3a07 100644 --- a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json @@ -21,8 +21,7 @@ "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", "initialValue": 60000, - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json index 9d8c67c9ffc8..c48f7ad9e163 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json @@ -53,9 +53,6 @@ } ], "initialValue": "https://www.googleapis.com/auth/drive.file", - "customStyles": { - "width": "340px" - }, "hidden": { "flagValue": "release_gs_all_sheets_options_enabled", "comparison": "FEATURE_FLAG", @@ -73,9 +70,6 @@ } ], "initialValue": "https://www.googleapis.com/auth/drive.file", - "customStyles": { - "width": "340px" - }, "hidden": { "flagValue": "release_gs_all_sheets_options_enabled", "comparison": "FEATURE_FLAG", 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 ac19bcf35b43..e3c0e476cd4b 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 7c673d6df3e1..6ff7548ee5a4 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 3796dc7c50f8..105a4b98b6a4 100644 --- a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 3796dc7c50f8..105a4b98b6a4 100644 --- a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 f24806929a67..7fb951ba3a07 100644 --- a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json @@ -21,8 +21,7 @@ "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", "initialValue": 60000, - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 e75716975b22..5976f0c624fc 100755 --- a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } 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 3796dc7c50f8..105a4b98b6a4 100644 --- a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json @@ -27,8 +27,7 @@ "subtitle": "Maximum time after which the query will return", "configProperty": "actionConfiguration.timeoutInMillisecond", "controlType": "INPUT_TEXT", - "dataType": "NUMBER", - "width": "270px" + "dataType": "NUMBER" } ] } From 07f6a4309547853d1ebab4041e368408607c5878 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 20 Jan 2025 12:47:23 +0530 Subject: [PATCH 2/5] fix: mvn spotless check --- .../ActionForm/Zone/styles.module.css | 48 ++----------------- .../components/UQIEditor/FormRender.tsx | 16 ++----- .../formControls/DropDownControl.tsx | 13 +---- .../formControls/DynamicInputTextControl.tsx | 23 ++------- .../formControls/DynamicTextFieldControl.tsx | 2 +- .../formControls/FieldArrayControl.tsx | 7 +-- .../formControls/InputTextControl.tsx | 3 +- .../src/main/resources/editor/chat.json | 8 +--- .../src/main/resources/editor/vision.json | 8 +--- 9 files changed, 22 insertions(+), 106 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css index 9f616da7c93b..80d12e9a410a 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css @@ -17,60 +17,20 @@ } /* - This section can be removed once the condition abouve each is resolved + This section can be removed once the condition below each is resolved */ - /* 1. Margin is removed from FieldWrapper component in FormRender file */ - & :global(.uqi-form-wrapper) { - margin: 0; - } - /* DropdownControl default width is removed */ - & :global(.uqi-dropdown-select) { - width: unset !important; - } - /* InputTexctControl min,max and width removed */ - & :global(.uqi-input-text) { - width: unset !important; - min-width: unset !important; - max-width: unset !important; - } - /* FieldArrayControl hardcoded width is removed */ - & :global(.t--form-control-ARRAY_FIELD) { - & :global(.t--form-control-QUERY_DYNAMIC_INPUT_TEXT) > div { - width: unset !important; - } - - & > div { - width: 100% !important; - - & > :global(.array-control-secondary-box) { - width: 100% !important; - - & > div { - flex: 1; - } - } - } - } - - /* DynamicInputTextControl min height and width removed */ - & :global(.uqi-dynamic-input-text) { - width: unset !important; - min-height: unset !important; - } - - /* Remove when code editor min width is resolved in DynamicTextFeildControl */ - & :global(.dynamic-text-field-control) { - min-width: 260px; - } /* reset ads select min width */ + & :global(.ads-v2-select > .rc-select-selector) { min-width: unset; } /* Remove this once the config in DB is updated to use Section and Zone (Twilio, Airtable) */ + & :global(.ar-form-info-text) { max-width: unset; } + /* Removable section ends here */ } diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx index 2666f2eb2b92..f3eb7e177f9e 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx @@ -69,10 +69,6 @@ const StyledSpinner = styled(Spinner)` width: 5vw; `; -const FieldWrapper = styled.div` - margin-top: 15px; -`; - const FormRender = (props: Props) => { const { editorConfig, formData, formEvaluationState, formName, uiComponent } = props; @@ -179,13 +175,9 @@ const FormRender = (props: Props) => { const modifiedSection = modifySectionConfig(section, enabled); return ( - // TODO: Remove classname once action redesign epic is done - +
- +
); } catch (e) { log.error(e); @@ -245,7 +237,7 @@ const FormRender = (props: Props) => { const { configProperty } = formControlOrSection; return ( - @@ -253,7 +245,7 @@ const FormRender = (props: Props) => { config={formControlOrSection} formName={formName} /> - + ); } catch (e) { log.error(e); diff --git a/app/client/src/components/formControls/DropDownControl.tsx b/app/client/src/components/formControls/DropDownControl.tsx index 972040517348..cf4796e2cedd 100644 --- a/app/client/src/components/formControls/DropDownControl.tsx +++ b/app/client/src/components/formControls/DropDownControl.tsx @@ -1,7 +1,6 @@ import React from "react"; import type { ControlProps } from "./BaseControl"; import BaseControl from "./BaseControl"; -import styled from "styled-components"; import type { ControlType } from "constants/PropertyControlConstants"; import { get, isEmpty, isNil } from "lodash"; import type { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; @@ -19,13 +18,6 @@ import type { Action } from "entities/Action"; import type { SelectOptionProps } from "@appsmith/ads"; import { Icon, Option, Select } from "@appsmith/ads"; -const DropdownSelect = styled.div<{ - width: string; -}>` - /* font-size: 14px; */ - width: ${(props) => (props?.width ? props?.width : "270px")}; -`; - class DropDownControl extends BaseControl { componentDidUpdate(prevProps: Props) { // if options received by the fetchDynamicValues for the multi select changes, update the config property path's values. @@ -93,11 +85,10 @@ class DropDownControl extends BaseControl { }; return ( - { props={{ ...this.props, width: styles.width }} type={this.props?.isMultiSelect ? "select-multiple" : undefined} /> - + ); } diff --git a/app/client/src/components/formControls/DynamicInputTextControl.tsx b/app/client/src/components/formControls/DynamicInputTextControl.tsx index 9c5e21f02932..c67bfcf2de7c 100644 --- a/app/client/src/components/formControls/DynamicInputTextControl.tsx +++ b/app/client/src/components/formControls/DynamicInputTextControl.tsx @@ -13,7 +13,6 @@ import { EditorSize, } from "components/editorComponents/CodeEditor/EditorConfig"; import styled from "styled-components"; -import _ from "lodash"; // Enum for the different types of input fields export enum INPUT_TEXT_INPUT_TYPES { @@ -27,13 +26,16 @@ const StyledDynamicTextField = styled(DynamicTextField)` .CodeEditorTarget .CodeMirror.CodeMirror-wrap { background-color: var(--ads-v2-color-bg); } + .CodeEditorTarget .CodeMirror.CodeMirror-wrap:hover { background-color: var(--ads-v2-color-bg); border-color: var(--ads-v2-color-border-emphasis); } + &&& .t--code-editor-wrapper { border: none; } + .CodeEditorTarget { border-radius: var(--ads-v2-border-radius); } @@ -73,25 +75,8 @@ export function InputText(props: { }; } - let customStyle = { width: "270px", minHeight: "36px" }; - - if (!!props.customStyles && _.isEmpty(props.customStyles) === false) { - customStyle = { ...props.customStyles }; - - if ("width" in props.customStyles) { - customStyle.width = props.customStyles.width; - } - - if ("minHeight" in props.customStyles) { - customStyle.minHeight = props.customStyles.minHeight; - } - } - return ( -
+
{/*
*/} div { + flex: 1; margin-right: 8px; margin-bottom: 8px; } - & > .t--form-control-QUERY_DYNAMIC_INPUT_TEXT > div { - width: 20vw !important; - } - & > .t--form-control-DROP_DOWN, & > .t--form-control-DROP_DOWN > div > div, & > .t--form-control-DROP_DOWN > div > div > div > div { diff --git a/app/client/src/components/formControls/InputTextControl.tsx b/app/client/src/components/formControls/InputTextControl.tsx index 6d91e80f067a..466b8d960b98 100644 --- a/app/client/src/components/formControls/InputTextControl.tsx +++ b/app/client/src/components/formControls/InputTextControl.tsx @@ -23,8 +23,6 @@ const FieldWrapper = styled.div<{ width: string; }>` position: relative; - min-width: ${(props) => (props?.width ? props.width : "380px")}; - max-width: 545px; width: ${(props) => (props?.width ? props.width : "")}; `; @@ -193,6 +191,7 @@ class InputTextControl extends BaseControl { return "text"; } } + getControlType(): ControlType { return "INPUT_TEXT"; } diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json index 66d6f58f0aac..b212efd4e0ff 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json @@ -21,9 +21,7 @@ "placeholderText": "All models will be fetched.", "fetchOptionsConditionally": true, "setFirstOptionAsDefault": true, - "alternateViewTypes": [ - "json" - ], + "alternateViewTypes": ["json"], "conditionals": { "enable": "{{true}}", "fetchDynamicValues": { @@ -72,9 +70,7 @@ "configProperty": "actionConfiguration.formData.messages.data", "controlType": "ARRAY_FIELD", "addMoreButtonLabel": "Add message", - "alternateViewTypes": [ - "json" - ], + "alternateViewTypes": ["json"], "schema": [ { "label": "Role", diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json index 18ab97420815..74fe25a4f8db 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json @@ -21,9 +21,7 @@ "placeholderText": "All models will be fetched.", "fetchOptionsConditionally": true, "setFirstOptionAsDefault": true, - "alternateViewTypes": [ - "json" - ], + "alternateViewTypes": ["json"], "conditionals": { "enable": "{{true}}", "fetchDynamicValues": { @@ -72,9 +70,7 @@ "configProperty": "actionConfiguration.formData.messages.data", "controlType": "ARRAY_FIELD", "addMoreButtonLabel": "Add message", - "alternateViewTypes": [ - "json" - ], + "alternateViewTypes": ["json"], "schema": [ { "label": "Role", From 37a112206e0cc8e00e18bd200db23a9451dbf8b7 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 20 Jan 2025 12:57:23 +0530 Subject: [PATCH 3/5] chore: remove wrapper of FormControl --- .../components/UQIEditor/FormRender.tsx | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx index f3eb7e177f9e..8d7316a0badc 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx @@ -175,9 +175,11 @@ const FormRender = (props: Props) => { const modifiedSection = modifySectionConfig(section, enabled); return ( -
- -
+ ); } catch (e) { log.error(e); @@ -237,15 +239,11 @@ const FormRender = (props: Props) => { const { configProperty } = formControlOrSection; return ( -
- -
+ /> ); } catch (e) { log.error(e); From 76225f65b637a0a5248effc3f6877ea55dca75de Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 20 Jan 2025 15:45:30 +0530 Subject: [PATCH 4/5] chore: Address review comments --- .../ActionForm/Zone/styles.module.css | 6 +++++ .../components/UQIEditor/FormRender.tsx | 26 +++++++++++++------ .../formControls/DynamicTextFieldControl.tsx | 10 +++---- .../formConfig/QuerySettingsConfig.ts | 1 - 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css index 80d12e9a410a..d0f508e8b725 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Zone/styles.module.css @@ -20,6 +20,12 @@ This section can be removed once the condition below each is resolved */ + /* 1. Margin is removed from FieldWrapper component in FormRender file */ + + & :global(.uqi-form-wrapper) { + margin: 0; + } + /* reset ads select min width */ & :global(.ads-v2-select > .rc-select-selector) { diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx index 8d7316a0badc..644c090f73a8 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx @@ -69,6 +69,10 @@ const StyledSpinner = styled(Spinner)` width: 5vw; `; +const FieldWrapper = styled.div` + margin-top: 15px; +`; + const FormRender = (props: Props) => { const { editorConfig, formData, formEvaluationState, formName, uiComponent } = props; @@ -175,11 +179,13 @@ const FormRender = (props: Props) => { const modifiedSection = modifySectionConfig(section, enabled); return ( - + > + + ); } catch (e) { log.error(e); @@ -239,11 +245,15 @@ const FormRender = (props: Props) => { const { configProperty } = formControlOrSection; return ( - + > + + ); } catch (e) { log.error(e); diff --git a/app/client/src/components/formControls/DynamicTextFieldControl.tsx b/app/client/src/components/formControls/DynamicTextFieldControl.tsx index e0643d697421..da59dceb1bcb 100644 --- a/app/client/src/components/formControls/DynamicTextFieldControl.tsx +++ b/app/client/src/components/formControls/DynamicTextFieldControl.tsx @@ -23,9 +23,9 @@ import { getSqlEditorModeFromPluginName } from "components/editorComponents/Code import { Flex } from "@appsmith/ads"; const Wrapper = styled.div` - min-width: 380px; + min-width: 260px; width: 100%; - min-height: 260px; + min-height: 200px; height: 100%; display: flex; `; @@ -55,7 +55,6 @@ class DynamicTextControl extends BaseControl< actionName, configProperty, evaluationSubstitutionType, - isActionRedesignEnabled, placeholderText, pluginName, responseType, @@ -78,9 +77,7 @@ class DynamicTextControl extends BaseControl< mode={mode} name={this.props.configProperty} placeholder={placeholderText} - showLineNumbers={ - isActionRedesignEnabled || this.props.showLineNumbers - } + showLineNumbers size={EditorSize.EXTENDED} tabBehaviour={TabBehaviour.INDENT} /> @@ -98,7 +95,6 @@ export interface DynamicTextFieldProps extends ControlProps { evaluationSubstitutionType: EvaluationSubstitutionType; mutedHinting?: boolean; pluginName: string; - isActionRedesignEnabled: boolean; } const mapStateToProps = (state: AppState, props: DynamicTextFieldProps) => { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index d5a4f038f08a..03ecbf2ace1f 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -21,7 +21,6 @@ export default [ configProperty: "actionConfiguration.timeoutInMillisecond", controlType: "INPUT_TEXT", dataType: "NUMBER", - width: "270px", }, ], }, From fbfef1aca9e54c9bc7fe3449ea68328ea3cedab8 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Tue, 21 Jan 2025 09:15:34 +0530 Subject: [PATCH 5/5] chore: Remove API Settings width specification --- .../PartialImportExport/PartialExportModal/unitTestUtils.ts | 2 -- .../AppsmithActionConstants/formConfig/ApiSettingsConfig.ts | 1 - .../formConfig/GoogleSheetsSettingsConfig.ts | 1 - app/client/test/factories/MockPluginsState.ts | 2 -- 4 files changed, 6 deletions(-) diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index 1fe0cdb1451a..6caa81392991 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -10165,7 +10165,6 @@ export const defaultAppState = { controlType: "INPUT_TEXT", configProperty: "actionConfiguration.timeoutInMillisecond", dataType: "NUMBER", - width: "270px", }, ], }, @@ -10231,7 +10230,6 @@ export const defaultAppState = { controlType: "INPUT_TEXT", configProperty: "actionConfiguration.timeoutInMillisecond", dataType: "NUMBER", - width: "270px", }, ], }, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index 103aff745a68..fd5a1aa73022 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -54,7 +54,6 @@ export default [ controlType: "INPUT_TEXT", configProperty: "actionConfiguration.timeoutInMillisecond", dataType: "NUMBER", - width: "270px", }, ], }, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index 7ad33fde15e2..1e412ed1a235 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -21,7 +21,6 @@ export default [ configProperty: "actionConfiguration.timeoutInMillisecond", controlType: "INPUT_TEXT", dataType: "NUMBER", - width: "270px", }, ], }, diff --git a/app/client/test/factories/MockPluginsState.ts b/app/client/test/factories/MockPluginsState.ts index 636a21f5afbd..ebbe018e2049 100644 --- a/app/client/test/factories/MockPluginsState.ts +++ b/app/client/test/factories/MockPluginsState.ts @@ -7007,7 +7007,6 @@ export default { controlType: "INPUT_TEXT", configProperty: "actionConfiguration.timeoutInMillisecond", dataType: "NUMBER", - width: "270px", }, ], }, @@ -7073,7 +7072,6 @@ export default { controlType: "INPUT_TEXT", configProperty: "actionConfiguration.timeoutInMillisecond", dataType: "NUMBER", - width: "270px", }, ], },