Skip to content

Conversation

@edanzer
Copy link
Contributor

@edanzer edanzer commented Nov 26, 2025

Proposed changes:

This PR

  • adds a filter to show/hide integrations on the forms dashboard (jetpack_forms_show_dashboard_integrations)
  • adds a filter to show/hide integrations in the block editor (jetpack_forms_show_block_integrations)
  • passes the values of these filters to the frontend via our config endpoint
  • conditionally shows/hides the integration modal based on those values

Context: Right now, we have a single jetpack_forms_is_integrations_enabled filter. We're using it to hide the integrations modal in CIAB. But for CIAB, we want to hide integrations in the dashboard and show them in the block editor. The current filter doesn't allow that nuance.

Separately, we'll be updating the is_integrations_enabled filter to be more complete. Disabling integrations should will prevent integrations API request and post-submission processing of integrations, neither of which it's doing now. So this will be the wrong filter to use if the goal is just to hide integrations in the dashboard.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Slack: p1763398457134859-slack-C052XEUUBL4

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

Ensure you can see integrations modal in both dashboard and block editor to start.

Add the following filter. Confirm integrations still show in block editor but not in dashboard.
add_filter( 'jetpack_forms_show_dashboard_integrations', '__return_false', 20 );

Remove the last filter and add the following. Confirm integrations still show in dashboard but not in block editor.
add_filter( 'jetpack_forms_show_block_integrations', '__return_false', 20 );

@edanzer edanzer requested a review from a team November 26, 2025 19:38
@edanzer edanzer self-assigned this Nov 26, 2025
@edanzer edanzer added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Block] Contact Form Form block (also see Contact Form label) [Package] Forms labels Nov 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the add/forms-integrations-display-filters branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/forms-integrations-display-filters

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Feature] Contact Form [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Nov 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: December 2, 2025

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

'canActivatePlugins' => current_user_can( 'activate_plugins' ),
'exportNonce' => wp_create_nonce( 'feedback_export' ),
'newFormNonce' => wp_create_nonce( 'create_new_form' ),
'emptyTrashDays' => defined( 'EMPTY_TRASH_DAYS' ) ? EMPTY_TRASH_DAYS : 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only thing changing here is we're adding the two new flags. Everything else is just spacing.

@jp-launch-control
Copy link

jp-launch-control bot commented Nov 26, 2025

Code Coverage Summary

Coverage changed in 5 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/blocks/contact-form/edit.tsx 0/273 (0.00%) 0.00% 1 ❤️‍🩹
projects/packages/forms/src/dashboard/components/layout/index.tsx 0/10 (0.00%) 0.00% 1 ❤️‍🩹
projects/packages/forms/src/dashboard/inbox/stage/index.js 0/143 (0.00%) 0.00% 1 ❤️‍🩹
projects/packages/forms/src/class-jetpack-forms.php 8/20 (40.00%) 6.67% 0 💚
projects/packages/forms/src/contact-form/class-contact-form-endpoint.php 785/908 (86.45%) 0.03% 0 💚

Full summary · PHP report · JS report

CGastrell
CGastrell previously approved these changes Nov 26, 2025
Copy link
Contributor

@CGastrell CGastrell left a comment

Choose a reason for hiding this comment

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

Works as described! :shipit:

@edanzer edanzer force-pushed the add/forms-integrations-display-filters branch from 95c2d48 to a89ab9f Compare December 1, 2025 15:58
@edanzer edanzer force-pushed the add/forms-integrations-display-filters branch from a89ab9f to e521466 Compare December 1, 2025 19:10
@edanzer edanzer merged commit fc07baa into trunk Dec 1, 2025
69 checks passed
@edanzer edanzer deleted the add/forms-integrations-display-filters branch December 1, 2025 19:47
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Dec 1, 2025
@github-actions github-actions bot added this to the jetpack/15.3 milestone Dec 1, 2025
edanzer added a commit that referenced this pull request Dec 1, 2025
edanzer added a commit that referenced this pull request Dec 1, 2025
edanzer added a commit that referenced this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants