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

Block API #41236

Open
67 tasks
gziolo opened this issue May 23, 2022 · 28 comments
Open
67 tasks

Block API #41236

gziolo opened this issue May 23, 2022 · 28 comments
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues

Comments

@gziolo
Copy link
Member

gziolo commented May 23, 2022

This overview issue collects an actionable list of impactful tasks that capture possible enhancements to the various Block APIs that exist to power the WordPress block editor.

Block API is intentionally a vague term reflected in the list of action items grouped into categories like block registration, block attributes, block interactions, block modification, etc. What’s in common is that the tasks included aim to resolve the most common friction points or increase the potential of the APIs offered for WordPress block, plugin, and theme authors. In effect, it makes it possible to fulfill the needs of developers wanting to adopt the block editor in their projects.

🛠️ = in development
🤚 = needs to be unblocked

❗Top Things

High-impact projects in active development:

📖 Backlog

Planned tasks that are being actively researched, waiting for developers to pick them up or on hold until they get unblocked.

Block Registration

Block Assets

Block assets are JavaScript (editorScript, script, viewScript) and CSS (editorStyle, style) defined in block.json file.

Block Attributes

Block Supports

Block Variations

Content Modelling

Various

Developer Experience

@gziolo gziolo added [Feature] Block API API that allows to express the block paradigm. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels May 23, 2022
@mtias mtias pinned this issue May 23, 2022
@mtias mtias added the [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues label May 23, 2022
@luisherranz
Copy link
Member

Develop strategies for loading JavaScript on the frontend - head vs footer, but also frontend hydration techniques explored in Implement different hydration techniques block-hydration-experiments#12.

This can be a good first step, but acknowledging that we need more than that in the near future: probably asycn/defer (something like what @adamsilverstein proposed in WordPress/performance#168) or even do the jump to ESM.

Apart from that, I think we should explore a mechanism to export different code depending on the context (Edit, Save, or Frontend): WordPress/block-interactivity-experiments#11

@gziolo
Copy link
Member Author

gziolo commented May 27, 2022

Thank you @luisherranz for your feedback. I included your suggestions together with references.

I also added two more items that I missed initially but have been following closely for a long time:

@fabiankaegy
Copy link
Member

@gziolo I have reviewed the items that are already tracked here and I myself have created 3 issues recently that I think could all be added:

pento pushed a commit to WordPress/wordpress-develop that referenced this issue Sep 14, 2022
Follow-up #54337, [52069]. Part of WordPress/gutenberg#41236. More details in WordPress/gutenberg#33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.



git-svn-id: https://develop.svn.wordpress.org/trunk@54155 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this issue Sep 14, 2022
Follow-up #54337, [52069]. Part of WordPress/gutenberg#41236. More details in WordPress/gutenberg#33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.


Built from https://develop.svn.wordpress.org/trunk@54155


git-svn-id: http://core.svn.wordpress.org/trunk@53714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this issue Sep 14, 2022
Follow-up #54337, [52069]. Part of WordPress/gutenberg#41236. More details in WordPress/gutenberg#33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.


Built from https://develop.svn.wordpress.org/trunk@54155


git-svn-id: https://core.svn.wordpress.org/trunk@53714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
whereiscodedude pushed a commit to whereiscodedude/wpss that referenced this issue Sep 18, 2022
Follow-up #54337, [52069]. Part of WordPress/gutenberg#41236. More details in WordPress/gutenberg#33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.


Built from https://develop.svn.wordpress.org/trunk@54155
ootwch pushed a commit to ootwch/wordpress-develop that referenced this issue Nov 4, 2022
Follow-up #54337, [52069]. Part of WordPress/gutenberg#41236. More details in WordPress/gutenberg#33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.



git-svn-id: https://develop.svn.wordpress.org/trunk@54155 602fd350-edb4-49c9-b593-d223f7449a82
@carolinan carolinan unpinned this issue Feb 7, 2023
@gziolo gziolo pinned this issue Feb 11, 2023
@gziolo
Copy link
Member Author

gziolo commented Feb 13, 2023

☑️ Completed in WordPress 6.1 cycle

Block Registration

Block Assets

Some of the details were tracked in #33542.

Documentation

@gziolo
Copy link
Member Author

gziolo commented Nov 3, 2023

Update

Completed during WP 6.4

Added

Needs review

@gziolo
Copy link
Member Author

gziolo commented Mar 15, 2024

Update

Completed during WordPress 6.5 cycle

New

Resources

@annezazu annezazu removed the [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. label Mar 21, 2024
@gziolo gziolo mentioned this issue Apr 2, 2024
2 tasks
@dmsnell dmsnell mentioned this issue Apr 2, 2024
19 tasks
@dmsnell dmsnell mentioned this issue Jul 1, 2024
12 tasks
@vcanales vcanales unpinned this issue Jul 23, 2024
@priethor priethor pinned this issue Aug 30, 2024
@gziolo
Copy link
Member Author

gziolo commented Oct 10, 2024

Update

Completed during WordPress 6.6 cycle

Completed during WordPress 6.7 cycle

New

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues
Projects
None yet
Development

No branches or pull requests

10 participants