Skip to content

Issue/3041#605

Open
Gawuww wants to merge 14 commits intorelease/3.6.0from
issue/3041
Open

Issue/3041#605
Gawuww wants to merge 14 commits intorelease/3.6.0from
issue/3041

Conversation

@Gawuww
Copy link
Collaborator

@Gawuww Gawuww commented Jan 26, 2026

@github-actions
Copy link

🤖 AI PR Review

Risk level: medium

Review

This PR addresses issue #3041 by updating and adding the new Phone Field block to the JetFormBuilder plugin. Key points:

  • The PR adds a new block "Phone Field" with relevant assets, including front-end and editor scripts and styles.
  • The block integrates an international phone input with flags/dial codes and supports customization options like default country, preferred countries, and save format.
  • Several style and label adjustments across components and compatibility layers have been made, changing 'Background Color' labels to 'Background' for UI clarity.
  • The method maybe_init_style_manager is updated to accept the style manager object and register blocks accordingly, improving the approach for style management initialization.
  • The PR also includes fixes in CSS selectors for the general-style module, improving the CSS specificity, which aligns better with WPCS and avoids redundant selectors.

Security & Performance:

  • No direct security change risks detected — no handling of untrusted input or nonce checks are altered.
  • The new Phone Field block appears to be well isolated and uses proper React and WordPress block APIs.
  • The correct use of localization functions and escaping in PHP is observed.

Backward Compatibility:

  • The PR does not modify existing public APIs or change existing block attributes or action formats.
  • The added Phone Field block is a new addition and does not affect existing features.

Testing:

  • No tests are provided for the new Phone Field block. Tests, especially for front-end and block editor behavior, are recommended.

Overall, the PR looks clean and follows JetFormBuilder coding standards and architecture principles. The main improvement would be to add automated tests for the new Phone Field block.

Files of note include:

  • modules/blocks-v2/phone-field/* for the new block implementation
  • includes/blocks/types/base.php changes to better integrate style manager
  • Styling and labels updated in various compatibility and style manager files

No critical issues found.

Suggested changelog entry

- ADD: International Phone Field block with country flags, dial codes, and validation support.

@github-actions
Copy link

🤖 AI PR Review

Risk level: medium

Review

This PR primarily introduces a new "Phone Field" block, including frontend and editor assets, and integrates it into the blocks-v2 module. Additionally, it standardizes various color picker labels from "Background Color" to simply "Background" across multiple files for consistency, and refactors style manager initialization in block types to accept an actual style manager object rather than instantiating within the block.

Positive aspects:

  • The new Phone Field block appears well integrated, with editor and frontend assets, localization, inspector controls, and support for country codes and dial code display.
  • The changelog-style label improvements enhance UI consistency across Elementor, Bricks, JetStyleManager, and core blocks.
  • Style manager refactor improves extensibility and avoids redundant instantiation.
  • Minor fixes to CSS selectors for better specificity and maintainability in general-style.php.

Concerns / Suggestions:

  • The PR lacks new unit or integration tests for the Phone Field block, especially for the new frontend input and signal classes, which are complex and need coverage for date parsing and UI sync.
  • The Phone Field uses global imports and external assets (like the globe icon); verify that these assets and dependencies are properly enqueued and versioned to avoid caching issues.
  • Backward compatibility appears intact, as labels changing from "Background Color" to "Background" should not break API but only UI text.
  • Ensure the Phone Field block's frontend script and styles do not cause conflicts with other plugins or themes (e.g., verify unique classnames, isolated styles).
  • The change in includes/blocks/types/base.php removing style manager instantiation can affect existing blocks; verify this is accounted for in the plugin bootstrap or block registration.

Overall, the changes align well with WP and JetFormBuilder coding standards and architecture, and improve user experience and maintainability. Adding tests and verifying asset loading on various setups (including multisite) is recommended before release.

Suggested changelog entry

`- ADD: Introduce new Phone Field block with international dial code support and custom styling options

  • IMPROVE: Standardize color picker labels from "Background Color" to "Background" across multiple integrations and block types
  • IMPROVE: Refactor block style manager initialization to use external instance for better extensibility
  • FIX: Correct CSS selectors for general field styles for better consistency`

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🤖 AI PR Review

Risk level: medium

Review

This PR primarily adjusts translations and UI labels from "Background Color" to simply "Background" across various components and compatibility files, enhancing UI consistency without altering core functionality. It adds a new "Ipinfo API" settings tab under admin pages, introducing relevant source strings and components, and modifies the JavaScript FieldWrapper component to optionally include a unique Crocoblock style class for extended styling capabilities.

Additionally, the PR modifies the block registration process in the Blocks_Repository_Base class by adding an action hook before block installation, allowing for extensibility.

Also, blocks types' style manager initializations are revised to integrate with a passed style manager instance instead of creating new ones, improving dependency injection and unit testability.

Other blocks like 'form-break-field' and 'hidden-field' now clearly indicate they do not use the style manager, which is a good explicit enhancement.

The JetBooking compatibility frontend script was updated/replaced to enhance check-in/check-out inputs behavior, utilizing moment.js formats and solid class inheritance. This is a relatively significant update for that integration.

Compatibility files for widgets and style manager are updated to use the new background label.

Overall:

  • Coding standards are followed well with proper escaping and translation functions.
  • The small label changes are backward compatible.
  • The introduction of ipinfo integration is a safe additive feature.
  • The update to check-in/check-out input handling enhances compatibility with JetBooking and appears well-structured.

Missing:

  • No explicit tests were seen added for the new Ipinfo API tab or the check-in/check-out input class. Given their complexity, adding unit or integration tests would be advisable.

No security issues found in the changes.

Recommended to test the new Ipinfo tab in admin settings, and verify the check-in/check-out field behavior works correctly with JetBooking.

No major performance concerns noted.

Detailed file impact:

  • assets/src/admin/pages/jfb-settings/tabs/phone-field/*: New IP Info API tab.
  • assets/build/[admin/pages/editor]: asset updated due to frontend JS change.
  • includes/blocks/*: Style manager integration refined.
  • compatibility/*: Minor label changes and a large JS frontend upgrade for Booking.

No breaking changes for public APIs detected.

Suggested changelog entry

`- IMPROVE: Updated UI labels from 'Background Color' to 'Background' for consistency in styling options across multiple blocks and compatibility modules.

  • ADD: Introduced new 'Ipinfo API' settings tab with relevant UI and source texts.
  • IMPROVE: Enhanced check-in/check-out field handling in JetBooking compatibility frontend scripts using improved date formatting and moment.js.
  • IMPROVE: Refactored block style manager initialization to accept external style manager instances for better integration and testability.`

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

🤖 AI PR Review

Risk level: medium

Review

This PR adds a new "Ipinfo API" settings tab to the JetFormBuilder admin settings, including new Vue components and i18n strings for UI elements. It also refactors various parts of the plugin codebase to improve CSS selector consistency (mainly renaming "Background Color" labels to "Background"), improves style manager integration in block base classes, and introduces a new Phone Field block integration with necessary frontend JS. Additionally, the PR modifies compatibility integrations (Elementor, Bricks, Jet Booking) and updates frontend JS for booking checkin-checkout date fields.

Review notes:

  • The new Ipinfo API tab and its Vue components are properly namespaced and use i18n. API keys and help texts include proper escaping and external linking.
  • The added check for block before install triggers a new action, allowing further extensibility.
  • The style manager initialization is improved for more flexible dependency injection.
  • Background color labels changed to "Background" improve clarity and unify UI wording.
  • Frontend booking compatibility rewrite is substantial. It maintains backward compatibility and uses the existing API and JetFormBuilder abstractions.
  • Code follows WordPress Coding Standards and i18n best practices.

No obvious security issues noticed. No major performance regressions expected, but the booking frontend JS update should be verified on various setups.

Testing recommendations:

  • Verify the Ipinfo API tab loads, edits, and saves settings correctly.
  • Review the Phone Field block addition for proper rendering and saving.
  • Confirm all compatibility changes (Elementor, Jet Booking) function properly.
  • Verify multi-step forms and conditional logic are unaffected.

Overall this PR is a solid feature addition with multiple related codebase improvements. Some missing unit or integration tests for the new Ipinfo API tab and Phone Field block could be added to increase coverage.

Suggested changelog entry

- ADD: New Ipinfo API tab to JetFormBuilder settings for integration with Ipinfo.io API.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments