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

Fix attribute description not showing if its name matches html event #2901

Merged
merged 1 commit into from Jun 1, 2021

Conversation

rchl
Copy link
Collaborator

@rchl rchl commented Apr 29, 2021

The code that matches attributes from all providers on hovering
attributes have found a match in the HTML tags provider (htmlTags.ts)
preventing the component data description from showing up.

Include '@' prefix in the collected HTML component data to not match
attributes without '@'. This makes sure that hovering "@click" attribute
matches the HTML provider and hovering "click" doesn't, for example.

This also improves (IMO) completion labels when adding event handlers
tags. Previously all labels for events from HTML provider completions
would not include the @ prefix which wasn't obvious that it's an
event handler.

Fixes #2900

The code that matches attributes from all providers on hovering
attributes have found a match in the HTML tags provider (htmlTags.ts)
preventing the component data description from showing up.

Include '@' prefix in the collected HTML component data to not match
attributes without '@'. This makes sure that hovering "@click" attribute
matches the HTML provider and hovering "click" doesn't, for example.

This also improves (IMO) completion labels when adding event handlers
tags. Previously all labels for events from HTML provider completions
would not include the `@` prefix which wasn't obvious that it's an
event handler.

Fixes vuejs#2900
Copy link
Member

@yoyo930021 yoyo930021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank for your help.
Sorry for the late reply.

@yoyo930021 yoyo930021 merged commit fcea32b into vuejs:master Jun 1, 2021
@rchl rchl deleted the fix/hover-attr branch June 1, 2021 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component data doesn't work for attribute whose name matches HTML event
2 participants