Skip to content

Add Default from address setting#1967

Merged
Crabcyborg merged 16 commits into
masterfrom
pro-issue-5147
Sep 25, 2024
Merged

Add Default from address setting#1967
Crabcyborg merged 16 commits into
masterfrom
pro-issue-5147

Conversation

@truongwp
Copy link
Copy Markdown
Contributor

@truongwp truongwp commented Sep 5, 2024

Fixes https://github.com/Strategy11/formidable-pro/issues/5147

This PR adds the Default From Address setting in 2 places: the Global settings and onboarding process.

Screenshot 2024-09-05 at 22 51 49 Screenshot 2024-09-05 at 22 53 45

To test:

  • Your site should be able to send mail without an SMTP plugin. You can test it on this QA site:
  • Create a form with Send email action.
  • In the Send email action, clear the value in the From setting to make it use the global settings.
  • Submit the form and check the email. Check the email headers, the From email should be Site name <fromemail>. The recording below shows how to see the From header with Gmail:
Screen.Recording.2024-09-05.at.22.58.29.mov

@Crabcyborg I request you because this is more technical to test. You can request Garret if you need.

@truongwp truongwp added run analysis deploy Deploy website on push labels Sep 5, 2024
@truongwp truongwp requested a review from Crabcyborg September 5, 2024 16:01
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 5, 2024

Walkthrough

The changes introduce enhancements to the email configuration functionalities within the application. Key modifications include the addition of a new "From Address" input field in the onboarding wizard, updates to email handling methods to utilize a centralized default email retrieval function, and improvements in error handling mechanisms. These alterations collectively aim to provide users with better configurability and validation during email setup processes.

Changes

File Path Change Summary
classes/controllers/...FrmOnboardingWizardController.php Modified ajax_setup_email_step method to retrieve and sanitize a new $from_email parameter from posted data, updating settings accordingly.
classes/helpers/...FrmEmailHelper.php Added get_default_from_email() method to retrieve the default "from" email address from settings or fallback to the site's admin email.
classes/helpers/...FrmOnboardingWizardHelper.php Introduced print_setting_error method for structured error message display during onboarding.
classes/models/...FrmEmail.php Updated set_from method to use FrmEmailHelper::get_default_from_email() for determining the default sender email address.
classes/models/...FrmEmailSummary.php Modified get_headers method to construct the "From" header using FrmEmailHelper::get_default_from_email().
classes/models/...FrmSettings.php Added new public property $from_email to manage the sender email address, initialized in the update_settings method.
classes/views/...onboarding-wizard/steps/default-email-address-step.php Updated onboarding wizard UI to include new input fields for "From Address" and improved error handling for email inputs, enhancing user guidance and feedback.
js/formidable_blocks.js Added new block types for the Formidable Forms plugin and refined rendering logic, improving user interaction and feedback in the block editor.
js/src/onboarding-wizard/elements/getDOMElements.js Added defaultFromEmailField property to the emailStep object to manage the new "From Address" input field.
js/src/onboarding-wizard/events/setupEmailStepButtonListener.js Expanded email validation process to include the new "From Address" field, ensuring both email inputs are validated and included in the data submission.
js/src/onboarding-wizard/ui/showError.js Modified showEmailAddressError function to accept an additional parameter for dynamic input referencing, enhancing flexibility in error handling for various contexts.

Possibly related PRs

Suggested labels

run tests


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Comment thread js/src/onboarding-wizard/ui/showError.js
Comment thread classes/views/frm-settings/general.php
Comment thread classes/controllers/FrmOnboardingWizardController.php Outdated
Comment thread js/formidable_blocks.js
@Crabcyborg Crabcyborg added this to the 6.15 milestone Sep 10, 2024
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks @truongwp!

I haven't tested this yet.

I added Sherv as a reviewer since he worked on the onboarding wizard. I figure some extra eyes on this wouldn't hurt.

🚀

Comment thread classes/views/onboarding-wizard/steps/default-email-address-step.php Outdated
Comment thread classes/helpers/FrmOnboardingWizardHelper.php Outdated
Comment thread classes/models/FrmSettings.php
Comment thread js/src/onboarding-wizard/events/setupEmailStepButtonListener.js Outdated
Comment thread js/src/onboarding-wizard/events/setupEmailStepButtonListener.js Outdated
Comment thread js/src/onboarding-wizard/ui/showError.js Outdated
Comment thread js/src/onboarding-wizard/ui/showError.js
Comment thread js/src/onboarding-wizard/events/setupEmailStepButtonListener.js
Copy link
Copy Markdown
Contributor

@shervElmi shervElmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much, @truongwp! It looks perfect to me now! 🚀

@truongwp
Copy link
Copy Markdown
Contributor Author

Thanks @shervElmi and @Crabcyborg. I resolved all the feedback. Please check this again.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (2)
js/src/onboarding-wizard/ui/showError.js (1)

15-16: The changes look good! Consider using template literals for better readability.

The addition of the input parameter and the updated error display logic improve the flexibility and specificity of error handling.

To further enhance the readability of the code, consider using template literals as suggested in the previous review comment:

showFormError(`#${input.id}`, `#${input.nextElementSibling.id}`, type);
js/src/onboarding-wizard/events/setupEmailStepButtonListener.js (1)

21-31: Consider simplifying the function using Array.prototype.every().

The function logic is correct and handles multiple email fields as expected. However, you can slightly simplify it by using Array.prototype.every() instead of forEach().

Apply this diff to simplify the function:

-const validateEmails = emailInputs => {
-  let isValid = true;
-  emailInputs.forEach( input => {
+const validateEmails = emailInputs => {
+  return emailInputs.every( input => {
     const emailAddress = input.value.trim();
     if ( ! isValidEmail( emailAddress ) ) {
       showEmailAddressError( 'invalid', input );
-      isValid = false;
+      return false;
     }
+    return true;
   });
-  return isValid;
 };
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 994138c and 1d030d2.

Files selected for processing (8)
  • classes/helpers/FrmAppHelper.php (1 hunks)
  • classes/views/form-templates/modals/code-from-email-modal.php (1 hunks)
  • classes/views/form-templates/modals/leave-email-modal.php (1 hunks)
  • classes/views/onboarding-wizard/steps/default-email-address-step.php (1 hunks)
  • classes/views/onboarding-wizard/steps/install-formidable-pro-step.php (1 hunks)
  • js/formidable_styles.js (1 hunks)
  • js/src/onboarding-wizard/events/setupEmailStepButtonListener.js (3 hunks)
  • js/src/onboarding-wizard/ui/showError.js (1 hunks)
Additional context used
Biome
js/formidable_styles.js

[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)

Additional comments not posted (13)
js/src/onboarding-wizard/ui/showError.js (1)

9-12: Documentation looks good!

The JSDoc comment block has been updated to accurately reflect the new input parameter, including the @since and @param tags. This provides clear documentation for the function's usage and parameters.

classes/views/form-templates/modals/code-from-email-modal.php (1)

25-37: LGTM!

The refactor enhances the maintainability and readability of the code by centralizing the error handling logic. The FrmAppHelper::print_setting_error method is correctly used to dynamically generate error messages with the appropriate parameters.

The code segment is well-structured and follows the best practices.

classes/views/form-templates/modals/leave-email-modal.php (1)

53-64: LGTM!

The change enhances the maintainability and readability of the code by centralizing error handling logic. It allows for easier updates and modifications to error messages in the future. The change also streamlines the error display process by using a helper function. The logic and syntax of the changed code segment are correct.

js/src/onboarding-wizard/events/setupEmailStepButtonListener.js (1)

43-46: LGTM!

The changes enhance the robustness of the email setup process by validating both the "default email" and "from email" fields using the new validateEmails function. The early return if either email is invalid is the correct approach to prevent further execution.

classes/views/onboarding-wizard/steps/install-formidable-pro-step.php (1)

40-47: LGTM!

The refactoring of the error handling logic to use the FrmAppHelper::print_setting_error() method is a good change. It improves maintainability by centralizing the error handling, allowing for easier updates and consistency across the application.

The new implementation still conveys the same error message, so the functionality remains unchanged.

classes/views/onboarding-wizard/steps/default-email-address-step.php (5)

20-20: LGTM!

The change in the section title from "Default Email Address" to "Email Setup" is appropriate given the expanded functionality introduced in this diff to configure both the "From" and "To" email addresses.


22-22: LGTM!

The revised description accurately reflects the changes made in this diff to allow users to specify both the "From" and "To" email addresses. It provides clarity on the purpose of each email address being configured.


27-39: LGTM!

The label change to "From Address" is appropriate and consistent with the expanded functionality.

Using the FrmAppHelper::print_setting_error function to handle validation errors is a good practice. It improves code maintainability and ensures consistency in error handling across the email fields.


42-42: LGTM!

The addition of the "To Address" field aligns with the expanded functionality to allow users to specify both the sender and recipient email addresses. It is a necessary change to support the new feature.


45-55: LGTM!

Using the FrmAppHelper::print_setting_error function to handle validation errors for the "To Address" field is consistent with the error handling approach used for the "From Address" field. It improves code maintainability and ensures a unified error handling mechanism across the email fields.

js/formidable_styles.js (2)

Line range hint 1-38: [Needs Verification] Ensure the minified code is thoroughly tested.

The AI-generated summary indicates significant changes to the code structure and logic, including:

  • Restructuring and renaming of functions and variables
  • Introduction of new logic for handling radio button components and sliders
  • Enhancements to event handling and UI updates

Given the minified nature of the code, it's crucial to ensure that these changes are thoroughly tested for regressions. Recommend performing comprehensive unit testing, integration testing, and manual QA to verify that the form elements function as expected and the user experience is not negatively impacted.

Tools
Biome

[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


Line range hint 1-38: The code changes look good based on the summary. No obvious issues found.

Scanned through the minified code and did not find any obvious bugs or inconsistencies with the AI-generated summary of changes. The code appears to align with the described enhancements.

However, due to the low readability of the minified code, there may be subtle issues that are not apparent. Defer to the testing results for the final verdict on correctness.

Tools
Biome

[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)

classes/helpers/FrmAppHelper.php (1)

4338-4364: Looks good!

The new print_setting_error function is implemented safely:

  • It uses wp_parse_args to merge the provided $args with default values.
  • The output is properly escaped using esc_attr and esc_html to prevent XSS.
  • It handles both string and array types for the errors parameter.

Overall, this is a useful utility function to display setting errors. Nice work!

Copy link
Copy Markdown

@garretlaxton garretlaxton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@shervElmi
Copy link
Copy Markdown
Contributor

@truongwp and @Crabcyborg, just a heads-up: some files will change when the New Add-Ons Page PR is merged. Both are planned for the 6.15 milestone, so we need to ensure that if the New Add-Ons Page is merged first, everything works smoothly with the new changes.

@truongwp
Copy link
Copy Markdown
Contributor Author

@shervElmi Thansk for letting us know. We will ask Garret to test again after that PR is merged.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
js/formidable_styles.js (1)

Line range hint 1-874: Avoid Committing Minified Code; Include Source Files Instead

The file js/formidable_styles.js appears to be minified JavaScript code. Committing minified code to the repository can hinder code reviews and maintainability. It is recommended to commit the original unminified source code and configure the build process to generate the minified version during deployment or build time.

Tools
Biome

[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1d030d2 and b24302e.

Files selected for processing (3)
  • classes/helpers/FrmAppHelper.php (1 hunks)
  • classes/views/frm-settings/general.php (1 hunks)
  • js/formidable_styles.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • classes/helpers/FrmAppHelper.php
Additional context used
Biome
js/formidable_styles.js

[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)


[error] 1-1: The assignment should not be in an expression.

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.

(lint/suspicious/noAssignInExpressions)

Additional comments not posted (1)
classes/views/frm-settings/general.php (1)

25-31: ****
The following comment from the previous review is still valid and applicable:

Approve the addition of the "Default From Address" setting.

The implementation of the new setting is correct and follows WordPress best practices. The use of esc_html_e for the label and esc_attr for the input value ensures proper internationalization and security.

Suggestion for Improvement:
Consider adding a default value for the frm_from_email in the plugin's default settings initialization. This ensures that there is a fallback value if the setting has not been configured yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants