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

Component Documentation via Hover #251

Open
cycle4passion opened this issue Sep 28, 2024 · 1 comment
Open

Component Documentation via Hover #251

cycle4passion opened this issue Sep 28, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@cycle4passion
Copy link

I was wondering if for Svelte 5 release you might consider Svelte Component documentation via hover. It turns out If you add JSDoc comments to component, then Svelte Extension takes over. This essentially gives you the docs within the IDE hover, as well as links to go to official docs. See Hunabyte Video. If you decide to implement this, see the comments regarding the purported fix for indentation.

Thank you again, this is a remarkable, powerful and super helpful library.

@techniq
Copy link
Owner

techniq commented Sep 28, 2024

Hey @cycle4passion, I'm definitely open to the idea of adding the @component docs (I already watched that video when it came out 😁).

Migrating the docs to run on Svelte 5 is another high priority task, one I've mostly finished with Svelte UX, and helped tease out a good bit of compatibility regressions with 3/4. The biggest outstanding challenge right now is sveld does not support Svelte 5 yet, which I use to extract out the docs from the components and put on the website docs. This has been fraught with some issues up to this:

  • The jsdoc comments disappeared at some point
  • While sveld supports parsing Typescript docs, it doesn't always get them right

The biggest change is Svelte 5 natively supports Typescript and doesn't strip it from the AST, which is great since we'll have the authored types, but I was hoping sveld would update soon. I've considered writing my own component parser, but just comes down to hours in the day and priorities right now.

I would also like to greatly improve the per-prop jsdoc comments across the board.

Documentation has always been something I could really use help on across a multitude of items (adding the jsdoc to each component, migrating to shiki, improving the design, ...).

and thanks again for the kind words 😁

@techniq techniq added the documentation Improvements or additions to documentation label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants