-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Move block server-side logic into same directory as client-side logic #2014
Conversation
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.
See also: #1095
We need to remove this line:
https://github.com/WordPress/gutenberg/blob/44ad46a/bin/build-plugin-zip.sh#L71
And ensure that block PHP files are included in the generated plugin.
b1b056d
to
bfe31c2
Compare
Codecov Report
@@ Coverage Diff @@
## master #2014 +/- ##
==========================================
+ Coverage 20.21% 20.37% +0.16%
==========================================
Files 135 135
Lines 4225 4490 +265
Branches 717 802 +85
==========================================
+ Hits 854 915 +61
- Misses 2842 2970 +128
- Partials 529 605 +76
Continue to review full report at Codecov.
|
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.
Verified package plugin loads block correctly.
Verified composer lint
surfaces issues in the block PHP file.
gutenberg.php
Outdated
@@ -25,6 +25,7 @@ | |||
require_once dirname( __FILE__ ) . '/lib/parser.php'; | |||
require_once dirname( __FILE__ ) . '/lib/register.php'; | |||
|
|||
// Register server-side code for individual blocks. |
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.
Should we preserve this comment?
…new-block-indicator-style Update 'Add Block Here' indicator style
When working with dynamic blocks it is not ideal for the JS and PHP logic to be separated out in two separate locations. Ideally the dynamic block server rendering logic as well as unit tests could be placed right inside of the same directory as the client logic.
This would also impact the Latest Comments block: #1931.