Deprecate ScriptElementKind.jsxAttribute #47414
Merged
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.
SymbolKind.getSymbolKind
's handling of JSX attributes appears to be pretty broken (and has been for a while), but doesn't seem to have been noticed (or at least reported) by anyone until the JSX attribute snippet feature started using it as a way to detect that an attribute was being completed (#47090, #47280).For example:
Rather than attempt to fix it by introducing
contextToken
into the mix (which I attempted in a revision of #47096), we decided that it was inconsistent that this function (which mainly powers the parenthesized string at the beginning of tooltips) uses syntactic context at all, as opposed to just describing the symbol.This PR eliminates
jsxAttribute
entirely, which means that JSX attributes, tag names, etc, will all show as variables/properties/etc, the same as they would be shown when used in other places (since JSX attributes are just properties on a parameter object), eliminating the broken logic used to detect attributes.Now: