Skip to content

Integrate Gutenberg data API subscription #9019

@IreneStr

Description

@IreneStr

Create a new file called data.js with the following functionality:

Subscribe to Gutenberg data API

We should know when the store has been changed. The subscription callback should be debounced (500ms?). If so, we should compare for each data point we need (see below) whether it has been changed. If so, the data object should be updated.

NB: Make sure everything works on first page load as well.

Gutenberg data object

Create a Gutenberg data object that can be used for the analyses.

The object should contain:

{
content:
title:
slug:
excerpt:
}

postDataCollector.getData should be able to use this object. It should be a replacement of an input element change (in the case of classic editor) when Gutenberg is active.

Intended flow (for context)

subscribe on store changes in Gutenberg data API --> throttle/debounce/filter --> YoastSEO.js --calculates--> analysis results --> UI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions