Skip to content

Add Annotated blocks usage report for outdated version content - #470

Open
Raghaddahi wants to merge 1 commit into
mainfrom
feature/block-usage-report
Open

Add Annotated blocks usage report for outdated version content#470
Raghaddahi wants to merge 1 commit into
mainfrom
feature/block-usage-report

Conversation

@Raghaddahi

@Raghaddahi Raghaddahi commented Aug 14, 2026

Copy link
Copy Markdown
Member

Relates to #445

Description

Adds a new Annotated blocks usage report to the Wagtail admin (under Reports) listing ContentPages with text_annotated StreamField blocks. Each block's version is compared against WAGTAIL_GUIDE_CURRENT_VERSION (a new setting) and flagged as Needs update when outdated, so editors can find stale version-specific content without manual searching.

Each block links directly to its position in the page editor via #block-index-N, with a small JS helper (block_usage_focus.js, registered via insert_editor_js) that expands and scrolls to the exact block. Block position is used instead of UUID since UUIDs differ between the live page and the latest draft revision.

A second JS/CSS pair (block_usage_report.js/.css) powers a hover-sync effect: hovering any of the Change type / Version / Content cells highlights all three together.

Testing

image image

AI usage

AI (GLM 5.2) generated the code and PR description, reviewed and assisted throughout by me.

Adds a custom Wagtail report listing ContentPages with text_annotated
blocks, flagging blocks whose recorded version is older than
WAGTAIL_GUIDE_CURRENT_VERSION so editors can find outdated content to
review or update. Each block links directly to its position in the
page editor via a #block-index-N fragment, handled by a small JS
helper registered through insert_editor_js.
@RealOrangeOne
RealOrangeOne temporarily deployed to wagtail-guid-feature-bl-db3lv3 August 14, 2026 03:12 Inactive
@Raghaddahi Raghaddahi self-assigned this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔖 Ready

Development

Successfully merging this pull request may close these issues.

2 participants