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

Coming Soon: check for coming soon mode on 404 #47945

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Dec 2, 2020

Changes proposed in this Pull Request

Hi!

In this PR we are adding an is404(), after which we'll decide whether to show the coming soon page.

This primarily captures the case where the user edits the post's visibility in the editor by switching the post status to private.

Individual private posts are not available at all to the public and will 404.

Screen Shot 2020-12-02 at 2 06 25 pm

More information: https://wordpress.org/support/article/content-visibility/

Props to @charliescheer and @katiebethbrown for alerting us to this!

Testing instructions

Checkout this branch

Run yarn dev --sync in apps/editing-toolkit

Sandbox a test site. Ensure that site is launched.

Enable Coming Soon mode over at /settings/general/{your_site}

Screen Shot 2020-12-02 at 2 06 29 pm

Now head to any post or page, and make that individual post/page private

Screen Shot 2020-12-02 at 2 11 53 pm

Visit this page in an incognito browser

You should see the Coming Soon page

coming-soon-v2-is-here

…st's visibility in the editor, by switching the post status to private. Individual private posts are not available at all to the public and will 404. Here we're letting 404s through so we can check if coming soon is enabled.
@ramonjd ramonjd added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Coming Soon Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin labels Dec 2, 2020
@ramonjd ramonjd requested a review from a team December 2, 2020 03:17
@ramonjd ramonjd self-assigned this Dec 2, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Tests nicely on my test simple site, thanks for the fix! 👍

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D53604-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2

@ramonjd ramonjd merged commit e0b46e3 into trunk Dec 2, 2020
@ramonjd ramonjd deleted the add/coming-soon-404-check branch December 2, 2020 03:46
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coming Soon Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants