Woohoo! Gutenberg 2.9 is out today. I have to say it’s going good so far and coming into a shape to be merged into the core.
The Gutenberg Project
For peeps who are not familiar to what I’m talking about, the Gutenberg project introduces a new publishing experience to WordPress, with it’s current focus in the post editor. It’s first phase replaces the current open text editor window with an intuitive “block” based interface. You can know more about the project here.
Changes in 2.9
Gutenberg 2.9 doesn’t introduce too many revolutionary changes like it did in 2.8. The team merged about 100 pull requests in the release which mostly consisted of bug fixes. The most notable changes in my opinion include:
This addition was by far the most exciting enhancement in 2.9.
It adds a pinning feature to all the plugins that extend the editor which lets the user pin a plugin in the main editor header, mostly for quick access and ease of usage.
This PR adds the ability to use a couple more very useful keyboard shortcuts within the Gutenberg editor. Now, users can use CMD+S to save, CMD+Z to Undo to CMD+Shift+Z for redo (for macOS) / CTRL+S to save, CTRL+Z to undo and CTRL+Y to redo. Sounds interesting, doesn’t it?
This PR introduces usage of
min-content in figures, where
min-content uses the minimum width of the images when resized and sets that width for the caption. Here’s a nifty before/after image to describe the enhancement:
This PR introduces a toggle in table block’s sidebar in order to determine if the table has fixed widths.
It also includes other improvements to styles regarding the table block.
This was an interesting one which introduces usage of
wp:action-publish to determine if the publish panel and publish button should be displayed. Previously, just
isContributor conditional which depended on the
user component was used to determine if the current user was a contributor and if so, the publish UI was not shown to him. This PR introduces
hasPublishAction which depends on
wp:action-publish to explicitly check if the publish panel to the current user.
This PR introduces the usage of memoization which makes sure the
setColor functions do not return a new object or a new function every time they are changed. This results in the elimination of unnecessary renders when the mentioned functions are used.
Another interesting one which makes the font size UI in the paragraph block generic. That way, other blocks in the post will be able to take advantage of the UI and font size logic used in the paragraph block and use the same in themselves.
Previously, local state was manually used to store which component is in focus and then others were prevented to be selected at the same time. This one enhances the focus behavior for the
RichText component ensuring that only one of these components can be focused at the same time.
My Contributions in 2.9
I have been planning of contributing to Gutenberg since I first heard about the project. I finally was able to figure out a routine to spend a part of my day on study, practice, experimentations and contributions which rolled out in version 2.9. Though very minor updates, but here are the ones that were merged in this version:
The subheading block in the editor was missing the text alignment setting which was available in other blocks like heading, paragraph and so on.
I did a bit studying on the structure of other blocks and didn’t find it very difficult to determine what were the requirements for this setting to work and how the structure would be, which resulted in a successful merge after some reviews and updates.
The text alignment setting for the heading block was located in the sidebar initially. I discovered that the team had been working on moving the text alignment setting from the sidebar to the block toolbar for blocks. This merged PR did that in case of the heading block.
Though, this change was reverted in a later PR due to some visual issues in smaller devices.
The caption and description fields in the post featured image modal were initially hidden as they were considered unnecessary. The issue that this PR addressed demanded the change to be reverted and the caption and description fields to be shown, as many users found them useful.
I have been planning on spending a part of my day on open source contributions with the purpose of study, practice and experimentations in order to enrich the horizon of my knowledge. For most WordPress fanatics like me, the Gutenberg project is considered WP’s one step forward for being the best (which it is already) of the best content management system out there. I intend to continue my contributions to the project and sharing my journey here all along.
With that said, I’ll wrap this one up here and will be looking into the comments section for thoughts from your end to appear. What do you think of the 2.9 release? Do you feel that these updates are enhancing your usage experience? Do you think Gutenberg is matured enough to be merged to the core? Let me know in the comments section 🙂