WIP: Forms: Test wp-build
Resolves FORMS-442
Summary
This PR tests using wp-build instead of our custom webpack configuration for the form responses route. It serves as an exploration of whether wp-build can replace our existing build setup.
What this tests:
- wp-build compatibility: Can wp-build handle our Forms package build requirements?
Features implemented:
- New route at
/responses/$viewusing@wordpress/route
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)?
Testing instructions:
- Build the wp-build assets:
cd projects/packages/forms pnpm run build:wp-build - Ensure you have a site with Jetpack Forms active and some form submissions
- Navigate to wp-admin > Jetpack > Forms2
- Compare with the existing Forms dashboard to verify feature parity:
- Switch between Inbox, Spam, and Trash tabs
- Select a response to view details in the inspector panel
- Bulk select multiple responses
- Use actions: Mark as read/unread, Mark as spam, Move to trash
- Search for responses
- Verify pagination works correctly
- Check that unread indicators display properly
- etc. :)
- Confirm the new wp-build based interface behaves the same as the original
Thank you for your PR!
When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
- :white_check_mark: Include a description of your PR changes.
- :red_circle: Add a "[Status]" label (In Progress, Needs Review, ...).
- :red_circle: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
- :white_check_mark: Add testing instructions.
- :red_circle: Specify whether this PR includes any changes to data or privacy.
- :white_check_mark: 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 :robot:
:red_circle: Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so:
## Does this pull request change what data or activity we track or use?
My PR adds *x* and *y*.
Follow this PR Review Process:
- Ensure all required checks appearing at the bottom of this PR are passing.
- Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
- You can use GitHub's Reviewers functionality to request a review.
- 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!
@lezama I ran into issues while building this.
✘ [ERROR] Cannot find package '@wordpress/primitives' imported from /Users/enej/a8c/jetpack/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_6e3b24cbe56a8b07f44cc453e5df0d4d/node_modules/@wordpress/build/src/package-utils.mjs [plugin wordpress-externals]
../../../node_modules/.pnpm/@[email protected]_patch_hash=2659f08edd4c0250f15fb428f013852a17e84da9c745e6dae6307de837e4d30b_react@18.3.1/node_modules/@wordpress/icons/build-module/library/not-allowed.js:2:26:
2 │ import { Path, SVG } from "@wordpress/primitives";
@enejb build issues solved in https://github.com/Automattic/jetpack/pull/46206/commits/84c94a885923f939163987bca3b48b49f71c0a74 (Slack debugging convo p1764892504026579-slack-C052XEUUBL4)
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 or WordPress.com Site Helper), and enable the
add/forms-wp-build-responsesbranch. - To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/forms-wp-build-responses
bin/jetpack-downloader test jetpack-mu-wpcom-plugin add/forms-wp-build-responses
Interested in more tips and information?
- In your local development environment, use the
jetpack rsynccommand 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
Code Coverage Summary
Coverage changed in 6 files. Only the first 5 are listed here.
| File | Coverage | Δ% | Δ Uncovered |
|---|---|---|---|
| projects/packages/forms/src/dashboard/class-dashboard.php | 23/114 (20.18%) | -3.54% | 17 💔 |
| projects/packages/forms/src/blocks/contact-form/components/jetpack-integration-controls.js | 0/16 (0.00%) | 0.00% | 1 ❤️🩹 |
| projects/packages/forms/src/blocks/contact-form/components/jetpack-integrations-modal/helpers/hostinger-reach.tsx | 0/8 (0.00%) | 0.00% | 1 ❤️🩹 |
| projects/packages/forms/src/blocks/contact-form/components/jetpack-integrations-modal/helpers/mailpoet.tsx | 0/10 (0.00%) | 0.00% | 1 ❤️🩹 |
| projects/packages/forms/src/abilities/class-forms-abilities.php | 207/233 (88.84%) | 0.45% | 0 💚 |
1 file is newly checked for coverage.
| File | Coverage |
|---|---|
| projects/packages/forms/src/blocks/contact-form/components/help-message/index.jsx | 0/3 (0.00%) 💔 |
Full summary · PHP report · JS report
If appropriate, add one of these labels to override the failing coverage check: https://github.com/Automattic/jetpack/labels/Covered%20by%20non-unit%20tests https://github.com/Automattic/jetpack/labels/Coverage%20tests%20to%20be%20added%20later https://github.com/Automattic/jetpack/labels/I%20don%27t%20care%20about%20code%20coverage%20for%20this%20PR