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

Hover references/docs for JSX files (like for regular HTML and CSS files) #58132

Closed
mlntr opened this issue Apr 9, 2024 · 7 comments
Closed
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@mlntr
Copy link

mlntr commented Apr 9, 2024

Upon hover, elements and attributes in HTML and CSS files display a useful small documentation window (tooltip) containing docs from W3C/WHATWG and link to MDN.

JSX should have this too, as it'd be more helpful than what is currently displayed.

Currently this is displayed (JSX):
image

Suggestion:
image

@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 9, 2024
@mjbvz mjbvz removed their assignment Apr 9, 2024
@nmain
Copy link

nmain commented Apr 9, 2024

This could (and maybe should?) be fixed in types: Playground

export {};

declare var React;

declare global {
  namespace JSX {
    interface IntrinsicElements {
      /** WOW TOOLTIP */
      div;
    }
  }
}

<div />;

@andrewbranch
Copy link
Member

@eps1lon do you know if this has been discussed for DOM elements/attributes in React typings?

@eps1lon
Copy link
Contributor

eps1lon commented Apr 10, 2024

It's a great idea.

I haven't tried if it would be enough to just add JSDoc to https://github.com/definitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L4283-L4466. Would appreciate if somebody could try it out and file a PR.

@andrewbranch andrewbranch added the External Relates to another program, environment, or user action which we cannot control. label Apr 10, 2024
@mlntr
Copy link
Author

mlntr commented Apr 12, 2024

I haven't tried if it would be enough to just add JSDoc to https://github.com/definitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L4283-L4466. Would appreciate if somebody could try it out and file a PR.

@eps1lon I could look into it if others don't have time to. Can you provide an example of what it would look like for one of those elements? (I'm not familiar with JSDoc as I use TypeScript instead 🙂)

@typescript-bot
Copy link
Collaborator

This issue has been marked as "External" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
@mlntr
Copy link
Author

mlntr commented Apr 17, 2024

@andrewbranch Was the issue inadvertently closed by the bot?

@eps1lon
Copy link
Contributor

eps1lon commented Apr 17, 2024

Continued in DefinitelyTyped/DefinitelyTyped#69381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

6 participants