Skip to content

Prepare for 6.19#2269

Merged
Crabcyborg merged 2 commits into
masterfrom
prepare_for_6.19
Mar 11, 2025
Merged

Prepare for 6.19#2269
Crabcyborg merged 2 commits into
masterfrom
prepare_for_6.19

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2025

Walkthrough

The changes update version documentation across multiple files. Several PHP classes and methods now reflect the version 6.19 via updated @since annotations, replacing previous placeholders or older version numbers. In addition, the plugin’s version has been updated from 6.18 to 6.19 in both the helper class and the main plugin file. A new JavaScript method canDuplicateField has also been added to the admin build script to determine if a field can be duplicated based on group limits.

Changes

File(s) Change Summary
classes/controllers/FrmAppController.php, classes/helpers/FrmFieldGdprHelper.php, classes/helpers/FrmFormsListHelper.php, classes/models/FrmInbox.php, classes/models/FrmMigrate.php, classes/models/.../FrmFieldGdpr.php, classes/views/.../primary-options.php, classes/views/.../settings.php Updated @since annotations from placeholder/x.x to 6.19 for classes, methods, and action hooks documentation.
classes/helpers/FrmAppHelper.php, formidable.php Updated plugin version indicators from 6.18 to 6.19.
js/formidable_admin.js Added new method canDuplicateField to check if a field can be duplicated based on the field group’s maximum allowed fields.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant frmAdminBuildJS
    participant FieldGroup

    User->>frmAdminBuildJS: Request duplicate field action
    frmAdminBuildJS->>frmAdminBuildJS: Invoke canDuplicateField(field, maxFields)
    alt Duplication Allowed
        frmAdminBuildJS->>FieldGroup: Duplicate field
        FieldGroup-->>frmAdminBuildJS: Confirm duplication
    else Exceeds Field Limit
        frmAdminBuildJS-->>User: Deny duplication request
    end
Loading

Possibly related PRs

  • Prepare for 6.11 #1818: Updates the @since annotation for a method in the FrmAppController class, closely related to the similar annotation updates in this PR.

Suggested reviewers

  • lauramekaj1
  • truongwp

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a4cae45 and fa562ec.

📒 Files selected for processing (12)
  • classes/controllers/FrmAppController.php (3 hunks)
  • classes/helpers/FrmAppHelper.php (3 hunks)
  • classes/helpers/FrmFieldGdprHelper.php (4 hunks)
  • classes/helpers/FrmFormsListHelper.php (1 hunks)
  • classes/models/FrmInbox.php (1 hunks)
  • classes/models/FrmMigrate.php (1 hunks)
  • classes/models/fields/FrmFieldGdpr.php (7 hunks)
  • classes/views/frm-fields/back-end/gdpr/primary-options.php (1 hunks)
  • classes/views/frm-fields/back-end/settings.php (1 hunks)
  • js/formidable_admin.js (1 hunks)
  • classes/helpers/FrmAppHelper.php (1 hunks)
  • formidable.php (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
🔇 Additional comments (30)
js/formidable_admin.js (1)

2116-2135: LGTM! Nice implementation of the field duplication limit check.

The new canDuplicateField function is well structured and properly documented with JSDoc. It carefully checks if a field can be duplicated by verifying:

  1. It's not part of a collapsed page
  2. The field group exists
  3. The number of fields in the group is below the maximum allowed

Good error handling and logical flow for improving the user experience when duplicating fields.

formidable.php (1)

5-5: Plugin Version Updated to 6.19.

The version metadata now correctly reflects the new release (6.19). This change is purely informational and aligns the header with the release cycle.

classes/models/FrmInbox.php (1)

523-526: Updated Documentation for Error Check Method.

The @since annotation on the check_for_error() method has been updated to 6.19. This ensures the documentation is consistent with the new versioning without affecting functionality.

classes/models/FrmMigrate.php (1)

76-79: Updated @SInCE Annotation in Table Check Method.

The docblock for the check_that_tables_exist() method now reflects version 6.19. This update aligns documentation across the codebase without introducing any logic changes.

classes/views/frm-fields/back-end/gdpr/primary-options.php (1)

6-6: Version Annotation Update in Primary Options.

The @since tag has been changed to 6.19, ensuring that the GDPR primary options documentation is kept current with the rest of the project.

classes/views/frm-fields/back-end/settings.php (1)

235-243: Documentation Update for Hook Annotation.

The @since annotation for the hook in the settings file (frm_field_options_after_description) is now updated to 6.19. This change harmonizes the versioning information for this hook with other updates across the codebase.

classes/helpers/FrmFormsListHelper.php (1)

380-395: Updated @since annotation in column_views method.
The PHPDoc tag is now updated to 6.19, which aligns with the PR objectives. No functional impact is observed, and the method’s behavior remains unchanged.

classes/models/fields/FrmFieldGdpr.php (11)

6-8: Class-level documentation update.
The class documentation now correctly reflects @since 6.19, which maintains consistency with the overall version update.


11-15: Property $type documentation update.
The @since annotation for the $type property has been updated to 6.19. This change properly reflects when this property became active.


17-22: Property $has_for_label documentation update.
The updated @since tag to 6.19 is appropriate and maintains consistency across the class properties.


23-28: Constant VIEW_PATH documentation update.
The @since annotation for the constant is now at 6.19, which is clear and in line with the PR objectives.


29-34: Method get_new_field_defaults documentation update.
The @since annotation has been updated to 6.19. The method description and return type documentation remain clear and correct.


57-62: Method field_settings_for_type documentation update.
The updated annotation @since 6.19 is correctly applied. This update does not affect the method’s logic.


91-95: Method show_primary_options documentation update.
The @since tag is now 6.19, ensuring that the documentation reflects the latest version correctly.


111-116: Method extra_field_opts documentation update.
The documentation is updated with @since 6.19, aligning the version information accurately with the product release.


123-128: Method include_form_builder_file documentation update.
The updated @since annotation to 6.19 is applied correctly. The file inclusion logic remains consistent.


133-138: Method include_front_form_file documentation update.
The @since annotation is updated to 6.19, which is consistent with our versioning change and does not alter functionality.


143-151: Method before_replace_html_shortcodes documentation update.
The update to @since 6.19 is properly documented and ensures that versioning information is consistent across the class.

classes/helpers/FrmAppHelper.php (3)

335-341: Update @SInCE Annotation for is_admin_list_page

The documentation has been updated to indicate that this method now belongs to version 6.19. This minor change improves our version tracking consistency as we prepare for the 6.19 release.


4438-4447: Update @SInCE Annotation for is_gdpr_enabled

The @since tag for the is_gdpr_enabled() method has been updated to 6.19. This adjustment properly reflects the version in which the changes were incorporated.


4449-4459: Update @SInCE Annotation for no_gdpr_cookies

The @since annotation for the no_gdpr_cookies() method is now set to 6.19. This change aligns with our release objectives and maintains consistency across our documentation.

classes/controllers/FrmAppController.php (3)

1332-1338: DocBlock Version Update for handle_current_screen()
The updated @since 6.19 annotation accurately documents that this method’s behavior is defined starting in version 6.19. No functional changes were introduced.


1420-1428: DocBlock Version Update for apply_saved_sort_preference()
The @since 6.19 annotation now clearly indicates that the behavior of applying saved sort preferences is part of the 6.19 release. The parameter documentation looks clear and consistent.


1480-1484: DocBlock Version Update for add_missing_tables()
The annotation has been updated to @since 6.19, aligning this method with the current release documentation. This non-functional update ensures consistency across the codebase.

classes/helpers/FrmFieldGdprHelper.php (6)

5-7: File-level DocBlock Version Update
The file-level docblock now specifies @since 6.19. This update improves documentation clarity by accurately reflecting that the GDPR helper’s public APIs are part of version 6.19.


19-23: FIELD_TYPE Constant Documentation Update
The docblock for the FIELD_TYPE constant now includes @since 6.19. This properly documents that the constant has been available since version 6.19.


27-31: FIELD_CLASS Constant Documentation Update
The update to include @since 6.19 for the FIELD_CLASS constant is clear and consistent with the other versioning updates in the file.


35-39: Method hide_gdpr_field() Version Annotation Update
The method’s docblock now states @since 6.19, ensuring that users are informed about when this functionality became available.


45-51: Method add_gdpr_field() Version Annotation Update
The updated annotation (@since 6.19) in the docblock for add_gdpr_field() provides accurate version history documentation.


60-66: Method get_gdpr_field_class() Version Annotation Update
Including the @since 6.19 annotation now clearly documents that this method’s behavior was introduced in the current release.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this 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.

@Crabcyborg Crabcyborg merged commit 0cb3e30 into master Mar 11, 2025
@Crabcyborg Crabcyborg deleted the prepare_for_6.19 branch March 11, 2025 16:41
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.

1 participant