Skip to content

Conversation

@dermatz
Copy link
Collaborator

@dermatz dermatz commented Jan 27, 2026

This pull request introduces several improvements to the Inspector Hints feature, primarily focused on ensuring that inspector attributes are injected only when appropriate and preventing issues with certain content types. The changes add more robust content checks, improve compatibility with AJAX/Magewire requests, and refine how comment markers are injected to avoid breaking JavaScript strings.

Content Handling Improvements:

  • Added multiple checks in InspectorHints.php to prevent wrapping content that is JSON, a script tag, a Magewire component, or a template for JS templating engines, ensuring inspector attributes are only injected into suitable HTML content.

  • Changed comment marker injection to avoid introducing new lines, preventing potential issues when rendered inside JavaScript variables.

Request Type Handling:

  • Injected Http request dependency and used it to disable Inspector Hints for AJAX/API requests and Magewire requests, preventing DOM diffing issues and unnecessary processing for these types of requests. [1] [2] [3]… in MageWire Templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants