Skip to content

Conversation

@lezama
Copy link
Contributor

@lezama lezama commented Dec 4, 2025

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/$view using @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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 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 🤖


🔴 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:

  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 Dec 4, 2025
@lezama lezama changed the title Jetpack Forms: Add wp-build based form responses route with DataViews Jetpack Forms: Test wp-build based form responses route Dec 4, 2025
@lezama lezama changed the title Jetpack Forms: Test wp-build based form responses route WIP: Jetpack Forms: Test wp-build based form responses route Dec 4, 2025
@lezama lezama added the DO NOT MERGE don't merge it! label Dec 4, 2025
@enejb
Copy link
Member

enejb commented Dec 5, 2025

@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";

@simison simison added [Status] In Progress and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Dec 5, 2025
@simison
Copy link
Member

simison commented Dec 5, 2025

@enejb build issues solved in 84c94a8 (Slack debugging convo p1764892504026579-slack-C052XEUUBL4)

@lezama lezama force-pushed the add/forms-wp-build-responses branch from 84c94a8 to 9b8cbe9 Compare December 5, 2025 12:58
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 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 or WordPress.com Site Helper), and enable the add/forms-wp-build-responses branch.
  • 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 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

@lezama lezama changed the title WIP: Jetpack Forms: Test wp-build based form responses route WIP: Forms: Test wp-build Dec 5, 2025
@jp-launch-control
Copy link

jp-launch-control bot commented Dec 5, 2025

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/class-dashboard.php 23/111 (20.72%) -2.99% 14 💔
projects/packages/forms/src/abilities/class-forms-abilities.php 207/233 (88.84%) 0.45% 0 💚

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants