Skip to content

Conversation

enejb
Copy link
Member

@enejb enejb commented Oct 2, 2025

Fixes FORMS-302

Adds new feedback/read endpoint and the new UI that lets you mark feedback as read and unread.

Screenshot 2025-10-02 at 7 38 58 AM

This new state is shown as a dot. this is due to the current limitation of the data views which prevent the whole row from being bold.

Proposed changes:

  • Adds a new endpoints for marking feedback responses from being read or unread.
  • Add UI changes so that you see unread feedback responses as read.
  • Add the ability to mark responses as read or unread.

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

See FORMS-302

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Add a form and fill it out.
  • Notice that this response will show up as unread in the forms UI.
  • Notice that you mark previous responses as read and unread.

@enejb enejb added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Package] Forms labels Oct 2, 2025
@enejb enejb changed the title Add/forms unread state Forms: add read/unread state to the UI Oct 2, 2025
Copy link
Contributor

github-actions bot commented Oct 2, 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 add/forms-unread-state branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/forms-unread-state

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 github-actions bot added [Feature] Contact Form [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests labels Oct 2, 2025
Copy link
Contributor

github-actions bot commented Oct 2, 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: October 7, 2025
    • Code freeze: October 6, 2025

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

Copy link

jp-launch-control bot commented Oct 2, 2025

Code Coverage Summary

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

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/inbox/dataviews/actions.js 0/116 (0.00%) 0.00% 30 💔
projects/packages/forms/src/contact-form/class-contact-form-endpoint.php 623/706 (88.24%) -0.56% 10 💔
projects/packages/forms/src/dashboard/inbox/response.js 0/90 (0.00%) 0.00% 7 💔
projects/packages/forms/src/dashboard/inbox/dataviews/index.js 0/132 (0.00%) 0.00% 6 💔
projects/packages/forms/src/contact-form/class-feedback.php 559/577 (96.88%) -0.21% 2 ❤️‍🩹

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.

Copy link
Contributor

@edanzer edanzer left a comment

Choose a reason for hiding this comment

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

This tests fairly well and is an exciting change to see.

The good:

  • Once this PR is loaded, any new form responses show as unread (with red dot).
  • Interacting with unread messages updates status to read (no more dot)
  • Selecting items in bulk and clicking the "Mark unread" button successfully marks them unread (with red dot).
  • Using the actions dropdown for a single response to mark an item read or unread works.
  • Tests pass

Potential improvements:

  • The dot in my testing is small and red. I like the bigger, blue one in the PR description a bit more :). It is a shame we can't otherwise style the un-read item rows more (ie, bolding or background color).
  • Could be done in a follow up, but now that feedback objects have an unread property, I wonder if we could use that to determine the number we show in the notifications bubble in the admin menu for Jetpack and Forms. As is, these are totally unconnected.
    • Example: Say I have 5 unread messages and I see that button Jetpack and Forms. Soon as I click the inbox, that gets cleared even though I still have unread messages. Also marking message read or unread also doesn't affect that.
  • There's a small TS error that needs resolving.
unread-status

@enejb
Copy link
Member Author

enejb commented Oct 2, 2025

Thanks for the review @edanzer!

should we should the red bubble.

Yes we should. This part needs updating. ( I think we should switch to a new option ) and go and update the total unread, Everytime we add a new response and when we switch the read state. Ideally this value would also change as we update the count live on the page.

I updated design to be indicate that the Response is unread by making the different elements bold.
It looks like this now. cc @ilonagl.

Screenshot 2025-10-03 at 12 21 46 AM

@simison simison force-pushed the add/forms-unread-state branch from bd305b5 to 1e06088 Compare October 4, 2025 12:31
Copy link
Contributor

@CGastrell CGastrell left a comment

Choose a reason for hiding this comment

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

Works great! :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Contact Form [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Review This PR is ready for review. [Tests] Includes Tests [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