Skip to content

Conversation

enejb
Copy link
Member

@enejb enejb commented Sep 20, 2025

All integration to be extended via an

Proposed changes:

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

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

Testing instructions:

Visit the dashboard to make see the new dummy intergreation.

  • Go to '..'

enejb and others added 4 commits September 19, 2025 18:10
Introduces a centralized Integrations registry for managing form integrations, moving MailPoet integration registration from a hardcoded array to dynamic registration via the new registry. Updates initialization logic, refactors tests, and adds dedicated unit tests for the Integrations registry.
Introduces a new Integration class to encapsulate integration data. Updates Integrations::register to accept either an Integration object or array, improving flexibility. Refactors MailPoet integration registration to use the new class. Adds comprehensive unit tests for Integration and Integrations registration, including object and array handling.
Extracts inline integration components from the IntegrationsModal into separate, reusable component files. This improves code organization, maintainability, and allows for better reusability across the application.

Changes:
- Created ServiceIntegrationCard component for service integrations with form-specific settings support
- Created PluginIntegrationCard component for plugin integrations with full state management
- Updated IntegrationsModal to use hybrid approach with specific cards for known integrations and generic cards for new ones
- Updated dashboard integrations to use the same hybrid pattern
- Refactored both modal and dashboard to use dynamic mapping instead of hardcoded individual cards
- Added proper TypeScript interfaces for component props
- Maintained backward compatibility with existing specific integration components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

Are you an Automattician? The PR will need to be tested on WordPress.com. This comment will be updated with testing instructions as soon the build is complete.

@github-actions github-actions bot added [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/ [Status] In Progress [Tests] Includes Tests labels Sep 20, 2025
Copy link
Contributor

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!

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Sep 20, 2025
Copy link

Code Coverage Summary

Coverage changed in 4 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/class-jetpack-forms.php 5/44 (11.36%) -21.97% 29 💔
projects/packages/forms/src/contact-form/class-contact-form-endpoint.php 573/646 (88.70%) -0.16% 0 💚
projects/packages/forms/src/service/class-mailpoet-integration.php 18/141 (12.77%) 8.86% 0 💚
projects/packages/forms/src/dashboard/integrations/index.tsx 0/22 (0.00%) 0.00% -4 💚

6 files are newly checked for coverage. Only the first 5 are listed here.

File Coverage
projects/packages/forms/src/blocks/contact-form/components/jetpack-integrations-modal/plugin-integration-card.tsx 0/12 (0.00%) 💔
projects/packages/forms/src/blocks/contact-form/components/jetpack-integrations-modal/service-integration-card.tsx 0/11 (0.00%) 💔
projects/packages/forms/src/dashboard/integrations/plugin-integration-card.tsx 0/12 (0.00%) 💔
projects/packages/forms/src/dashboard/integrations/service-integration-card.tsx 0/6 (0.00%) 💔
projects/packages/forms/src/service/class-integration.php 5/5 (100.00%) 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

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/ [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant