Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components with NavigationMixin aren't being parsed correctly to provide hover functionality #492

Open
randi274 opened this issue Mar 23, 2022 · 2 comments
Labels
lwc Affects the LWC language serevr type:bug Creates internal bug with Git2Gus

Comments

@randi274
Copy link
Contributor

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:

  1. Remove the code fix from fix: fixed for:each error on hover #491.
  2. Activate the extensions in debug mode.
  3. Hover over a value in an HTML class, using a repo like the ebikes-lwc that uses NavigationMixin.
  4. See the error pop up in VS Code.
  5. Throw some debugger statements into lwc-data-provider.ts at the t.classMembers.forEach(cm => { line.
  6. 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:
Screen Shot 2022-03-23 at 4 17 57 PM

Example component using NavigationMixin:

Screen Shot 2022-03-23 at 4 18 54 PM

@randi274 randi274 added bug lwc Affects the LWC language serevr labels Mar 23, 2022
@randi274 randi274 added type:bug Creates internal bug with Git2Gus and removed bug labels May 19, 2022
@ethan-sargent
Copy link

@randi274 I've been experiencing this issue as well, but when developing components that apply OmniscriptBaseMixin to LightningElement.

lwc-language-server uses @lwc/[email protected] - 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.

@randi274
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwc Affects the LWC language serevr type:bug Creates internal bug with Git2Gus
Projects
None yet
Development

No branches or pull requests

2 participants