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

Complete lowercase JSX elements #719

Merged
merged 5 commits into from
Feb 1, 2023
Merged

Conversation

zth
Copy link
Collaborator

@zth zth commented Jan 31, 2023

This adds completion for lowercase JSX elements, treating them like HTML elements.

Potential follow up for this - there's a heuristic in the hover mechanism that detects lowercase elements. Maybe we should leverage this new list of elements and descriptions in there too? It currently shows some fairly irrelevant things.

image

@zth zth requested a review from cristianoc January 31, 2023 19:25
let htmlElements =
[
("a", "Defines a hyperlink.", false);
("abbr", "Defines an abbreviated form of a longer word or phrase.", false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does this compare with the complete list currently supported? A subset? (E.g. aria).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm, not sure I follow what you mean..?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this is a selection of all the possible ones accepted by the type checker.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No I think the type checker would accept anything, I think the JSX tag name is just turned into a string by the PPX. So this is strictly about providing completion/information for something that we don't really have (or care) about type information for right now. So it's strictly an addon/extra help.

@zth zth force-pushed the complete-lowercase-jsx-elements branch from 53b0513 to 4428d03 Compare February 1, 2023 13:06
@zth zth merged commit 6477993 into master Feb 1, 2023
@zth zth deleted the complete-lowercase-jsx-elements branch February 1, 2023 13:07
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.

2 participants