Skip to content

Commit

Permalink
chore: Moving action settings from editor form to toolbar (appsmithor…
Browse files Browse the repository at this point in the history
…g#36894)

## Description

Moving action settings from editor form to toolbar to follow the new
designs under action redesign project.

Fixes [appsmithorg#35512](appsmithorg#35512)
[appsmithorg#34670](appsmithorg#34670)
[appsmithorg#35535](appsmithorg#35535)

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11384449381>
> Commit: 027e2a3
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11384449381&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 17 Oct 2024 12:40:29 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Introduced new components for managing API and query settings in the
Plugin Action Settings.
- Added functionality to open plugin action settings directly from the
toolbar.
- Implemented a settings popover interface for improved user
interaction.
- Added documentation links for QUERY_SETTINGS to enhance user guidance.

- **Improvements**
- Simplified rendering logic in the Plugin Action Form for better
performance.
- Updated form naming conventions for consistency across API and GraphQL
editors.
- Streamlined configuration settings by replacing `subtitle` with
`tooltipText` for clarity.
- Enhanced styling in Action Settings for better layout and user
experience.

- **Bug Fixes**
- Corrected the navigation logic to open plugin action settings instead
of debugger state.

These enhancements aim to improve user experience and streamline plugin
action management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ankitakinger authored Oct 18, 2024
1 parent 4007bdf commit 8e77576
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ private PreparedStatement setValueInStatement(
AppsmithPluginError.PLUGIN_IN_MEMORY_FILTERING_ERROR,
"Error while interacting with value " + value + " : " + e.getMessage());
} catch (IllegalArgumentException e) {
// The data type recognized does not match the data type of the value being set via Prepared Statement
// The data type recognized does not match the data type of the value being set via prepared statement
// Add proper handling here.
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_IN_MEMORY_FILTERING_ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Smart JSON substitution",
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Content field by adding/removing quotes intelligently and reduces developer errors",
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
"controlType": "SWITCH",
"initialValue": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Query timeout (in milliseconds)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Query timeout (in milliseconds)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Smart JSON substitution",
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Body field by adding/removing quotes intelligently and reduces developer errors",
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Body field by adding/removing quotes intelligently and reduces developer errors",
"configProperty": "actionConfiguration.formData.smartSubstitution",
"controlType": "SWITCH",
"initialValue": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Query timeout (in milliseconds)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Smart JSON substitution",
"subtitle": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
"tooltipText": "Turning on this property fixes the JSON substitution of bindings in the Row objects by adding/removing quotes intelligently and reduces developer errors",
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
"controlType": "SWITCH",
"initialValue": true
Expand Down
7 changes: 3 additions & 4 deletions appsmith-plugins/mongoPlugin/src/main/resources/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Smart BSON substitution",
"subtitle": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
"tooltipText": "Turning on this property fixes the BSON substitution of bindings in the Mongo BSON document by adding/removing quotes intelligently and reduces developer errors",
"configProperty": "actionConfiguration.formData.smartSubstitution.data",
"controlType": "SWITCH",
"initialValue": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Mono<ActionExecutionResult> executeParameterized(
return executeCommon(hikariDSConnection, actionConfiguration, FALSE, null, null);
}

// Prepared Statement
// Prepared statement
// First extract all the bindings in order
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
// Replace all the bindings with a `?` as expected in a prepared statement.
Expand Down
9 changes: 4 additions & 5 deletions appsmith-plugins/mssqlPlugin/src/main/resources/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Use Prepared Statement",
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"label": "Use prepared statements",
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
"controlType": "SWITCH",
"initialValue": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public Mono<ActionExecutionResult> executeParameterized(
return executeCommon(connectionContext, actionConfiguration, FALSE, null, null, requestData);
}

// This has to be executed as Prepared Statement
// This has to be executed as prepared statement
// First extract all the bindings in order
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
// Replace all the bindings with a ? as expected in a prepared statement.
Expand Down
9 changes: 4 additions & 5 deletions appsmith-plugins/mysqlPlugin/src/main/resources/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Use Prepared Statement",
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"label": "Use prepared statements",
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
"controlType": "SWITCH",
"initialValue": true
Expand Down
5 changes: 2 additions & 3 deletions appsmith-plugins/openAiPlugin/src/main/resources/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Query timeout (in milliseconds)",
Expand Down
9 changes: 4 additions & 5 deletions appsmith-plugins/oraclePlugin/src/main/resources/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Use Prepared Statement",
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"label": "Use prepared statements",
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"configProperty": "actionConfiguration.formData.preparedStatement.data",
"controlType": "SWITCH",
"initialValue": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public Mono<ActionExecutionResult> executeParameterized(
return executeCommon(connection, datasourceConfiguration, actionConfiguration, FALSE, null, null, null);
}

// Prepared Statement
// Prepared statement

// First extract all the bindings in order
List<MustacheBindingToken> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
{
"label": "Run query on page load",
"configProperty": "executeOnLoad",
"controlType": "SWITCH",
"subtitle": "Will refresh data each time the page is loaded"
"controlType": "SWITCH"
},
{
"label": "Request confirmation before running query",
"configProperty": "confirmBeforeExecute",
"controlType": "SWITCH",
"subtitle": "Ask confirmation from the user each time before refreshing data"
"tooltipText": "Ask confirmation from the user each time before refreshing data"
},
{
"label": "Use Prepared Statement",
"subtitle": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"label": "Use prepared statements",
"tooltipText": "Prepared statements prevent SQL injections on your queries but do not support dynamic bindings outside values in your SQL",
"configProperty": "actionConfiguration.pluginSpecifiedTemplates[0].value",
"controlType": "SWITCH",
"initialValue": true
Expand Down

0 comments on commit 8e77576

Please sign in to comment.