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

Support for WordPress 5.0 and the new editor - Gutenberg #25

Closed
bobbingwide opened this issue Jan 14, 2018 · 9 comments
Closed

Support for WordPress 5.0 and the new editor - Gutenberg #25

bobbingwide opened this issue Jan 14, 2018 · 9 comments
Assignees
Labels
enhancement Gutenberg WordPress 5.0 block editor

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jan 14, 2018

Since early 2017 a new editor has been under development. Code named Gutenberg this new editor is being developed as a feature plugin. It is expected to be merged into core for WordPress 5.0.

We need to be aware of Gutenberg and to attempt to be compatible with it.
Actually, it's the other way round. Gutenberg needs to be backward compatible with us.

According to Gutenberg's README.

Posts are backwards compatible, and shortcodes will still work.

That's not the case right now.

I've already raised an issue against Gutenberg ( # 4456 ) which affects the [bw_csv] shortcode.
It probably also affects the [bw_rpt] shortcode in exactly the same way.

Problems

Area Problem Reference
Various blocks New lines in shortcode content not respected See also bobbingwide/oik#97

Workarounds?

For 4456 - new lines being ignored

  • This affects [bw_csv] and [bw_rpt]
  • There is no workaround using the Gutenberg editor
  • You have to revert to using the Classic editor
@bobbingwide
Copy link
Owner Author

The new editor uses "dashicons" which are actually SVG's.
The [bw_dash] shortcode should be extended to cater for SVG icons.

@bobbingwide
Copy link
Owner Author

For the oik-block-opinions.php routine in oik-block, oik-bob-bing-wide may respond to a number of the filters it invokes.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Apr 25, 2018

Note: The [bw_graphviz] shortcode appears to work with Gutenberg. Unlike [bw_csv] it’s not sensitive to losing new line characters.
We need to change the message from the filter function responding to oik_block_gather_site_opinions. Use [bw_rpt] if it’s affected in the same way as [bw_csv]

@bobbingwide bobbingwide added the Gutenberg WordPress 5.0 block editor label Apr 25, 2018
@bobbingwide
Copy link
Owner Author

Where dashicons are being generated in shortcodes the test cases will need changing. See icon= parameter.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 19, 2020

Blocks to be delivered by oik-bob-bing-wide, copied and cobbled from oik-blocks are listed below

new block name transform from shortcode
oik-bbw/csv [bw_csv]
oik-bbw/dashicon [bw_dash]
oik-bbw/github [github]
oik-bbw/search [bw_search]
oik-bbw/wordpress [wp]
  • Each block should support a transform from the oik-block prefixed version of the same name.
  • Each block should also support transform from the shortcode.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 19, 2020

Whilst implementing support for blocks using the shared libraries we may as well take the opportunity to make oik-bob-bing-wide operate as a standalone plugin, using similar logic to that implemented for oik-css and uk-tides.

The [bw_csv] shortcode makes use of bw_array_get_from. This needs to be included in the bobbfunc shared library.

In order to use the [bw_csv] shortcode we have to implement additional compatibility checks against an existing version of oik - loading oik's back level code in preference to the shared library code.

bobbingwide added a commit that referenced this issue Jan 30, 2020
bobbingwide added a commit that referenced this issue Jan 30, 2020
…ashicon and [bw_dash]. Remove duplicates from dashicon list. Avoid keys message from React
bobbingwide added a commit that referenced this issue Jan 30, 2020
@bobbingwide
Copy link
Owner Author

This was released in v1.34.0 on 30 Jan 2020 to oik-plugins.com

There are still problems when both blocks are used in a post and the [bw_csv] shortcode is used in a classic block. This has to be resolved when I update the documenation for the oik base plugin.
I’ll check whether or not it’s possible to use the shortcode inside the shortcode block.
The easiest thing would be to use convert to blocks and demonstrate that the transform worked.

@bobbingwide
Copy link
Owner Author

The easiest thing would be to use convert to blocks and demonstrate that the transform worked.

That's what I did. Each CSV block that was generated contained unwanted
tags. But pressing enter in each block resolved the problem. I just had to delete a blank line or two and unset the Table heading toggle for those blocks that didn't have table headings.

@bobbingwide
Copy link
Owner Author

Oik v4.0.0 has been released. The tables on the plugin page have been updated.

I’ll check whether or not it’s possible to use the shortcode inside the shortcode block.
Yes it is, but what’s the point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Gutenberg WordPress 5.0 block editor
Projects
None yet
Development

No branches or pull requests

1 participant