-
Notifications
You must be signed in to change notification settings - Fork 841
add id-value shape for compiled fields, use it on webhooks #46209
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
base: refactor/use-feedback-object-in-webhooks
Are you sure you want to change the base?
add id-value shape for compiled fields, use it on webhooks #46209
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 🤖 🔴 Action required: Please add missing changelog entries for the following projects: Use the Jetpack CLI tool to generate changelog entries by running the following command: Follow this PR Review Process:
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:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
| } | ||
|
|
||
| return $fields; | ||
| return $feedback->get_compiled_fields( 'webhook', 'id-value' ); |
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.
We could just remove this private method and call the $feedback->get_compiled_fields( 'webhook', 'id-value' ); directly instead.
Code Coverage SummaryNo summary data is available for parent commit 2cecb25, so cannot calculate coverage changes. 😴 If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 2cecb25 is available. Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
| $compiled_fields[ $field->get_label( $context, $count_field_labels[ $label ] ) ] = $field->get_render_value( $context ); | ||
| break; | ||
| case 'id-value': | ||
| $compiled_fields[ $field->get_form_field_id() ] = $field->get_render_value( $context ); |
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.
Lets also add a test for this new shape :)
See: p1764958359382309/1764949794.021509-slack-C052XEUUBL4
Proposed changes:
This PR adds a new data shape for compiled fields, returning as:
Other information:
Jetpack product discussion
p1764958359382309/1764949794.021509-slack-C052XEUUBL4
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Follow instructions on the original PR #46201
You should get the same results.