Block Editor Sidebar Panels Are the New Admin Notices

There is a problem. Well, it is not an OMGBBQ problem, but it has the potential to become one. Maybe by calling attention to it, I will set off a landslide of copycats who will see this as another trick of the marketing trade, implementing it in their own projects. I am torn, but it would be a disservice to our community to not provide a place for them to share their thoughts.

I am always looking for exciting new plugins or even those old ones that I have missed. In particular, I love to see what others are building on top of the block editor.

Several months ago, I activated my first plugin that used an editor sidebar panel to advertise its pro upgrade. There were no usable options. It was simply an ad, so the decision to deactivate and delete it was a no-brainer. I did not need anything taking up valuable real estate on the post-editing screen. I do not remember its name; it was on the site and off again in moments. A few months later, I saw another plugin with a similar panel.

I have simply ignored those extensions. They were somebody else’s issues. But, when the problem comes knocking at your own door, it is tough to not know it is there.

I hate to be the bad guy who calls out WordPress businesses for trying to make a buck. I have been there and tried to walk the tightrope between putting food on the table and creating a positive user experience with my products — said the guy who is now employed as a writer.

However, can we not do this?

WordPress editor open.  On the right, the post sidebar is shown with the ExactMetrics plugin's panel highlighted.  It has disabled options and simply an upgrade to pro link.
Sidebar panel with disabled options and a pro upgrade ad.

This panel seemed to appear suddenly on the Tavern’s post editor not long ago, and it has been an annoyance ever since. I dug around to find that this was a new pro option added to the ExactMetrics plugin last month. Users of the “lite” version just get the panel — free of charge.

There are a few choices when faced with such a situation. Learn to live with it, deactivate the plugin, or disable the panel via the preferences menu.

WordPress editor preferences menu overlay modal.  The Panels tab is selected.
Preference menu overlay.

At least the editor has some built-in noise control. I am not sure how many users are even aware that it is possible because it is almost hidden. It takes three clicks to get there (Options > Preferences > Panels) and another click to switch a panel off.

The JavaScript for the panel still runs on every load of the editor. And, clearing local browser storage means it will reappear — I will blame that one on WordPress for not storing preferences via user meta. But, at least panels can be hidden.

WordPress users have enough noise with plugins shouting at them at every turn. It is easy for them to become desensitized to the barrage of admin notices, a part of their daily existence. I do not even click the dismiss button for some at first glance. I let them sit, untouched, wondering if they will simply disappear into the ether without my direct interaction. Other times, I install Toolbelt and let it tuck them away.

But, this new thing? The post editor was a place of solace, an escape from the commotion allowed through the admin notices hook elsewhere. It was a quiet room for focusing on content.

At the very least, this form of advertising has given me the necessary kick in the pants to perform a full audit of the Tavern’s plugins. We are in the process of cleaning house, and I have already tossed the first into the trash heap.

Build Notification Banners With ElmaStudio’s Latest Block Plugin

A friend and I were discussing the need for more one-off block plugins earlier today. He had mentioned that WordPress has this powerful block search feature that rarely turns up anything useful. Most are part of collections that do not appear in the results. This was part of a more wide-ranging conversation that I am sure I will tackle on another day.

However, it reminded me that I had a couple of ElmaStudio’s block plugins sitting in the backlog along with some notes on them. The team released Aino Accordion FAQ Block and Aino Notification Banner Block three weeks ago. The latter piqued my interest more so than the former.

Adding an error notification via the Aino Notification Banner plugin in the WordPress editor.
Inserting an error notification.

The two-person team of Ellen Bauer and Manuel Esposito could have continued amassing a collection within their existing Aino Blocks plugin. Instead, they took a turn down the path few have traveled. They are now releasing single-purpose blocks.

“We plan to work on smaller add-on single blocks from now on as well,” said Bauer in the comments on my last review of their theme and block library. “Blocks that are needed for building more complex block page templates.”

Notification boxes are so commonplace that you almost wonder why they are not a part of core WordPress. Many block collection plugins bundle one or multiple, but it is hard to find a solid solution as a single block.

The block has six statuses that users can select from:

  • Welcome
  • Info
  • Help
  • Success
  • Warning
  • Error

Each status has its own icon and default colors. The colors are customizable, but the icon itself is not. I am a fan of the decision because it means one less choice I must make. There is also an option to hide the icon and switch between fill and outline versions.

Displaying multiple notification box styles from the Aino Notification Banner plugin: welcome, info, help, info, and warning.
Testing different notification statuses.

The block also displays a “dismiss” button for visitors to close the banner on the front end. The state is not saved, so if the visitor returns to the page, it will reappear. I would like to see an option to store the banner state in the browser in the future.

I like the plugin for its simplicity. The default output works well enough for most themes, but it has enough options for users to customize it.

The upcoming site editor is where the plugin could really shine. Of course, a user would need a block theme to use it there, such as ElmaStudio’s Aino. The block offers a quick and easy way of plopping something like a sales banner across the top of the site.

Using the Aino Notification Banner plugin to insert a sales notice at the top of the site via WordPress's site editor.
Adding a sales banner at the top of the site.

I do have a few nit-picks, of course. These are not OMGBBQ problems that make the plugin unusable. Instead, they are places where it could be improved.

Because many themes use a top margin approach to vertical rhythm, it can disrupt the alignment of the icon and paragraph. The plugin should zero this out.

If anyone else runs into this issue, the following CSS is a quick fix:

.wp-block-ainoblocks-notification-block .content-wrapper p:first-of-type {
    margin-top: 0;
}

One of the downsides to the plugin is its custom system for borders and padding. From a development perspective, I prefer the plugin’s system under the hood, which uses a curated set of values that keep a user from doing something really crazy. It offers a balance between flexibility and rational choices.

Showcasing the custom border and padding controls from the Aino Notification Banner plugin, which deviates from the WordPress standard.
The plugin’s custom controls.

I have argued that most design controls should have such a system — the same one that is in place for font sizes and colors — ad nauseum. However, Gutenberg and core have moved in a different direction, preferring arbitrary user-defined values over a range of presets. Plugin authors should fall in line for the sake of users.

As a user, I prefer consistency. I want the interface to be the same, regardless of whether I am dealing with a core or third-party block. Having to learn multiple methods to add padding or change a border creates unnecessary friction.

The plugin’s custom system also conflicts with default block styles that theme authors can define in their theme.json files. The standards set by WordPress create a bridge between plugins and themes that the platform has never had before. The more block developers follow it, the easier it is for theme designers to work within the system.

There are other options. In the past week, the Alert Box Block plugin landed in the directory. It provides far more icon options and more design controls in general. However, its UI is so different from the WordPress standard that I cannot imagine using it.

When I talk about issues with Aino Notification Banner, it must be taken into context. I point out problems because I see its potential. I want the developers to continue iterating on it, improving what is already one of the best options out there. This is something that ElmaStudio has proven it can do with earlier projects, so I look forward to what the plugin looks like in the future. For now, it is a solid option for users who need to display notification boxes.

Are Block-Based Widgets Ready To Land in WordPress 5.6?

Two weeks ago, the Gutenberg team put out an open call for block-based widgets feedback. I had already written a lengthy review of the new system earlier in September but was asked by a member of the team to share my thoughts on the most recent iteration. With the upcoming freeze for WordPress 5.6 Beta 1 just a week away, I figured it would not hurt to do another deep dive.

For reference, my latest testing is against version 9.2.0-alpha-172f589 of the Gutenberg plugin, which was a build from earlier today. Gutenberg development moves fast, but everything should be accurate to that point.

Ultimately, many of the problems I pointed out over a month ago still exist. However, the team has cleaned most of the minor issues, such as pointing the open/close arrows for sidebars (block areas) in the correct direction and making it more consistent with the post-editing screen. The UI is much more polished.

Before I dive into all the problems, I want to answer the question I am proposing. Yes, the block-based widget system will be ready for prime time when WordPress 5.6 lands. It is not there yet, but it is at a point where there is a clear finish line that is reachable in the next two months.

I will ignore the failure of block-based widgets in the customizer, which landed in Gutenberg 8.9 and was removed in 9.1. I will also look past the recent proposal to reconstruct the widgets screen to use the Customize API, at least for now. There is a boatload of problems that block-based widgets present for the customizer, and those problems are insurmountable for WordPress 5.6. Long term, WordPress needs to have a single place for editing widget/block areas. Users will likely have to live with some inconsistencies for a while.

Assuming the team does not try to throw a last-minute Hail Mary and implement full editing of blocks in the customizer this round, it is safe to say that block-based widgets are well on their way toward a successful WordPress 5.6 debut.

The User Experience

Adding a widget to the Widget-editing screen in Gutenberg.
Block-based widgets screen.

As a user, I genuinely enjoy using the new Widgets admin screen. The open-ended, free-form block areas create untold possibilities for designing my WordPress sites. Traditional widgets were limited in scope. Users were buckled down to a handful of core widgets, possibly some plugin widgets, and whatever their theme author offered up. However, with blocks, the pool of choices expands to at least triple the out-of-the-box options (I am not counting embed-type blocks individually). Plus, blocks provide a far more extensive set of design options than a traditional widget.

In comparison, traditional widgets are outdated. Blocks are superior in almost every way. However, there are still problems with this new system.

The biggest issue right now is that end-users can exit the Widgets screen without saving their changes. There is no warning to let them know that all their work is about to be lost in the ether. This is one of those OMGBBQ-level items that need to happen before WordPress 5.6 drops.

One nice-to-have-but-not-necessary feature would be the ability to drag blocks from one block area to another. In the old widgets system, users could move widgets from sidebar to sidebar. The current alternative is to copy a widget, paste it in a new block area, and remove the original.

I am also not a fan of not having an option for the top toolbar, which is available on the post-editing screen. One of the reasons for using this toolbar is because I dislike the default popup toolbar on individual blocks. It is distracting and often gets in the way of my work.

Legacy widgets seem to still be a work in progress. The Legacy Widget block did not work at all for me at times. Then, it magically began to work. However, Gutenberg does now automatically add registered third-party widgets to the block inserter just as if they were blocks.

Inserting a third-party legacy widget into Gutenberg's widget system.
Getting a plugin’s widget to work.

This presented its own problems. The only way I managed to make third-party plugin widgets work was to insert the widget, save, and refresh the widgets screen. At that point, the widgets appeared and became editable.

The Theme Author Experience

One of my biggest concerns for theme authors right now is that there does not seem to be any documentation in the block editor handbook. There is plenty of time to make that happen, but there are things theme authors need to be aware of. Having a centralized location, even while the feature is under development, would help them gear up for the 5.6 release.

Some of these questions, which may be answered in various Make blog posts, should exist on a dedicated documentation page:

  • How can a theme opt out of block-based widgets?
  • What are the hooks to add custom styles for the Widgets screen?
  • Can themes target specific sidebar styles on the Widgets screen?
  • Is it possible to consistently style sections like traditional widgets on the front end?
  • Can themes opt into wide and full-alignment within block areas, which could essentially be used similarly to the post content area?

These are some of the questions I would want to be answered as a former theme author. I am no longer in the thick of the theme design game and presume that those who are would have a larger list of questions.

One less-obvious piece of documentation should center on how to handle fallbacks or default widgets. Traditionally, themes that needed to show a default set of widgets would check if the sidebar has widgets and fall back to using the_widget() to output one or more defaults. While theme authors can still do that, we should start to transition them across the board to the block system.

Should theme authors copy/paste block HTML as a fallback? Would the starter content system be better for this, and can starter widget content handle blocks? What is the recommended method for widget fallbacks in WordPress 5.6?

There is still the ongoing issue of how theme authors should handle the traditional widget and widget title wrapper HTML in the new block paradigm. One patch added since the Gutenberg 9.1 release wraps every top-level block with the widget wrapper. If this lands in the 9.2 release, it will likely make the issue worse.

In the traditional system, both the widget title and content are wrapped within a container together. However, if a user adds a Heading block (widget title) and another block (widget content), each block is wrapped separately with the theme’s widget wrappers. The only way to rectify the situation as it stands is for end-users to add a Group block for each “widget” they want, which would require an extensive amount of re-education for WordPress users. It is not an ideal scenario.

Live and code view of incorrect widget wrapper HTML in Gutenberg.
Each block is wrapped as an individual section.

Instead of attempting to directly “fix” this issue, WordPress should instead do nothing to the output. Blocks and traditional widgets are fundamentally different.

Let theme authors take the reins on this one and explore possibilities. However, give them the tools to do so, such as supporting block patterns.