[wp-meta] [Making WordPress.org] #7782: Add block-variation detection
Making WordPress.org
noreply at wordpress.org
Tue Sep 24 00:56:30 UTC 2024
#7782: Add block-variation detection
------------------------------+---------------------
Reporter: carstenbach | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Resolution:
Keywords: |
------------------------------+---------------------
Comment (by dufresnesteven):
> Please help me understand, why you differentiate between variations of
core blocks and variations of custom blocks? Does this make any difference
to the user, to the parsing or to the preview? Sorry, I don't understand
that.
With custom blocks, you typically provide a block.json file. You can
include variations in your block.json file. So if you have a "Sports"
block, with a "Hockey" and a "Basketball" variation we could easily parse
those out. However, for core blocks, you don't provide the block.json
file, Gutenberg does, so you are forced to register variations in code.
Now, looking up our code, I thought we abandoned static .php and .js/jsx
file parsing and relied solely on block.json files, but it appears like
[https://github.com/WordPress/wordpress.org/blob/ea21d545ab8283f761f940c1df187f64ede8a6df/wordpress.org/public_html
/wp-content/plugins/plugin-directory/cli/class-import.php#L1095 I am
wrong] although we do
[https://github.com/WordPress/wordpress.org/blob/ea21d545ab8283f761f940c1df187f64ede8a6df/wordpress.org/public_html
/wp-content/plugins/plugin-directory/cli/class-import.php#L879 prefer it].
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7782#comment:6>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list