-
Notifications
You must be signed in to change notification settings - Fork 0
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 a starting block for development of Server Side Rendered blocks #1
Comments
When I'd created the first version and before I tried to build the block I activated the plugin and visited the front end. Notice: register_block_script_handle was called incorrectly. The asset file for the "editorScript" defined in the "oik-sb/sb-starting-block" block definition is missing. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in C:\apache\htdocs\wordpress\wp-includes\functions.php on line 5313 I haven't checked "Debugging in WordPress" to see if there's a good explanation for |
Testing some of the commands you might try.
|
|
In Windows press |
|
After building the block with Steps to test the block.
|
There are a couple of problems with this most basic first version of the Starting block:
1. The block is not easily selectable in the Block editor.I believe this is due to it not having any toolbar icons. 2. SSR rendering doesn't support colour and typography capabilities out of the boxAdd logic as implemented in UK-tides, oik-magnetic-poetry and oik-css. 3. It would be better if it had a number of controls.
4. Range of editsThe different edits could at least be documented. 5. Support Widget block editorServerSideRender is imported incorrectly. This adds a dependency on wp-editor which the Widget block editor moans about. Fix as documented in bobbingwide/bobbingwide#30 (comment) |
A non-problem of this block is that it doesn't produce the same message that I'm getting in oik-css, |
I started adding the textAlign control, which required me to use the I also discovered that I'd been registering the blocks incorrectly. Reading this documentation I discovered that I'd been registering the block incorrectly in the JavaScript.
I changed the code in sb-starting-block and it worked fine. Re:
I also discovered that I didn't need to define all the attributes that I'd had to define in other blocks.
|
Not sure if I've done this
Therefore this not done either |
npx @wordpress/create-block
is OK but...package.json
The current method requires
Would it be easier to start with a starting block that already has Server Side Rendering built in and copy/cobble that?
If so, what are the steps?
This issue is to attempt to find out.
Requirements
starting
tomy-block-name
Proposed solution
oik-sb/sb-starting-block
. Note: theoik-sb
block prefix is intentionaloik_sb_sb_starting
npm run dev
andnpm run build
Block functionality
get_block_wrapper_attributes()
NFRs
get_block_wrapper_attributes()
aboveThe text was updated successfully, but these errors were encountered: