Skip to content

Conversation

@vianasw
Copy link
Contributor

@vianasw vianasw commented Oct 27, 2025

Fixes FORMS-351

To make it easier to select users in the form notification settings, I'm using the FormTokenField dropdown selector variation, which will list all the eligible users we can send notifications to.

Proposed changes:

  • Added __experimentalExpandOnFocus option to make the FormTokenField component behave like a dropdown selector.
  • Added __experimentalAutoSelectFirstMatch option to automatically select the first match when you hit enter.

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:

Before After
Screenshot 2025-10-28 at 17 48 46 Screenshot 2025-10-28 at 17 47 04
  • Enable the feature flag jetpack_forms_enable_notifications.
  • Create a form and enable the toggle Enable notifications for responses in the forms block sidebar Form notifications panel setting.
  • Click on the input under Send notifications to and confirm that a list of users is displayed.
  • Select some users and confirm that the notifications are sent to those users on each form submission.

@vianasw vianasw added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress labels Oct 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 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 update/form-notification-recipients-input branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/form-notification-recipients-input

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

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!

@jp-launch-control
Copy link

jp-launch-control bot commented Oct 27, 2025

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@simison
Copy link
Member

simison commented Oct 28, 2025

Can you add screenshots to the PR as well? Thanks!

@vianasw vianasw force-pushed the update/form-notification-recipients-input branch from 7e30fe0 to 4e9918f Compare October 28, 2025 15:56
@vianasw vianasw requested a review from a team October 28, 2025 16:55
@vianasw vianasw added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 28, 2025
simison
simison previously approved these changes Oct 29, 2025
Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

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

Overall works, but this "can't remove last" is a bit clunky:

Screen.Recording.2025-10-29.at.15.13.05.mov

Not sure what should we do about it tho. Allow leave input empty, effectively disabling the feature?

@vianasw
Copy link
Contributor Author

vianasw commented Oct 29, 2025

Overall works, but this "can't remove last" is a bit clunky:

Screen.Recording.2025-10-29.at.15.13.05.mov
Not sure what should we do about it tho. Allow leave input empty, effectively disabling the feature?

I have mixed feelings about this one too. It's either disable the feature if we leave it empty or default add the post author. I'd suggest merging this and sleeping on it in case we want to change it.

@simison
Copy link
Member

simison commented Oct 29, 2025

Yep not a blocker for merging — can you pass it by Ilona in case she can solve it?

To make it easier to select users in the form notification settings, I'm
using the FormTokenField dropdown selector variation, which will list
all the eligible users we can send notifications to.
@vianasw vianasw force-pushed the update/form-notification-recipients-input branch from 4e9918f to 2702f7d Compare October 29, 2025 21:17
@vianasw vianasw merged commit c92a056 into trunk Oct 29, 2025
67 checks passed
@vianasw vianasw deleted the update/form-notification-recipients-input branch October 29, 2025 21:33
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Oct 29, 2025
@ilonagl
Copy link

ilonagl commented Oct 30, 2025

Thanks for the ping!

Screenshot 2025-10-30 at 17 18 27

The functionality makes sense, we don't want users to leave this empty. The missing piece is communication, so users understand what is happening. Would it be possible to change the helper text to explanation one when user tries to remove user? Like show a red helper text saying that you need at least one recipient for notifications to work?

@ilonagl
Copy link

ilonagl commented Oct 30, 2025

And do we need to a drop-down if there is only one user?
Screenshot 2025-10-30 at 17 21 16

@ilonagl
Copy link

ilonagl commented Oct 30, 2025

If we could align the helper text in both inputs (update the first one to 'Separate with commas or the Enter key.') It would be great!

Screenshot 2025-10-30 at 17 21 52

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 [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.

4 participants