Skip to content

Additional form builder optimizations - #3530

Merged
Crabcyborg merged 1 commit into
masterfrom
additional_form_builder_optimizations
Oct 2, 2026
Merged

Crabcyborg merged 1 commit into
masterfrom
additional_form_builder_optimizations

Conversation

@Crabcyborg

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: Strategy11/formidable-forms/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6650ec7c-247c-41bf-871b-3a6cd852a8fb

📥 Commits

Reviewing files that changed from the base of the PR and between 3690446 and f5db6ec.

📒 Files selected for processing (4)
  • classes/controllers/FrmFieldsController.php
  • js/formidable_admin.js
  • js/src/admin/admin.js
  • tests/phpunit/fields/test_FrmFieldsController.php
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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 2, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 3690446...f5db6ec 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 2, 2026 8:22p.m. Review ↗
JavaScript Oct 2, 2026 8:22p.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.

$_POST['known_tooltips'] = 'new';

try {
$this->assertSame(

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_FrmFieldsController::assertSame()


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

array( 'new' => $definitions['new'] ),
$this->run_private_method( array( 'FrmFieldsController', 'get_missing_builder_definitions' ), array( $definitions, 'known_select_options' ) )
);
$this->assertSame(

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_FrmFieldsController::assertSame()


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

if ( null !== $known_keys ) {
$_POST['known_tooltips'] = $known_keys;
}
$this->assertSame(

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_FrmFieldsController::assertSame()


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

}

$_POST['known_tooltips'] = 'known';
$this->assertSame(

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_FrmFieldsController::assertSame()


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 added the franky-working Franky is actively reviewing this label Oct 2, 2026

@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. Checked live in the form builder on Lite master plus this branch, with a 37-field form that has "Load and save form builder page with AJAX" turned on (so fields come in through frm_load_field batches).

  • Batched definitions: all 37 fields loaded, no placeholders left, no console errors. I sent the same 12-field batch to frm_load_field three ways: with no known_* params the response had 25 tooltips and 6 select option lists (as before); with the page's current known keys it had 0 and 0 and was about 9 KB smaller; with junk (zzz,,,, ../x) it was identical to the no-params response. So older or malformed requests are safe.
  • Fields from later batches still work: the settings panel of the last field (id 59) opened with its selects hydrated (0 left unhydrated, 0 empty) and its tooltips titled.
  • Bulk edit, now created lazily: the dialog was already built by the idle callback, opened from the field settings with the options filled in, and Update Options closed it and added the new option to the field.
    bulk edit
  • The committed js/formidable_admin.js bundle contains known_tooltips, known_select_options and requestIdleCallback, so it matches the source.
  • The DeepSource PHP failure (assertSame() undefined) is a false positive: the test class extends FrmUnitTest and other tests in the same folder call assertSame.

Not run: the two new PHPUnit tests (CI's PHPUnit is skipped on this head; I ran the equivalent requests above instead). I did not test the case where Bulk Edit is clicked before the idle callback runs, but both paths call the same initializeBulkOptionsOverlay().

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Oct 2, 2026
@Crabcyborg
Crabcyborg merged commit e3a2cf6 into master Oct 2, 2026
58 of 59 checks passed
@Crabcyborg
Crabcyborg deleted the additional_form_builder_optimizations branch October 2, 2026 20:33
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