Closed bobbingwide closed 2 years ago
In 2.3 the GitHub block produces a deprecated message in the console
wp.blocks.InspectorControls.TextControl is deprecated and will be removed from Gutenberg in 2.4. Please use wp.components.TextControl instead.
The code will need to be changed as indicated.
While updating the block for Gutenberg v4.0.0 compatibility make minor improvements that will eventually allow the block to support the parameters already supported by the shortcode. i.e. Add defaults for owner, repo and type. These could then be displayed and edited in the Settings area, with defaults potentially being sourced from post meta data / options. See #16.
To support multiple issues we should extend the shortcode logic.
Note: The logic to embed the GitHub issue could use logic like WebDevStudios github-gist block.
See the wp-github-oembed project for a WordPress plugin that uses GitHub's oembed API. e.g. This issue is returned in JSON using... https://api.github.com/repos/bobbingwide/oik-blocks/issues/4
make minor improvements that will eventually allow the block to support the parameters already supported by the shortcode. i.e. Add defaults for owner, repo and type.
As part of an investigation to implement internationalisation I've added Owner and Repo fields to the block.
The GitHub block is now in oik-bob-bing-wide. See https://github.com/bobbingwide/oik-bob-bing-wide/issues/25
Requirement
Prototype solution
Future solution
It should detect URLs pasted into the content and automatically update the block
Or support conversion from a GitHub link to a block.
Or just detect #xxxx in the same way that GitHub does.