Skip to content

Conversation

@edanzer
Copy link
Contributor

@edanzer edanzer commented Nov 5, 2025

Fixes FORMS-386

Proposed changes:

Disables the Export button on the form dashboard if the current screen (inbox/spam/trash) has no form entries (nothing to export).

Example
disable-export

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 linear issue.

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

No.

Testing instructions:

  • Go to Jetpack > Forms
  • With Spam or Trash or Inbox empty, go to that screen and confirm button is disabled
  • Confirm button is still enabled and works like normal if there are form entries on the current screen

@edanzer edanzer requested a review from a team November 5, 2025 20:17
@edanzer edanzer self-assigned this Nov 5, 2025
@edanzer edanzer added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Pri] Normal [Package] Forms labels Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 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-disable-export-button branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/forms-disable-export-button

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 Nov 5, 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!

@jp-launch-control
Copy link

jp-launch-control bot commented Nov 5, 2025

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/components/actions-dropdown-menu/index.tsx 0/15 (0.00%) 0.00% 2 ❤️‍🩹
projects/packages/forms/src/dashboard/inbox/export-responses/index.tsx 0/7 (0.00%) 0.00% 2 ❤️‍🩹

Full summary · PHP report · JS report

@enejb
Copy link
Member

enejb commented Nov 6, 2025

This PR needs a rebase and it fixes the issue for desktop! Nice work.

I also want to note that on mobile we are still showing the button and it is clickable. (This can be addressed in a different PR)

Do we want to hide it in this case since there is no tooltips on mobile.

See
Screenshot 2025-11-06 at 12 08 00 PM

Copy link
Member

@enejb enejb left a comment

Choose a reason for hiding this comment

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

These changes look good for desktop.

enejb

This comment was marked as duplicate.

@edanzer edanzer force-pushed the update/forms-disable-export-button branch from 3834d93 to ef066f5 Compare November 6, 2025 20:27
title: __( 'Integrations', 'jetpack-forms' ),
},
...( exportData.show
...( exportData.show && hasItems
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was suggested we also go ahead and hide the Export item on the mobile menu if there's nothing to export. As part of this, I moved the Create Form button up so Export is the last item. This reduces jumpiness. With the change, the Export button only appears when there are form entries on the current screen. But this also means it's hidden while form entries are loading.

If export button is higher up, the whole menu jumps as items load or are removed from, say, inbox or spam or trash.

Video
https://github.com/user-attachments/assets/0a067ffe-fde8-40ba-bbd6-7ddf8e06e7cd

Copy link
Member

@enejb enejb left a comment

Choose a reason for hiding this comment

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

This worked well for me!

@edanzer edanzer merged commit c3b96d1 into trunk Nov 7, 2025
69 checks passed
@edanzer edanzer deleted the update/forms-disable-export-button branch November 7, 2025 00:02
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Contact Form [Package] Forms [Pri] Normal [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.

3 participants