feat: enhance inspector with JSON metadata and comment parsing #105
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 refactors the MageForge inspector integration to use HTML comment markers with embedded JSON metadata for block identification, replacing the previous approach of injecting
data-mageforge-*attributes directly into the DOM. The JavaScript inspector logic is updated to parse these comment markers, enabling more robust and layout-agnostic detection of block regions and their metadata. The changes improve reliability, performance, and maintainability of the inspector tooling.Inspector Markup Refactor:
data-mageforge-*attributes on elements to wrapping block HTML with MageForge comment markers containing JSON metadata inInspectorHints.php. [1] [2]Inspector JavaScript Updates:
inspector.jsto parse MageForge comment markers, extract block metadata, and cache block regions for efficient lookup. [1] [2]Inspector Interaction Improvements:
These changes collectively modernize the inspector's integration, making it more robust and future-proof.