Coming in Gutenberg 13.2: Users’ Editor Preferences Will Be Stored in the Database, Improving Persistence Across Sessions

“Welcome to the Block Editor!” Once you have dismissed this notice, why does it keep coming back? For years users have complained about this and the fact that their settings in the editor do not seem to save across sessions. They have taken to the official support forums and Reddit to find out how to block this message from appearing. WordPress developer Johan Jonk Stenström even created a plugin called Welcome to the block editor B gone, which removes the welcome message altogether.

In the past, WordPress has stored users’ editor preferences in the browser. In 2019, web developer Andrew Duthie described the problem in a ticket on GitHub:

In the block editor, this is used in a few stores to persist preferences (e.g. toolbar placement, “new user experience” tips, etc).

Due to the transient nature of browser storage, this persistence is not as sticky as it is expected to be, including: switching browsers (unique storage between browsers), or using private browsing tabs (storage cleared between sessions), or the same user across a network of sites (storage unique by domain).

Duthie suggested that Gutenberg persist users’ editor preferences to the database rather than local storage.

Gutenberg 13.2 is set to introduce a new preferences persistence API and a new package that saves these preferences to the WordPress database, as part of the user’s meta. It also includes local (legacy) storage as a backup. This will solve many longstanding problems users have had with preferences not persisting across sessions.

One interesting sidenote is that Gutenberg engineer Riad Benguella found that this PR improved the “block selection” (focus) performance by nearly 50%. It is a remarkable improvement but not intentional so he suggested they investigate further to see why it had that effect.

Gutenberg contributors tested this update by creating a few different users, switching between them, using different browsers, and setting different preference combinations. The preferences stayed with the user as expected. This update will address a lot of little annoying bugs that users have complained about for years and should make plugins like Welcome to the block editor B gone obsolete.

5

5 responses to “Coming in Gutenberg 13.2: Users’ Editor Preferences Will Be Stored in the Database, Improving Persistence Across Sessions”

  1. Thanks for this post.
    Just a small question: the post title says 13.2, but the post’s url says 13-1. Which one is correct?

  2. This is high on my list of little annoying niggles. Very happy to hear that it’s been fixed. Thanks, developers!

  3. It’s a pity that this didn’t make into WP 6.0. With this and the ability to select text across multiple blocks, Gutenberg is starting to leave its beta status.

Leave a Reply to Jake Hawkes Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: