-
Notifications
You must be signed in to change notification settings - Fork 6
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
[FEATURE] Show contract documentation #8
Comments
Love this idea! Will look into this. How do you suggest integrating the doc gen tool? via a server+api or? |
@muttoni I think depending on what's easier - we need to have in mind that the Cadence docgen requires a wasm runtime, which is available in the browser out of the box, but would maybe require some additional setup on the server-side (e.g. in Vercel functions). So I think we have these options (correct me if I'm wrong):
Btw I was also planning to look into this and in general do some contributions to this tool (such as the other ideas I listed in issues), but I'm still a bit too busy for the next couple of weeks! But do let me know if you don't get a chance to look into this or if you need some help! |
Issue to be solved
At the moment, when you click on the contract it takes you to the contract "overview" page, where various actions and metadata are shown. Besides that, the full contract source code is also shown - which can be used by devs to check if this contract is what they are looking for (by examining the source code) and to learn about the API and its usage (so for documentation purposes).
I wonder if the overview page could be simplified to show a more high-level overview of the code, instead of dumping the whole source code on the user, which can be pretty hard to digest for more complex contracts.
Suggest A Solution
What about using the Cadence documentation generator tool to automatically generate the contract docs on the fly and showing that on the overview page instead of the full source code?
This would also be aligned with how other package registries do it:
Instead, we could rename the "components" tab to "Source code" and show the source code (+ the existing list of components) there instead: https://contractbrowser.com/A.1d7e57aa55817448.NonFungibleToken/components
What are you currently working on that this is blocking?
No response
The text was updated successfully, but these errors were encountered: