Skip to content

feat: enhance InspectorHints to support MageWire Templates - #109

Closed
dermatz wants to merge 10 commits into
mainfrom
feat-magewire-support
Closed

dermatz wants to merge 10 commits into
mainfrom
feat-magewire-support

Conversation

@dermatz

@dermatz dermatz commented Jan 27, 2026

Copy link
Copy Markdown
Member

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

@dermatz dermatz closed this Jan 27, 2026
@dermatz
dermatz deleted the feat-magewire-support branch February 10, 2026 12:17
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.

1 participant