-
Notifications
You must be signed in to change notification settings - Fork 853
Forms: add forms DataViews table to wpbuild dashboard #46837
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 SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
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.
Pull request overview
This PR adds a DataViews-based forms list table to the wp-build version of the Jetpack Forms dashboard. The implementation is adapted from the existing non-wpbuild forms screen to work within the wp-build environment, which uses @wordpress/route for routing instead of react-router.
Changes:
- Added complete DataViews table implementation with forms list, status filtering, and CRUD actions (Trash, Restore, Delete Permanently, Edit)
- Integrated URL-based search parameter synchronization using @wordpress/route
- Added necessary dependencies to package.json (@wordpress/components, @wordpress/core-data, @wordpress/data, @wordpress/date, @wordpress/notices)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/packages/forms/routes/forms/stage.tsx | Replaced placeholder with full DataViews table implementation including forms list, filtering, actions, and confirmation dialogs |
| projects/packages/forms/routes/forms/package.json | Added required WordPress dependencies for DataViews, data management, and notifications |
| projects/packages/forms/changelog/add-forms-list-wpbuild-dashboard | Added changelog entry for the new feature |
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 looks great and works as expected for me! Nicely done!
0bc13b1 to
a8e0961
Compare
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
| "build:dashboard": "webpack --config ./tools/webpack.config.dashboard.js", | ||
| "build:form-editor": "webpack --config ./tools/webpack.config.form-editor.js", | ||
| "build:wp-build": "wp-build", | ||
| "build-production": "NODE_ENV=production BABEL_ENV=production pnpm run build && pnpm run validate", |
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 is odd; I just had the same lint error and fixed it, but the other way around, as if the linter couldn't decide which way around is correct. I simply fixed it with jetpack lint --fix 🤷
(PR was #46857)
Anyway, thanks for fixing it. Let's see if it now stays stable.
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.
The behavior here changed in sort-package-json v3.5.2, and we recently updated from v3.5.0 to v3.6.1 in #46785.
The part I can't figure out is how you managed to need 006519e, as the pnpm-lock there shows v3.6.1 should have been used and we have pnpm configured with verifyDepsBeforeRun: install.
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.
Maybe it fell in some odd space between packages not being updated, and me pushing & opening the PR with old packages still locally installed. Though I would've expected whole PR fail. 🤷
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.
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.
And I see you filed #46868 :-)
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.
A pnpm install will probably fix things. If not, maybe you have to restart your IDE to get it to pick up the changed package.
OTOH, regardless of the IDE, when you git commit then the pre-commit hook running pnpm run lint-file should have triggered the install and then fixed it back.

Proposed changes:
Adds the forms DataViews to table to the forms screen/route in the wp-build version of the dashboard. This code is copied from the non wp-build version of the screen here, and then adapted to the wp-build environment.
This includes:
Not done: View responses. This action shows but does not work. We need to add the single form screen separately.
Screenshot
Note list but also filters, actions, and bulk actions.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Enable this feature flag to wp-build dashboard:
add_filter( 'jetpack_forms_alpha', '__return_true', 20 );Test: