Skip to content

Conversation

simison
Copy link
Member

@simison simison commented Oct 8, 2025

Follow-up to:

Proposed changes:

  • Componentize view-action buttons
  • Use the components in modal header for mobile, as supported by Modal component
  • Note that the modal component provides us with a "header" and a close button; I can't adjust styles for those since they're from the component. What we can do, however, is remove the modal's header entirely and provide our custom header. Might make sense, for example, to not have "Response" title visible here, as it's obvious.

Before

image image

After

Screenshot 2025-10-08 at 15 50 57 Screenshot 2025-10-08 at 15 51 05
Screen.Recording.2025-10-08.at.15.50.14.mov

Note that in desktop view we have "mark as unread/read" action, but in mobile view we don't have a good indicator showing what changed so for now I'm leaving those out:

image

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:

  • Try inbox on mobile and desktop; all actions continue to work

@simison simison added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress [Package] Forms labels Oct 8, 2025
@simison simison requested review from a team and ilonagl October 8, 2025 13:06
Copy link
Contributor

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

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

Copy link
Contributor

github-actions bot commented Oct 8, 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!

Copy link

jp-launch-control bot commented Oct 8, 2025

Code Coverage Summary

Coverage changed in 3 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/inbox/dataviews/index.js 0/188 (0.00%) 0.00% 37 💔
projects/packages/forms/src/dashboard/inbox/dataviews/actions.js 0/149 (0.00%) 0.00% -2 💚
projects/packages/forms/src/dashboard/inbox/response.js 0/102 (0.00%) 0.00% -44 💚

2 files are newly checked for coverage.

File Coverage
projects/packages/forms/src/dashboard/components/response-actions/index.tsx 0/48 (0.00%) 💔
projects/packages/forms/src/dashboard/components/response-navigation/index.tsx 0/2 (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.

@simison simison force-pushed the update/forms-view-actions-modal branch from 4adcd80 to 3e24ae4 Compare October 8, 2025 13:45
@simison simison added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 9, 2025
@simison simison force-pushed the update/forms-view-actions-modal branch from 3e24ae4 to 6038858 Compare October 9, 2025 07:57
@simison simison marked this pull request as ready for review October 9, 2025 07:58
@simison
Copy link
Member Author

simison commented Oct 9, 2025

I think my biggest concern now is proximity of destructive and navigation actions:

image

Size difference with X and the rest is slightly annoying but also from modal component itself.

We could get rid of the heading copy, and move spam/trash actions to left, and shrink the X:

Screenshot 2025-10-09 at 11 07 56

We would end up inconsistent with other modals around Gutenberg, but perhaps better overall.

@ilonagl
Copy link

ilonagl commented Oct 9, 2025

I don't know why, but I still see the older version. 🤔

Screenshot 2025-10-09 at 11 11 03 Screenshot 2025-10-09 at 11 09 20

@ilonagl
Copy link

ilonagl commented Oct 9, 2025

yeah, I have the same thoughts about the icons.

We need to provide tappable touch target. For example, each icon can be 24x24 px, but it should sit inside a button or area that is at least 48x48 px. and there should be at least 8px spacing between adjacent tap targets to avoid accidental touches.

We could get rid of the heading copy, and move spam/trash actions to left, and shrink the X:

Given my points above, I'd lean towards this approach.

ilonagl
ilonagl previously approved these changes Oct 9, 2025
@enejb
Copy link
Member

enejb commented Oct 9, 2025

This PR is not quite ready.

It changes the wrong modal. So you end up seeing the one you resize but not actual one.
To replicate this issue you need to fist resize the window and then refresh the view.

@enejb
Copy link
Member

enejb commented Oct 9, 2025

I looked into this and the Modal that you see is created by a dataView action. currently they don't support header props such as headerActions. See https://developer.wordpress.org/block-editor/reference-guides/packages/packages-dataviews/#rendermodal.

I think the approach to take here would be to add our own custom header or add support for such action on the action model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Contact Form [Package] Forms [Status] In Progress [Status] Needs Review This PR is ready for review. [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