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

Create pattern for hosting page #203

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

bengreeley
Copy link

Creates a new pattern for the hosting page, which will be used at https://wordpress.org/hosting.

To test, create a new page with the slug hosting-2, verify that when viewing the page the new hosting page content loads. (see screenshot).

desktop

Note that this PR is temporarily making changes to https://wordpress.org/hosting-2/ until launch. Launching will be replacing the instance of hosting-2 with hosting in theme-switcher.php

@adamwoodnz
Copy link
Contributor

Regarding the PHP lint error, if you use the content exporter to create a pattern from the prod page the PHP should pass lint. See https://github.com/WordPress/wporg-main-2022#building-patterns-from-page-content

You'll need to add the hosting-2 entry to https://github.com/WordPress/wporg-main-2022/blob/trunk/env/page-manifest.json

I wasn't aware of this workflow either when I started Enterprise, so we probably need to make it more prominent

@adamwoodnz adamwoodnz added the [Component] Content Bugs or issues related to the page content label Feb 13, 2023
@bengreeley
Copy link
Author

Thanks for pointing out that generator @adamwoodnz . Now that I know it's there it shouldn't be an issue, I probably should have asked beforehand.

@adamwoodnz
Copy link
Contributor

No worries :)

One more tip; I find it more efficient to delete all the other entries from the manifest, so that only the page I'm working on gets run

Comment on lines +19 to +20
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|60"},"blockGap":"0px","margin":{"top":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)"><!-- wp:paragraph {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|30"}}}} -->
Copy link
Contributor

Choose a reason for hiding this comment

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

All these blocks that go to the edge of the page should use the Edge Spacing preset on left and right. This gives 80px padding on large screens and clamps to 20px on small.

@adamwoodnz adamwoodnz linked an issue Feb 13, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Content Bugs or issues related to the page content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Hosting Landing Page
2 participants