Fix screen reader labels broken in field settings panel#3015
Conversation
📝 WalkthroughWalkthroughRestores and adjusts admin UI animations in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/src/admin/admin.js`:
- Around line 7628-7630: The forEach callback on
singleField.querySelectorAll('h3:not(.frm-collapsed) + .frm-collapse-me')
currently uses a concise arrow body that returns the assignment expression;
change it to a block-bodied arrow function so it performs the assignment as a
statement (e.g., section.style.animation = 'none';) without an implicit return.
Locate the forEach call in admin.js and replace the concise arrow callback with
a block callback to avoid returning a value from the handler.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1fc92e88-0938-4b52-a81a-2e7508ddd250
📒 Files selected for processing (3)
css/frm_admin.cssjs/formidable_admin.jsjs/src/admin/admin.js
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Mar 13, 2026 7:03p.m. | Review ↗ | |
| JavaScript | Mar 13, 2026 7:03p.m. | Review ↗ |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
paypal/controllers/FrmPayPalLiteFieldsController.php (1)
29-41: Minor documentation inconsistencies.
Missing
@sincetag: Unlikehide_paypal_order_fields, this method lacks a@since x.xannotation.Type inconsistency: The
$fieldparameter is documented asarrayhere, but asobjectinhide_paypal_order_fields. SinceFrmField::get_option()handles both, consider clarifying witharray|objectfor consistency.Unused parameters: Static analysis flags
$displayand$valuesas unused. If this method is a hook callback with a mandated signature, consider adding a brief inline comment or suppressing the warning to clarify intent.📝 Suggested documentation improvements
/** + * Add a note about PayPal order fields in the form builder. + * + * `@since` x.x + * - * `@param` array $field The field settings. - * `@param` array $display The display settings for the field. - * `@param` array $values The values associated with the field. + * `@param` array|object $field The field settings. + * `@param` array $display The display settings for the field (unused, required by hook signature). + * `@param` array $values The values associated with the field (unused, required by hook signature). * * `@return` void */ - public static function add_paypal_order_field_note( $field, $display, $values ) { + public static function add_paypal_order_field_note( $field, $display, $values ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@paypal/controllers/FrmPayPalLiteFieldsController.php` around lines 29 - 41, The add_paypal_order_field_note method is missing a `@since` tag, documents $field as array only (inconsistent with hide_paypal_order_fields), and leaves $display and $values unused; update the PHPDoc for add_paypal_order_field_note to include the same `@since` annotation as hide_paypal_order_fields, change the `@param` for $field to "array|object" to reflect FrmField::get_option input, and add a short inline comment (e.g., /* unused: required by hook signature */) or a suppression annotation for $display and $values to silence static analysis while keeping the hook-compatible signature.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@paypal/controllers/FrmPayPalLiteFieldsController.php`:
- Around line 29-41: The add_paypal_order_field_note method is missing a `@since`
tag, documents $field as array only (inconsistent with
hide_paypal_order_fields), and leaves $display and $values unused; update the
PHPDoc for add_paypal_order_field_note to include the same `@since` annotation as
hide_paypal_order_fields, change the `@param` for $field to "array|object" to
reflect FrmField::get_option input, and add a short inline comment (e.g., /*
unused: required by hook signature */) or a suppression annotation for $display
and $values to silence static analysis while keeping the hook-compatible
signature.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0fce5195-d8fb-477e-b854-42993a57997f
📒 Files selected for processing (1)
paypal/controllers/FrmPayPalLiteFieldsController.php
…-labels Fix screen reader labels broken in field settings panel
Fixes https://github.com/Strategy11/formidable/issues/6383
Testing
Demo
https://cleanshot.com/share/nzYcG0fP
Summary by CodeRabbit