[BUGFIX] Improve debugger message for template-only components#21407
Open
olenderhub wants to merge 2 commits into
Open
[BUGFIX] Improve debugger message for template-only components#21407olenderhub wants to merge 2 commits into
olenderhub wants to merge 2 commits into
Conversation
| } else { | ||
| // eslint-disable-next-line no-console | ||
| console.info( | ||
| "Use `get(<path>)` to debug this template. For named arguments, use `get('@argName')`." |
Contributor
There was a problem hiding this comment.
are these instructions also valid for class-backed components?
Contributor
Author
There was a problem hiding this comment.
Good point - yes, get('@argName') is valid for class-backed components too.
The distinction here is only whether context is available. I updated the class-backed message to include the named-argument hint as well, and added test coverage for that case.
Contributor
Author
|
@NullVoxPopuli I pushed a follow-up commit that adds the named-argument hint to the class-backed debugger message too, and added test coverage for that case. The current CI failure seems unrelated to this PR - it appears to fail during setup before tests run. |
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.
Fixes #17962
Updates the default
{{debugger}}callback to show a template-only-friendly message when there is no backing context.Adds a regression test for the template-only debugger message.
Tested with:
pnpm test:wip