Skip to content

Conversation

@lezama
Copy link
Contributor

@lezama lezama commented Jun 12, 2025

Proposed changes:

This PR introduces multi-step functionality to Jetpack Forms. It allows users to break down long forms into multiple, manageable steps, enhancing user experience—especially for complex forms.

Key Changes

  • New "Multi-step Form" Variation
    A new variation for the Form block has been added to streamline creation of multi-step forms.

  • New Blocks Introduced

    • Form Step: A container block for fields within a single step.
    • Step Container: A wrapper block that holds all Form Step blocks.
    • Form Progress Indicator: A visual bar that displays the user's progress through the form.
    • Step Navigation: Navigation buttons ("Next" and "Previous") for stepping through the form.

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?

No.

Testing instructions:

  1. Create a new Form block and select the "Multi-step Form" variation.
  2. Add Form Step blocks and place fields inside each.
  3. Play with the Form Progress Indicator and Step Navigation blocks.
  4. Preview the form and verify step navigation and progress bar behave correctly.
  5. Test in both the block editor and front-end.
  6. Confirm that form submission works correctly across all steps.

* Rebase on top of latest trunk of #43214. Check there for commit details!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 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-multistep-rebased branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/forms-multistep-rebased
bin/jetpack-downloader test jetpack-mu-wpcom-plugin add/forms-multistep-rebased

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
Copy link
Contributor

github-actions bot commented Jun 12, 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: July 1, 2025
    • Code freeze: June 30, 2025

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

@jp-launch-control
Copy link

jp-launch-control bot commented Jun 12, 2025

Code Coverage Summary

Coverage changed in 12 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/blocks/contact-form/edit.js 0/202 (0.00%) 0.00% 163 💔
projects/packages/forms/src/contact-form/class-contact-form-plugin.php 419/1140 (36.75%) -3.42% 97 💔
projects/packages/forms/src/modules/form/view.js 0/148 (0.00%) 0.00% 24 💔
projects/packages/forms/src/contact-form/class-contact-form.php 561/957 (58.62%) -1.27% 21 💔
projects/plugins/jetpack/extensions/blocks/button/edit.js 17/24 (70.83%) -20.08% 6 💔

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

File Coverage
projects/js-packages/shared-extension-utils/src/has-feature-flag.js 0/6 (0.00%) 💔
projects/packages/forms/src/blocks/form-progress-indicator/edit.js 0/9 (0.00%) 💔
projects/packages/forms/src/blocks/form-progress-indicator/index.js 0/2 (0.00%) 💔
projects/packages/forms/src/blocks/form-progress-indicator/save.js 0/3 (0.00%) 💔
projects/packages/forms/src/blocks/form-step-container/edit.js 0/4 (0.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.

@lezama lezama force-pushed the add/forms-multistep-rebased branch 2 times, most recently from 89a80bd to 32f212c Compare June 13, 2025 00:20
@github-actions github-actions bot added [Block] Button [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jun 13, 2025
@lezama lezama force-pushed the add/forms-multistep-rebased branch from 9050e7c to 32ee877 Compare June 16, 2025 14:14
@lezama lezama added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Jun 16, 2025
@lezama lezama changed the title WIP: Forms: Multistep rebase Forms: Multistep rebase Jun 16, 2025
@github-actions github-actions bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Jun 16, 2025
@lezama lezama added the [Status] Needs Review This PR is ready for review. label Jun 16, 2025
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Jun 16, 2025
@dhasilva dhasilva added [Status] Needs Review This PR is ready for review. [Type] Feature Development of a new feature 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 Jun 16, 2025
@lezama lezama force-pushed the add/forms-multistep-rebased branch from ae15f5c to d6d1652 Compare June 23, 2025 17:27
@lezama lezama merged commit 6da785b into trunk Jun 23, 2025
74 of 75 checks passed
@lezama lezama deleted the add/forms-multistep-rebased branch June 23, 2025 17:48
@github-actions github-actions bot added this to the jetpack/14.8 milestone Jun 23, 2025
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Jun 23, 2025
@enejb enejb mentioned this pull request Jun 23, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] AI Assistant [Block] Button [Block] Contact Form Form block (also see Contact Form label) [Block] Recipe [Feature] Contact Form [JS Package] Shared Extension Utils [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA [Type] Feature Development of a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants