-
Notifications
You must be signed in to change notification settings - Fork 814
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
Build: Server-side Render UpgradeNudge for use in PHP #13070
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
This is an automated check which relies on |
ockham, Your synced wpcom patch D30515-code has been updated. |
b1742fb
to
c5894de
Compare
99de8db
to
cbfadd5
Compare
ockham, Your synced wpcom patch D30515-code has been updated. |
bb7240e
to
dfffa6f
Compare
ockham, Your synced wpcom patch D30515-code has been updated. |
2 similar comments
ockham, Your synced wpcom patch D30515-code has been updated. |
ockham, Your synced wpcom patch D30515-code has been updated. |
ockham, Your synced wpcom patch D30515-code has been updated. |
4 similar comments
ockham, Your synced wpcom patch D30515-code has been updated. |
ockham, Your synced wpcom patch D30515-code has been updated. |
ockham, Your synced wpcom patch D30515-code has been updated. |
ockham, Your synced wpcom patch D30515-code has been updated. |
Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>
Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>
Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>
TIL about the whitelist! Thanks for doing that, I installed the PHPCS extension for VS Code.
Seems unrelated 🤔 since I'm not using a
This makes a ton of sense to me 👍 /cc @simison @mtias
Yay, thanks! Can I ask for another 👍 now that I've applied suggestions and added a few i18n-to-php fixes and unit tests? 😅 |
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.
This looks good to me! 🚢 !
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.
Nice catch with __()
vs other translation functions and thanks for adding tests.
There's no point to it, the generated comments just bloat the CSS and license.txt files. Note Webpack already defaults it to true for `mode: development` builds, where it makes a little more sense for the comments to be present. It's not clear why it was ever being set in the first place, neither #12463 nor #13070 seem to have any discussion about the additions.
…21727) There's no point to it, the generated comments just bloat the CSS and license.txt files. Note Webpack already defaults it to true for `mode: development` builds, where it makes a little more sense for the comments to be present. It's not clear why it was ever being set in the first place, neither #12463 nor #13070 seem to have any discussion about the additions.
Fixes #13040.
This PR adds infrastructure to server-side render individual React components during build so they can be used in PHP. The idea is that props can be passed to the component using a simplistic templating language on the server side. The benefit is that we'll be able to re-use markup and styling and don't have to duplicate code in PHP.
This is inspired by prior art in
static.jsx
-- see e.g.#12381 -- but hopes to apply the same principle in a cleaner, more granular way (component level).It also adds functionality to fetch plans data from the relevant WP.com endpoint.
Changes proposed in this Pull Request:
Build: Server-side Render UpgradeNudge for use in PHP
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Adds feature to existing part.
Testing instructions:
Create a new jurassic.ninja site, connect to WP.com, selecting a free plan.
Start a new post and insert the Simple Payments block. Fill in some information and publish the post.
Verify that in the frontend, you see a warning that looks like in the editor.
TODO
static.css
. We'd like a separate style file. Do we even need the rest instatic.css
? Can we drop that?import React from 'react'
, use@wordpress/element
insteadFollow-up
Minify styling
/cc @sirreal