-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Action redesign: Updating the config for SMTP plugin to use sections and zones format #36091
Conversation
WalkthroughThe changes encompass modifications to the SMTP plugin's user interface, enhancing the email sending configuration. Key updates include the introduction of new JSON structures for the email body and the overall layout, improving the organization of input fields. Additionally, CSS adjustments enhance the styling of dynamic input text controls, allowing for better responsiveness and usability. These changes aim to streamline the email composition process while maintaining essential functionalities. Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10684897723. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (2)
app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1)
51-54
: Temporary fix approved, but avoid using!important
and address the root cause.Great job on improving the flexibility of the dynamic input text control! This change allows for better responsiveness and adaptability of the UI components that utilize this class.
However, I would advise against using
!important
as it can make the code harder to maintain and override in the future. It's best to address the root cause of the issue in theDynamicTextFeildControl
component, as mentioned in the comment.Consider removing the
!important
declarations and addressing the minimum width issue in theDynamicTextFeildControl
component. This will make the code more maintainable and easier to work with in the long run.app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.json (1)
1-108
: Great job on structuring the email body configuration using sections and zones! The JSON format is well-organized and enhances the usability of the plugin. 👏A few additional suggestions to consider:
Consider adding validation for email addresses in the "Recipients", "CC", and "BCC" fields to ensure that only valid email formats are accepted.
For the "Attachment(s)" field, you might want to provide more guidance or examples on how to use the
{{Filepicker.files}}
template. This will help users understand how to attach files effectively.If there are any character limits for fields like "Subject" or "Body", consider adding validation to enforce those limits and prevent unexpected behavior.
Overall, the JSON structure is well-designed and follows best practices. It effectively utilizes the sections and zones format to create a user-friendly configuration for the SMTP plugin. Keep up the great work! 😊
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- app/client/src/components/formControls/DynamicInputTextControl.tsx (1 hunks)
- app/client/src/pages/Editor/ActionForm/Zone/styles.module.css (1 hunks)
- app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.json (1 hunks)
- app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/root.json (1 hunks)
- app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/send.json (1 hunks)
Additional comments not posted (9)
app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/root.json (2)
4-4
: Verify the impact of upgrading toSECTION_V2
.The
controlType
has been updated fromSECTION
toSECTION_V2
, which indicates a version upgrade.Please ensure that this change is compatible with the rest of the codebase and does not introduce any breaking changes. Consider running the following script to search for potential issues:
29-29
: Verify the purpose and content of the newbody.json
file.The
files
array has been updated to include a new filebody.json
, which suggests that the configuration now supports additional components or interactions.Please ensure that the content of the
body.json
file aligns with the overall purpose of the SMTP plugin and does not introduce any security vulnerabilities or inconsistencies. Consider running the following script to analyze the file:Verification successful
Verification Complete:
body.json
is Properly Integrated and SecureThe
body.json
file is a well-structured configuration file that defines the email body section for the SMTP plugin. It includes fields for recipients, subject, body type, and attachments, using dynamic input controls to facilitate flexible email composition. The file is correctly referenced inroot.json
, confirming its integration into the plugin's configuration. No security vulnerabilities or inconsistencies were found.
- The file's content aligns with the SMTP plugin's purpose.
- No sensitive information is present in the file.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Analyze the content of the `body.json` file. # Test 1: Check if the file exists. Expect: The file to be present. if [ ! -f "app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.json" ]; then echo "The body.json file is missing." else echo "The body.json file is present." fi # Test 2: Validate the JSON syntax. Expect: Valid JSON. cat app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.json | jq empty # Test 3: Search for sensitive information. Expect: No sensitive information present. rg --type json $'password|credential|token' app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.jsonLength of output: 374
Script:
#!/bin/bash # Output the content of the `body.json` file to understand its structure and purpose. cat app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/body.json # Search for references to `body.json` in the codebase to understand its usage. rg 'body.json' --context 5Length of output: 3915
app/server/appsmith-plugins/smtpPlugin/src/main/resources/editor/send.json (6)
27-27
: LGTM!The change in the label from "Set Reply To Email" to "Set reply to email" improves the consistency in capitalization. It's a minor change that enhances the readability and adherence to common conventions.
35-37
: Great job on maintaining consistency and utilizing conditional visibility!The introduction of another
DOUBLE_COLUMN_ZONE
control type with the identifierSEND-Z3
further reinforces the consistent use of this layout structure. The change in theplaceholderText
for the "Reply to email" field from "replyTo@example.com" to "email@example.com" aligns with the placeholder text used in other email fields, improving overall consistency.Moreover, the conditional visibility of the "Reply to email" field based on the "isReplyTo" switch is a good practice. It ensures that the field only appears when the user opts to set a reply-to address, providing a cleaner and more intuitive user interface.
Also applies to: 43-43
2-2
: Verify the impact of theSECTION_V2
control type change.The
controlType
in theSEND
section has been changed fromSECTION
toSECTION_V2
. It's crucial to ensure that this change is properly supported and doesn't introduce any compatibility issues.Please run the following script to verify the usage and impact of the
SECTION_V2
control type:
9-10
: Verify the impact of theDOUBLE_COLUMN_ZONE
control type change and the addition of theidentifier
property.The
controlType
for child elements has been changed fromSECTION
toDOUBLE_COLUMN_ZONE
, and a newidentifier
property with the valueSEND-Z1
has been added. It's important to ensure that this new structure is properly supported and improves the user experience without causing any layout issues.Please run the following script to verify the usage and impact of the
DOUBLE_COLUMN_ZONE
control type and theidentifier
property:Verification successful
Let's ensure we have thoroughly verified the changes. We need to check for any error messages or logs related to the
DOUBLE_COLUMN_ZONE
control type and theSEND-Z1
identifier. It seems the previous search might have missed some files due to incorrect filtering. Let's run a new script to search through all files for any potential issues.
The
DOUBLE_COLUMN_ZONE
control type andSEND-Z1
identifier are properly supported and integrated.The
DOUBLE_COLUMN_ZONE
control type is referenced in the application logic, indicating it is a recognized feature. No error messages or logs were found related to these changes, suggesting no compatibility or layout issues. The unique identifierSEND-Z1
is specific to the configuration and does not cause any conflicts.
- Code Reference:
app/client/src/pages/Editor/QueryEditor/FormRender.tsx
handlesDOUBLE_COLUMN_ZONE
.These findings confirm that the changes are well-integrated and do not introduce any issues. Keep up the good work in maintaining a robust codebase!
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage and impact of the `DOUBLE_COLUMN_ZONE` control type and the `identifier` property. # Test 1: Search for the usage of `DOUBLE_COLUMN_ZONE` control type in the codebase. # Expect: Occurrences in relevant files, indicating proper support. rg --type-add 'json:*.json' --type json $'DOUBLE_COLUMN_ZONE' # Test 2: Search for the usage of the `identifier` property with the value `SEND-Z1`. # Expect: Occurrences in relevant files, indicating proper usage. rg --type-add 'json:*.json' --type json $'"identifier": "SEND-Z1"' # Test 3: Search for any error messages or logs related to `DOUBLE_COLUMN_ZONE` or `SEND-Z1`. # Expect: No error messages or logs, indicating no compatibility or layout issues. rg --type-add 'log:*.log' --type log $'DOUBLE_COLUMN_ZONE|SEND-Z1'Length of output: 1798
Script:
#!/bin/bash # Description: Re-verify the absence of error messages or logs related to `DOUBLE_COLUMN_ZONE` and `SEND-Z1`. # Test: Search for any error messages or logs related to `DOUBLE_COLUMN_ZONE` or `SEND-Z1` in all files. # Expect: No error messages or logs, indicating no compatibility or layout issues. rg 'DOUBLE_COLUMN_ZONE|SEND-Z1' --glob '!*.json' --glob '!*.md'Length of output: 155
23-25
: Verify the proper usage of multipleDOUBLE_COLUMN_ZONE
control types and the absence of conflicts or layout issues.The introduction of another
DOUBLE_COLUMN_ZONE
control type with the identifierSEND-Z2
suggests a consistent use of this layout structure. It's important to ensure that the usage of multipleDOUBLE_COLUMN_ZONE
control types doesn't lead to any conflicts or layout issues.Please run the following script to verify the proper usage of multiple
DOUBLE_COLUMN_ZONE
control types and the absence of conflicts or layout issues:
13-19
: Verify the alignment of the validation logic with theisRequired
property and the clarity of the user interface.The
label
for "From email *" has been changed to "From email", removing the asterisk that visually marked the field as required. However, theisRequired
property has been added to ensure that a valid input is still required for the "From email" field.It's important to verify the following:
- The validation logic aligns with the
isRequired
property, enforcing the requirement for a valid email input.- The user interface clearly communicates the required nature of the "From email" field, even without the asterisk in the label.
Please run the following script to verify the alignment of the validation logic and the clarity of the user interface:
app/client/src/components/formControls/DynamicInputTextControl.tsx (1)
87-90
: Great work on enhancing the styling capabilities of the input text control! 👍The addition of the
uqi-dynamic-input-text
CSS class to thediv
element is a smart move. It allows for more specific CSS targeting, which can help improve the visual presentation and behavior of the component.Here are a few additional insights:
- The existing dynamic class that incorporates
props.name
is still present, ensuring backward compatibility and maintaining any existing styling or functionality that relies on that class.- The changes are focused on the styling aspect and do not alter the overall structure or functionality of the component, which is great for maintaining stability.
Keep up the excellent work in improving the user experience through thoughtful styling enhancements! 🎨✨
"controlType": "DOUBLE_COLUMN_ZONE", | ||
"identifier": "SELECTOR-Z1", | ||
"children": [ | ||
{ | ||
"label": "Send email", | ||
"value": "SEND" | ||
"label": "Command", | ||
"description": "Choose method you would like to use to send an email", | ||
"configProperty": "actionConfiguration.formData.command", | ||
"controlType": "DROP_DOWN", | ||
"initialValue": "SEND", | ||
"options": [ | ||
{ | ||
"label": "Send email", | ||
"value": "SEND" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Documentation Update Needed for DOUBLE_COLUMN_ZONE
Control Type
The introduction of the DOUBLE_COLUMN_ZONE
control type and the restructuring of the dropdown configuration have not been reflected in the documentation. This discrepancy could lead to confusion for users and developers.
- Please update the relevant documentation to include details about the new
DOUBLE_COLUMN_ZONE
control type and its impact on the dropdown configuration.
If you need assistance with updating the documentation, feel free to reach out. It's important to ensure that all changes are clearly communicated to maintain consistency and clarity.
Analysis chain
Verify the impact of introducing the DOUBLE_COLUMN_ZONE
control type.
The introduction of the DOUBLE_COLUMN_ZONE
control type and the restructuring of the dropdown configuration suggest a redesign of the user interface.
Please ensure that these changes are properly reflected in the plugin's documentation and user guides. Consider running the following script to search for potential discrepancies:
If you need any help updating the documentation, please let me know. I'd be happy to assist you in ensuring that the changes are accurately reflected in the user guides.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for potential discrepancies in the documentation related to the `DOUBLE_COLUMN_ZONE` introduction.
# Test: Search for occurrences of the dropdown configuration in markdown files.
# Expect: The documentation to be updated to reflect the new structure.
rg --type md $'Command|Choose method you would like to use to send an email'
Length of output: 515
Deploy-Preview-URL: https://ce-36091.dp.appsmith.com |
…o action-redesign/smtp-v2
Testing completed on EE. Everything looks good. |
…tions and zones format (appsmithorg#36091) ## Description Action redesign: Updating the config for SMTP plugin to use sections and zones format Fixes [appsmithorg#35505 ](appsmithorg#35505) ## Automation /ok-to-test tags="@tag.All" ### 🔍 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/10704929692> > Commit: f58dfce > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10704929692&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 04 Sep 2024 19:46:08 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 - **New Features** - Introduced a comprehensive email sending interface in the SMTP plugin, allowing users to input recipient addresses, subject, body type, and attachments. - Enhanced layout with a new `DOUBLE_COLUMN_ZONE` structure for improved organization of input fields. - **Improvements** - Expanded styling capabilities for the dynamic input text control, allowing for more flexible sizing and better responsiveness in the UI. - Updated existing configurations to streamline the email composition process and improve user experience. - **Bug Fixes** - Adjusted CSS rules to remove minimum height and width constraints for better adaptability of UI components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Action redesign: Updating the config for SMTP plugin to use sections and zones format
Fixes #35505
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10704929692
Commit: f58dfce
Cypress dashboard.
Tags:
@tag.All
Spec:
Wed, 04 Sep 2024 19:46:08 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
DOUBLE_COLUMN_ZONE
structure for improved organization of input fields.Improvements
Bug Fixes