feat: Add structured data audit features including JSON-LD and Schema…#213
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the MageForge Toolbar audits by adding a new Structured Data group with interactive page-level viewers for JSON-LD and Schema.org microdata/RDFa, plus supporting UI and styling updates to present findings cleanly in the panel.
Changes:
- Added two new structured-data audits: JSON-LD Viewer and Schema.org Viewer (microdata + RDFa tree/blocks).
- Introduced a new Structured Data audit group, moved the “Missing JSON-LD” audit into it, and registered the new audits.
- Updated toolbar UI/styling: full tab labels, new group colour token, and viewer-specific CSS.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/view/frontend/web/js/toolbar/ui/constants.js | Adds an icon mapping for the new structured-data group. |
| src/view/frontend/web/js/toolbar/ui/build.js | Updates tab rendering to show full group labels (not just the first word). |
| src/view/frontend/web/js/toolbar/audits/seo-json-ld-viewer.js | Implements JSON-LD block parsing + expandable viewer + clipboard copy action. |
| src/view/frontend/web/js/toolbar/audits/schema-org-viewer.js | Implements Schema.org microdata + RDFa DOM scanning and viewer rendering. |
| src/view/frontend/web/js/toolbar/audits/index.js | Registers the new audit group and adds/moves audits into it. |
| src/view/frontend/web/css/toolbar/_variables.css | Introduces a new CSS variable for structured-data group colour. |
| src/view/frontend/web/css/toolbar/_jsonld-viewer.css | Adds viewer styles for JSON-LD and Schema.org presentation within findings. |
| src/view/frontend/web/css/toolbar.css | Imports the new viewer stylesheet into the main toolbar CSS bundle. |
…and enhance JSON-LD viewer styles
…ove array handling in RDFa viewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive "Structured Data" audit group to the MageForge Toolbar, with new viewers for JSON-LD and Schema.org microdata/RDFa, along with supporting UI and style changes. These enhancements make it easier to inspect and debug structured data on web pages directly from the findings panel.
Structured Data Auditing:
<script type="application/ld+json">blocks, parses and displays them, flags errors, and allows copying valid JSON. [1] [2]itemscope/itemtypeandtypeof/propertyattributes, presenting a structured, interactive tree view of found data. [1] [2]UI and Styling:
Summary of most important changes:
Structured Data Auditing
seo-json-ld-viewer.jsandschema-org-viewer.jsaudits for JSON-LD and microdata/RDFa, with interactive viewers in the findings panel. [1] [2]UI and Styling
toolbar/_jsonld-viewer.cssand imported it into the main toolbar stylesheet for viewer styling. [1] [2]