google / google/site-kit-wp

Add support for RRM blocks in the site editor

Open
#10,313 4 comments 0 reactions 0 assignees View on GitHub
Module: RRM P2 Team M Type: Enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
384
Avg merge
4d 14h
Merged PRs (30d)
77

Description

## Feature Description

Currently, the [RRM blocks](https://github.com/google/site-kit-wp/issues/9963) only appear on the WordPress block editor. Support for these blocks should be added to the [WordPress site editor](https://wordpress.org/documentation/article/site-editor/).

- Since it is possible to [edit specific pages](https://wordpress.org/documentation/article/site-editor-pages/) in the [WordPress site editor](https://wordpress.org/documentation/article/site-editor/), the user should be able to insert/edit the blocks in the page content when editing the page using the site editor.
- When using the site editor to edit other parts of the site (e.g. templates):
- When editing singular post templates, the block should work as it does today.
- When editing non-singular post templates, the block should only output the button in the front-end if site mode is set to "site wide".

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

- When using the site editor to edit specific pages, users should be able to insert and edit Reader Revenue Manager blocks.
- When using the site editor to edit other parts of the site (e.g. templates):
- When editing singular post templates, the Reader Revenue Manager blocks should function as they do today in the block editor, i.e. the user should be able to insert and edit them, with the following differences/traits:
- Any post-specific snippet availability notice should not appear in the block sidebar ([inspector controls](https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/inspector-controls/README.md?rgh-link-date=2025-01-02T18%3A35%3A20.000Z)).
- The button should render in the front-end of a post using the template only if the said post includes the Reader Revenue Manager snippet.
- When Reader Revenue Manager blocks are inserted into non-singular post templates (e.g. an archive, blog home, search results, etc.), it should only output the button in the front-end if site mode is set to "site wide".

## Implementation Brief

* [ ]

### Test Coverage

*

## QA Brief

*

## Changelog entry

*

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing Reader Revenue Manager blocks and their current WordPress block-editor behavior, then trace how blocks are handled in the site editor. Verify the acceptance criteria for page editing, singular and non-singular templates, inspector controls, and front-end button output, covering the listed site-editor scenarios with tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.