-
Notifications
You must be signed in to change notification settings - Fork 841
Forms: Proposal for editable custom thank you message after submission #45601
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: trunk
Are you sure you want to change the base?
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.
6 files are newly checked for coverage. Only the first 5 are listed here.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
| { __( 'Submit Preview', 'jetpack-forms' ) } | ||
| </ToolbarButton> | ||
| </ToolbarGroup> | ||
| ) } |
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.
Thoughts:
- Seems promising to me! This kind of toggling seems like the right approach.
- The basic functionality works in the editor - toggling back and forth, editing the confirmation message.
- As you noted, the frontend isn't working - it shows both form and confirmation message.
- "Submit Preview" seems long for the toolbar and not quite right. It would be good to find a single, short word if we're going to have a word. Options might be "Message", "Response", or "Thanks". I do wonder if adding text-base links to the toolbar is scalable though. "Form | Reponse" is already a lot of text.
- I'm surprised how many distince places we need to add code through the edit.js file for this to work.
- Mostly separate point - the edit.js for for the form block is getting very long and complicated. We should consider extracting some logic to hooks or something. I find that file hard to follow as is.
a65fe61 to
5a2ec31
Compare
Part of FORMS-246
Proposed changes:
This is an experiment for editing the post-submission message in the block editor via a toggle, like the HTML or Markdown blocks do, but editable.
The feature is under an alpha flag and the frontend is not implemented.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
forms_alphaflagBeware: If you save a form with a custom thank you, the post content is changed and the thank you will be rendered in the frontend even with the flag disabled