From 336bc083c45c74fa5b4f284e06c904fcbfd66405 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Wed, 11 Sep 2024 12:48:52 +0530 Subject: [PATCH 1/2] feat: Action redesign: Updating the config for Databricks plugin to use sections and zones format (#36057) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Action redesign: Updating the config for Databricks plugin to use sections and zones format Fixes #35489 ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: a7ba129c6f6265b83198fb87b1defbd1a00e592c > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Tue, 10 Sep 2024 14:00:44 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Updated the plugin configuration to enhance the section control, improving the user interface and overall experience. - Introduced a new layout structure with a `SINGLE_COLUMN_ZONE` control type for better organization and potential functionality expansion. - **Improvements** - Enhanced naming conventions for identifiers, making them more descriptive and contextually relevant. --- .../src/main/resources/editor/root.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json index 49a61e3faf81..bab24a7605cd 100644 --- a/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json +++ b/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json @@ -1,14 +1,20 @@ { "editor": [ { - "controlType": "SECTION", + "controlType": "SECTION_V2", "identifier": "SELECTOR", "children": [ { - "label": "", - "configProperty": "actionConfiguration.body", - "controlType": "QUERY_DYNAMIC_TEXT", - "evaluationSubstitutionType": "TEMPLATE" + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SELECTOR-Z1", + "children": [ + { + "label": "", + "configProperty": "actionConfiguration.body", + "controlType": "QUERY_DYNAMIC_TEXT", + "evaluationSubstitutionType": "TEMPLATE" + } + ] } ] } From bc59bd173087185490b9b084049e22b69a1c3c9b Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Wed, 11 Sep 2024 12:49:23 +0530 Subject: [PATCH 2/2] feat: Action redesign: Updating the config for MongoDB plugin to use sections and zones format (#36098) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Action redesign: Updating the config for MongoDB plugin to use sections and zones format Fixes [#35495](https://github.com/appsmithorg/appsmith/issues/35495) ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 245cde9a4d5cbadfbc8f7fe917aa7c3ba257e306 > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Tue, 10 Sep 2024 17:47:21 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Enhanced styling capabilities for dynamic input text controls with new CSS class. - Improved layout and organization of UI components in MongoDB plugin with new control types, allowing for more flexible and responsive designs. - Added new controls for sorting and limiting criteria in query interfaces. - **Bug Fixes** - Adjusted CSS to remove minimum height and width constraints for better responsiveness. - **Refactor** - Updated control types across various JSON configurations to improve user experience and interface organization. --- .../src/main/resources/editor/aggregate.json | 27 ++++--- .../src/main/resources/editor/count.json | 11 ++- .../src/main/resources/editor/delete.json | 19 +++-- .../src/main/resources/editor/distinct.json | 19 +++-- .../src/main/resources/editor/find.json | 27 +++++-- .../src/main/resources/editor/insert.json | 11 ++- .../src/main/resources/editor/raw.json | 7 +- .../src/main/resources/editor/root.json | 80 ++++++++++--------- .../src/main/resources/editor/update.json | 27 +++++-- 9 files changed, 134 insertions(+), 94 deletions(-) diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json index 323f7f760c4b..1241370d274f 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "AGGREGATE", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "AGGREGATE-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "AGGREGATE-Z2", "children": [ { "label": "Array of pipelines", @@ -47,11 +46,17 @@ ] }, { - "label": "Limit", - "configProperty": "actionConfiguration.formData.aggregate.limit.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "initialValue": "10" + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "AGGREGATE-Z3", + "children": [ + { + "label": "Limit", + "configProperty": "actionConfiguration.formData.aggregate.limit.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "initialValue": "10" + } + ] } ] } diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json index 70a9ddc79895..e8848d8ca2e5 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "COUNT", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'COUNT'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "COUNT-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "COUNT-Z2", "children": [ { "label": "Query", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json index d5fce44dbbe1..8a3ada65124e 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "DELETE", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'DELETE'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "DELETE-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "DELETE-Z2", "children": [ { "label": "Query", @@ -43,7 +42,13 @@ "inputType": "JSON", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{rating : {$gte : 9}}" - }, + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "DELETE-Z3", + "children": [ { "label": "Limit", "configProperty": "actionConfiguration.formData.delete.limit.data", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json index ab4bfc4fb0d0..240c8edff7a7 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "DISTINCT", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "DISTINCT-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "DISTINCT-Z2", "children": [ { "label": "Query", @@ -43,7 +42,13 @@ "inputType": "JSON", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{rating : {$gte : 9}}" - }, + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "DISTINCT-Z3", + "children": [ { "label": "Key", "configProperty": "actionConfiguration.formData.distinct.key.data", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json index 741a77885283..3dfec0d2c602 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "FIND", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'FIND'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "FIND-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "FIND-Z2", "children": [ { "label": "Query", @@ -42,7 +41,13 @@ "controlType": "QUERY_DYNAMIC_TEXT", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{rating : {$gte : 9}}" - }, + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "FIND-Z3", + "children": [ { "label": "Sort", "configProperty": "actionConfiguration.formData.find.sort.data", @@ -58,7 +63,13 @@ "inputType": "JSON", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{name : 1}" - }, + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "FIND-Z4", + "children": [ { "label": "Limit", "configProperty": "actionConfiguration.formData.find.limit.data", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json index e70f7f903bc9..488553124586 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "INSERT", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'INSERT'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "INSERT-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "INSERT-Z2", "children": [ { "label": "Documents", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json index 6829311c3817..609dd4b991ef 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json @@ -1,14 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "RAW", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'RAW'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "RAW-Z1", "children": [ { "label": "", diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json index 7d1c79dc8ef9..2f7f7b68b407 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json @@ -1,47 +1,53 @@ { "editor": [ { - "controlType": "SECTION", + "controlType": "SECTION_V2", "identifier": "SELECTOR", "children": [ { - "label": "Command", - "description": "Choose method you would like to use to query the database", - "configProperty": "actionConfiguration.formData.command.data", - "controlType": "DROP_DOWN", - "initialValue": "FIND", - "options": [ + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SELECTOR-Z1", + "children": [ { - "label": "Find document(s)", - "value": "FIND" - }, - { - "label": "Insert document(s)", - "value": "INSERT" - }, - { - "label": "Update document(s)", - "value": "UPDATE" - }, - { - "label": "Delete document(s)", - "value": "DELETE" - }, - { - "label": "Count", - "value": "COUNT" - }, - { - "label": "Distinct", - "value": "DISTINCT" - }, - { - "label": "Aggregate", - "value": "AGGREGATE" - }, - { - "label": "Raw", - "value": "RAW" + "label": "Command", + "description": "Choose method you would like to use to query the database", + "configProperty": "actionConfiguration.formData.command.data", + "controlType": "DROP_DOWN", + "initialValue": "FIND", + "options": [ + { + "label": "Find document(s)", + "value": "FIND" + }, + { + "label": "Insert document(s)", + "value": "INSERT" + }, + { + "label": "Update document(s)", + "value": "UPDATE" + }, + { + "label": "Delete document(s)", + "value": "DELETE" + }, + { + "label": "Count", + "value": "COUNT" + }, + { + "label": "Distinct", + "value": "DISTINCT" + }, + { + "label": "Aggregate", + "value": "AGGREGATE" + }, + { + "label": "Raw", + "value": "RAW" + } + ] } ] } diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json index bcd4aae93c70..4f9a19c52f9c 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json @@ -1,13 +1,13 @@ { + "controlType": "SECTION_V2", "identifier": "UPDATE", - "controlType": "SECTION", "conditionals": { "show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}" }, "children": [ { - "controlType": "SECTION", - "label": "Select collection to query", + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "UPDATE-Z1", "children": [ { "label": "Collection", @@ -32,9 +32,8 @@ ] }, { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "UPDATE-Z2", "children": [ { "label": "Query", @@ -43,7 +42,13 @@ "inputType": "JSON", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{rating : {$gte : 9}}" - }, + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "UPDATE-Z3", + "children": [ { "label": "Update", "configProperty": "actionConfiguration.formData.updateMany.update.data", @@ -51,7 +56,13 @@ "inputType": "JSON", "evaluationSubstitutionType": "TEMPLATE", "placeholderText": "{ $inc: { score: 1 } }" - }, + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "UPDATE-Z4", + "children": [ { "label": "Limit", "configProperty": "actionConfiguration.formData.updateMany.limit.data",