Support » Plugin: Gutenberg » The Good with the Ugly – A Developer’s POV

  • I have been working on and off with Gutenberg ever since it showed up on the “Add Plugins” page on my WordPress dashboard as a “Featured” plugin. Prior to that in spite of all the hype and hoopla I had never bothered with trying to find out why it was a big deal. But seeing it there with a rating that barely touched 2.5 at that time piqued my curiosity and I decided to first read up about it, and then install it to see how much of a steep climb I had in front of me.

    Over the past couple of months I have had wildly fluctuating opinions. I wrote about my thoughts in depth on my personal blog, but I am not posting that link here because external review links are not allowed. I will rather try to document what I have found since that point in time.

    At that time I was in the middle of a major rewrite of my plugin code, and unbeknownst to me I had already started making my code suitable for a more UI-based approach. One thing that had me rubbing my hands in glee was that the definition of blocks could be nested within comments. This alone encouraged me to take the plunge, since I have been traditionally very conscientious about not littering a user’s markup with shortcodes if a plugin is deactivated. To that effect I even made my most active plugin borrow the gallery shortcode so that if deactivated, users wouldn’t see anything ugly on the front-end.

    With the decision made I went ahead and started the conversion process. Once I got down to it, the process was quick in the following aspects:

    • Writing the JS-based interface for the blocks. This literally took less than 100 lines of code with comments. Again, my pre-work rewrite helped significantly and probably took more than 5000 lines of code out of the picture (600 JS, 4400 PHP), but regardless, the overall JS was pretty easy.
    • Writing the PHP-based renderer was even easier and barely took 30 lines of code.

    My overall plugin is massive and quite complex, and nothing on Gutenberg could have simplified that, but the above was for porting just the UI to Gutenberg. So far, so good.

    And then I came to the ugly parts.

    I discovered at least one showstopper glitch. It does appear as though there are facets of the API that don’t do what they are supposed to (see bug report). And this is puzzling, since there are bound to be scenarios where plugin authors will want the “Convert to Blocks” feature to automatically take care of existing old shortcodes for their plugins.

    Compounding this is the fact that very few support responses from the core Gutenberg team in the recent past have addressed more difficult technical questions (i.e. the Howtos). You can get a response for why something is there / not there, or where a certain feature is, or how to make the interface better, but good luck with getting a response to a technical question, particularly when the team is now in a scramble to get the code bundled with the core.

    The other off-putting aspect is that almost all of the documentation assumes that the developer is going to install NodeJS and ReactJS. In a few cases the syntax provided doesn’t work on vanilla JS. Pray tell, why? This becomes more concerning when the documentation has no reference to the code requiring to be run via a preprocessor. While Gutenberg is based on ReactJS, this is similar to giving CSS guidelines in a LESS / SASS syntax.

    Admittedly this will make your workflow faster in the grand scheme of things, but installing a set of gigantic packages to write a 100 line file is akin to buying a Ferrari to drive to the pharmacy at the end of the block.

    There also seems to be a noticeable issue with speed while editing large posts with several galleries – in some cases it has taken me upwards of a minute on a local install using TwentySixteen and no other plugin.

    All in all I am happy that Gutenberg is being forced on everyone – the standardization and removal of cruft due to it are very welcome. Simple code is pretty easy to develop too. On the other hand the quality of the software, the support and the documentation are just not there yet. This is very reminiscent of the public spectacle that version 2.0 of Thesis created for itself after release (no, I have never used the-theme-that-must-not-be-named, but the backlash was so vitriolic that it crept into my Twitter feed).

    My hunch is that the issues that are currently known and yet unresolved are just the tip of the iceberg. And WordPress is heading towards it safe in the knowledge that it is unsinkable, just like the Titanic.

Viewing 1 replies (of 1 total)
  • Enjoyed reading this review. The points about documentation are huge for me. If the Gutenberg team want people to embrace the plugin more, they need to really put serious effort into improving the documentation and providing lots of clear and well documented examples that show the potential of Gutenberg.

    While many devs have experience with package managers and React, there are also many that don’t. A clear set of documentation that goes through creating a few different types of blocks from the ground up would go a long way.

Viewing 1 replies (of 1 total)
  • The topic ‘The Good with the Ugly – A Developer’s POV’ is closed to new replies.