Skip to content
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

Writing prompts: get prompt by id when answering a specific prompt #28856

Closed
wants to merge 4 commits into from

Conversation

creativecoder
Copy link
Contributor

@creativecoder creativecoder commented Feb 8, 2023

Fixes Automattic/wp-calypso#71938

Proposed changes:

When answering a writing prompt, fetch by the specified prompt id, rather than using the current date.

The main benefit is that older links for past daily prompts in email or notifications will continue to work with the correct prompt.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

pe7F0s-uo-p2

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

Note: requires the wpcom patch D100649-code

  • Activate the experimental editor extensions with define( 'JETPACK_EXPERIMENTAL_BLOCKS', true );, or the option in the Jetpack beta plugin
  • Apply the diff D100649-code to your wpcom sandbox and specify your sandbox domain using the JETPACK__SANDBOX_DOMAIN constant.
  • Specify a prompt id when creating a new post, such as /wp-admin/post-new.php?answer_prompt=1810
  • You should see that prompt displayed as a pullquote in the editor.
  • Start a new post with a non-existant prompt id, like /wp-admin/post-new.php?answer_prompt=1, and you should see a fallback prompt.

@creativecoder creativecoder added [Status] Needs Review To request a review from Crew. Label will be renamed soon. DO NOT MERGE don't merge it! [Block] Blogging Prompts labels Feb 8, 2023
@creativecoder creativecoder self-assigned this Feb 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run

bin/jetpack-downloader test jetpack update/get-blogging-prompts-by-id

to get started. More details: p9dueE-5Nn-p2

@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Feb 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: March 7, 2023.
  • Scheduled code freeze: February 28, 2023.

@creativecoder creativecoder requested a review from a team February 8, 2023 23:56
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests well for me. 🚢

@jeherve jeherve added [Status] Needs Team Review and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Feb 10, 2023
@creativecoder
Copy link
Contributor Author

Closing, as this will be replaced by #29433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Blogging Prompts DO NOT MERGE don't merge it! [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing prompts: fetch prompt from API by id
2 participants