Skip to content

Persist user's editor preferences to database rather than local storage #15105

Description

@aduth

Related: #14512

The data module includes a persistence plugin which can be used by data stores to persist state values to browser storage.

https://github.com/WordPress/gutenberg/tree/master/packages/data/src/plugins/persistence

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).

Proposal:

Preferences should be persisted as user meta. Given the WordPress-agnostic nature of the @wordpress/data module, this should be implemented in such a way that another environment could substitute their own (assumed asynchronous) persistence mechanism.

Specific details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    REST API InteractionRelated to REST API[Package] Data/packages/data[Status] In ProgressTracking issues with work in progress[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions