Components with NavigationMixin aren't being parsed correctly to provide hover functionality
Opened this issue · 2 comments
Summary
While troubleshooting an issue where hover was consistently throwing an error, it was discovered that the root cause was coming from components using a Navigation Mixin. Those components are not providing information as they should. The root cause appears to be that we're incorrectly saving the customComponents.json index, but I didn't get much further while troubleshooting because #time.
Steps To Reproduce:
- Remove the code fix from #491.
- Activate the extensions in debug mode.
- Hover over a value in an HTML class, using a repo like the ebikes-lwc that uses NavigationMixin.
- See the error pop up in VS Code.
- Throw some debugger statements into lwc-data-provider.ts at the
t.classMembers.forEach(cm => {
line. - Walk through until you get to a component like a NavigationMixin, that will be empty and have no data (will also throw the error).
Expected result
Components with Navigation Mixin should provide information like attribute and properties available.
Actual result
There was no className information available, causing an error downstream and not being included as helpful information.
Additional information
Example component not using NavigationMixin:
Example component using NavigationMixin:
@randi274 I've been experiencing this issue as well, but when developing components that apply OmniscriptBaseMixin to LightningElement.
lwc-language-server uses @lwc/compiler@0.34 - this version of the compiler doesn't recognise components that apply a Mixin to LightningElement as class components.
The latest version of the compiler seems to recognise a wider variety of class supertypes as valid components.
Thanks for chiming in! Updating lwc/compiler is on our short-term road map, so we're hoping to address these issues soon, and we'll add OmniscriptBaseMixin to our tests.