jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Forms: Add dashboard link to response email

Open dhasilva opened this issue 8 months ago • 8 comments

Part of FORMS-61

Proposed changes:

  • Adds the response link to the email sent after submission

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:

  • In a site where you receive emails after form submissions, submit a response to a form
  • Check that the email now has a button: "View in dashboard"
  • Click on this button
  • Check that you are sent to the dashboard with the correct response pre-selected

2025-06-11_17-56_1

dhasilva avatar Jun 06 '25 22:06 dhasilva

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/forms-email-dashboard-link branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/forms-email-dashboard-link

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[bot] avatar Jun 06 '25 22:06 github-actions[bot]

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.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Review, ...).
  • :white_check_mark: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: 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:


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.

github-actions[bot] avatar Jun 06 '25 22:06 github-actions[bot]

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/class-dashboard-view-switch.php 18/86 (20.93%) 3.65% 1 ❤️‍🩹
projects/packages/forms/src/contact-form/class-contact-form.php 572/947 (60.40%) 0.51% 0 💚

Full summary · PHP report · JS report

Coverage check overridden by https://github.com/Automattic/jetpack/labels/I%20don%27t%20care%20about%20code%20coverage%20for%20this%20PR.

jp-launch-control[bot] avatar Jun 06 '25 22:06 jp-launch-control[bot]

Does it make sense to add some sort of nonce to these emails? So that you can't mark all feedback as spam 🤔 by just formatting a special url and then loading an iframe?

enejb avatar Jun 06 '25 23:06 enejb

Todo:

  • Enej's feedback above; might make sense to separate a simple direct link to its own PR as that's more straightforward
  • Check with Ilona on designs/copy

simison avatar Jun 09 '25 11:06 simison

Thank you for looping me in. I wonder if this should be a proper button? It could help to bring users back to Jetpack Forms dashboard. WDYT? We could place it within the response summary white block (at the end) and name the button something like "View in dashboard"?

ilonagl avatar Jun 11 '25 10:06 ilonagl

It could help to bring users back to Jetpack Forms dashboard.

I think it's fine if we keep them in the emails, and just make the experience in email great like in https://github.com/Automattic/jetpack/pull/43866 — but buttons might make sense for other visual reasons. The link is quite buried indeed.

simison avatar Jun 11 '25 12:06 simison

Not a blocker for merging but @ilonagl thoughts on button colour? Jetpack green vs WP.com blueberry vs black?

simison avatar Jun 17 '25 10:06 simison