Skip to content

Add full-width class to single-select dropdown Other input - #3624

Open
vivi-the-going-merry[bot] wants to merge 1 commit into
masterfrom
fix/issue-6909-other-full-select
Open

vivi-the-going-merry[bot] wants to merge 1 commit into
masterfrom
fix/issue-6909-other-full-select

Conversation

@vivi-the-going-merry

Copy link
Copy Markdown
Contributor

Part of Strategy11/formidable-pro#6909 (the Pro fix is a separate PR there).

Broken: The fallback in FrmFieldsHelper::include_other_input() (used when Pro is missing or older than 7.0) adds frm_other_full only to multi-select dropdowns, so a single-select dropdown's Other input is narrower and has no top gap.

Changed: Any dropdown (type === 'select') gets frm_other_full. Added a test to test_FrmFieldsHelper.

Verified: New test red on master (output has no frm_other_full), green on the branch; test_FrmFieldsHelper 6/6. The fallback path was not rendered live. The images below are from the Pro-side fix, which adds the same class (master vs branch, "Other" selected).

master Pro fix
before after

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in c5b435b...2df5c50 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Oct 26, 2026 6:00p.m. Review ↗
JavaScript Oct 26, 2026 6:00p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

FrmFieldsHelper::include_other_input( $args );
$html = ob_get_clean();

$this->assertStringContainsString( 'frm_other_full', $html );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Call to an undefined method test_FrmFieldsHelper::assertStringContainsString()


The method you are trying to call is not defined, which can result in a fatal error.

@franky-the-going-merry franky-the-going-merry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve.

Bug reproduced and fixed live. Preview env (Lite only, so Pro is not active and the fallback in include_other_input() is the path that runs), a form with a single-select dropdown, a multi-select dropdown and a radio, each with an Other option, rendered through FrmFormsController::get_form_shortcode():

field base PR
single select frm_other_input frm_pos_none frm_other_input frm_pos_none frm_other_full
multi select ... frm_other_full ... frm_other_full (unchanged)
radio frm_other_input frm_pos_none unchanged

Checked: the condition now matches the intent in the PR text (every dropdown). The class has no CSS in Lite; the width/margin rules live in Pro (css/single-style.css.php, css/pro_fields.css.php), so the visible fix only reaches sites on Pro older than 7.0, which is exactly the fallback's audience. CI PHPUnit passes on 7.4, 8.0, 8.2 and 8.4; Psalm is red with the same MissingPureAnnotation errors as other PRs on master. The DeepSource PHP failure ("undefined assertStringContainsString()") is a false positive: the method exists in PHPUnit 9.6+ and the test runs green in CI.

Not exercised: the visual width/margin of the Other input (needs Pro older than 7.0 for the CSS), the new PHPUnit test locally (CI green only), review skills (one-line diff read in full), browser screenshot.

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.

0 participants