-
Notifications
You must be signed in to change notification settings - Fork 817
Blogging prompt: Fix Simple #43597
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
Blogging prompt: Fix Simple #43597
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! 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. |
Code Coverage SummaryCoverage changed in 1 file.
|
8a43ea8
to
d587cca
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.
Just noting some testing so far. When I find a simple site where this is not working, these current draft changes do seem to fix it consistently. On atomic, the feature continues to work as expected as well.
8cfc771
to
f7d8fde
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.
It looks reasonable and it tested well as noted.
It looks like the only other place we use waitForEditor
is with the reader repost that inserts the embed block. It also seems odd that I haven't been able to reproduce any issues with that flow. It looks like the main difference is that uses resetEditorBlocks
while this uses insertBlocks
, in retrospect I wonder if that reset action makes more sense here and doesn't have the same issue with inconsistency? 🤔
const unsubscribe = subscribe( () => { | ||
const blocks = select( 'core/block-editor' ).getBlocks(); | ||
|
||
if ( blocks.length > 0 ) { | ||
clearTimeout( timeoutId ); |
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.
Would it make sense to check isCleanNewPost here as well?
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.
Yes, thanks for catching that! Updated in f22d317
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.
I had to revert that change -- for some reason checking isCleanNewPost
too makes it fail intermittently again. 😢 It seems like it created another race condition.
@Addison-Stavlo Summing up our conversation in Slack: p1748360821224579/1747465988.418239-slack-C03NLNTPZ2T We could potentially switch to |
f22d317
to
9b71255
Compare
This reverts commit 9b71255.
Fixes https://linear.app/a8c/issue/CML-493/daily-writing-prompt-broken-opens-blank-new-post
Proposed changes:
waitForEditor
wasn't resolving correctly because it's no longer a "clean" new post (has a block).Other information:
Jetpack product discussion
See p1747465988418239-slack-C03NLNTPZ2T
Does this pull request change what data or activity we track or use?
N/A
Testing instructions:
bin/jetpack-downloader test jetpack fix/simple-blogging-prompts
to your sandbox.allow-sandbox-production-writes "10 minutes"
/wp-admin/post-new.php?answer_prompt=1944
to the site URL if needed to test.