-
Notifications
You must be signed in to change notification settings - Fork 839
Forms: disable export button if no form entries #45777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 2 files.
|
enejb
left a comment
There was a problem hiding this 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.
3834d93 to
ef066f5
Compare
| title: __( 'Integrations', 'jetpack-forms' ), | ||
| }, | ||
| ...( exportData.show | ||
| ...( exportData.show && hasItems |
There was a problem hiding this comment.
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
enejb
left a comment
There was a problem hiding this 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!

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

Other information:
Jetpack product discussion
See linear issue.
Does this pull request change what data or activity we track or use?
No.
Testing instructions: