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

Add Swift Documentation Preview Support #562

Open
Kyle-Ye opened this issue Jul 2, 2023 · 10 comments
Open

Add Swift Documentation Preview Support #562

Kyle-Ye opened this issue Jul 2, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kyle-Ye
Copy link

Kyle-Ye commented Jul 2, 2023

Is your feature request related to a problem? Please describe.

When user actives documentation preview panel and is currently on a .swift, .h or .markdown file, preview the documentation on the right panel.

Describe the solution you'd like

It can be achieved by using the existing ConvertService API provided by DocC.

No Xcode magic is required.

https://twitter.com/franklinschrans/status/1666343700442628098

Benefits

Improve the doc-writing experience on non-Xcode IDE.

Additional context

Inspiration: Xcode 15's documentation preview feature

See more info https://developer.apple.com/videos/play/wwdc2023/10244/

@Kyle-Ye Kyle-Ye added the enhancement New feature or request label Jul 2, 2023
@Kyle-Ye Kyle-Ye changed the title Add DocC Preview Support Add Swift Documentation Preview Support Jul 2, 2023
@adam-fowler
Copy link
Contributor

You can use the command Markdown: Open preview to the side to give a markdown preview. This won't give you the full docc preview obviously but it is a start.

@Kyle-Ye
Copy link
Author

Kyle-Ye commented Aug 3, 2023

You can use the command Markdown: Open preview to the side to give a markdown preview. This won't give you the full docc preview obviously but it is a start.

Yeah. VSCode has a build-in Markdown preview panel.

But I'd like to know if it was possible to render a HTML directly in a associated-panel(The same as Markdown file and Markdown-Preview panel) via the VSCode plugin SDK.

@adam-fowler
Copy link
Contributor

You can do it. But managing the preview server, associating the current page with the correct page on the server isn't simple. It is all possible, just complex.

I have looked into to it a bit and got it displaying a page served by preview server I was running separately. But it is far away from a finished feature.

@roydbt
Copy link

roydbt commented Apr 1, 2024

Any updates on this issue?

@adam-fowler
Copy link
Contributor

No update on this. I haven't had anymore time to look into it.

@daveyc123
Copy link

@adam-fowler Can we grab this one? If so, do you have your prototype changes in a fork somewhere?

@adam-fowler
Copy link
Contributor

@daveyc123 its all yours. I had some basic code setup to display the documentation but there was a loads of issues managing the preview server and updating the documentation. Don't think I kept any of the code around though.

@adam-fowler
Copy link
Contributor

@daveyc123
Copy link

Thanks for digging that up @adam-fowler

@matthewbastien
Copy link
Member

I just posted a general overview of how this feature could be implemented on the Swift forums: https://forums.swift.org/t/rfc-swift-docc-integration/75537

Please check it out and leave any feedback/suggestions that you might have!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants