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

Improve JSDocs by adding examples of usages #1090

Open
ivpavici opened this issue Apr 19, 2024 · 29 comments · Fixed by #1112
Open

Improve JSDocs by adding examples of usages #1090

ivpavici opened this issue Apr 19, 2024 · 29 comments · Fixed by #1112
Labels
Difficulty: easy anybody can understand it good first issue Good for newcomers OnlyDust Open for OnlyDust contributors released on @next Type: feature New feature or request

Comments

@ivpavici
Copy link
Collaborator

ivpavici commented Apr 19, 2024

Inspired by Viem docs, example:

https://viem.sh/docs/accounts/privateKey#usage

This is a big endeavor so it can be completed in multiple smaller PR-s (and more users can take it in parallel!)

@ivpavici ivpavici added Type: feature New feature or request OnlyDust Open for OnlyDust contributors ODHack Issue to assign for the ODHack event labels Apr 19, 2024
@ivpavici
Copy link
Collaborator Author

Users please pick one part of the docs which you want to work on and write here for everyone else to know!

@ivpavici ivpavici added good first issue Good for newcomers Difficulty: easy anybody can understand it labels Apr 19, 2024
@elielnfinic
Copy link

Hey @ivpavici, could you please specify on which elements examples should be added ?

@Ayoazeez26
Copy link

I would love to take the signature part of the docs

@Jemiiah
Copy link

Jemiiah commented Apr 21, 2024

if this work isn't assigned to anybody, can i get it, @ivpavici ?

@ivpavici
Copy link
Collaborator Author

ivpavici commented Apr 22, 2024

hi all!

To explain a bit more, we are not talking about rewriting Guides (like https://www.starknetjs.com/docs/guides/create_account) but adding examples to JSdocs in the code, how they can be used, for example on utils:

image

which looks like this:
image

@ivpavici
Copy link
Collaborator Author

This means you need to try out, play and test some parts of the code, to see how it works and then add an example.
Some of them can be for sure found in tests and will be easy to solve!

@ivpavici
Copy link
Collaborator Author

@Jemiiah no need to assign since multiple people can work on it... pick a part of the code (please write here which) and send a PR with this issue linked

@Ugo-X
Copy link

Ugo-X commented Apr 22, 2024

Hello @ivpavici would like to handle the Estimate fees segment, if there's no need for an assignment won't there be a clash at some point?

@ivpavici
Copy link
Collaborator Author

@Ugo-X I will consider PR-s from contributors who announce the parts up front.
Also, you can open an issue yourself and I can assign you! and link the issue here

@fishonamos
Copy link

Hi @ivpavici I will love to work on typeData.ts and json.ts

@BlackStarkGoku
Copy link
Contributor

Hello I would like to contribute, I hope I understood well the task, I will try to write the exemples of the address.ts file.

@Iwueseiter
Copy link

@ivpavici can i work on TS Config.json and signer/interface.ts

@ivpavici
Copy link
Collaborator Author

PR by @BlackStarkGoku is a good example to take a look in what direction we want to go:
#1096

@BlackStarkGoku
Copy link
Contributor

Perfect thanks @ivpavici then I will add more such as encode.ts, num.ts

@NueloSE
Copy link
Contributor

NueloSE commented Apr 24, 2024

@ivpavici can I work on num.ts

@ivpavici
Copy link
Collaborator Author

ok, please @BlackStarkGoku can you leave num.ts to @NueloSE

@BlackStarkGoku
Copy link
Contributor

Ok I will just do encode.ts for now

@petersdt
Copy link
Contributor

@ivpavici can i work on shortString.ts and transaction.ts

@NueloSE
Copy link
Contributor

NueloSE commented Apr 26, 2024

Hi @ivpavici num.ts has been approved.

Can i take go on with the following issues: uint256 , merkle.ts and selectors

@ivpavici
Copy link
Collaborator Author

@NueloSE thanks! go for it!

@CollinsC1O
Copy link
Contributor

@ivpavici can i work on url.ts

@vibenedict
Copy link

I would like to work on hash and provider

@muheebyusufbaba1
Copy link

Can I go with stark.ts, starknetid.ts, and connect.ts

@Osatuyi
Copy link

Osatuyi commented Apr 29, 2024

Hi, @ivpavici can I work on index.ts and propertyOrder.ts

@ivpavici
Copy link
Collaborator Author

hey all!
It is fine to use ChatGPT to help, but it doesn't make sense to push a ChatGPT generated PR without testing and trying to understand the examples in the docs
Please test all the examples before submitting

Copy link

🎉 This issue has been resolved in version 6.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@KeneePatel
Copy link

Hey @ivpavici,

Just wanted to confirm if we are still open to add docs in the code. If yes, I will start on testing some functions and add documentation to it. I had a look at the code and saw some undocumented functions in shortString.ts. So, if you allow I will start to look for more, test them out, add docs and examples to them.

@ivpavici
Copy link
Collaborator Author

@KeneePatel hello! in the next-version branch we addressed the shortString functions... But feel free to take any other that are not yet addressed (or in a pending PR)

@johnkennedyb
Copy link

@ivpavici ,can I take on transaction.test.ts and contract.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: easy anybody can understand it good first issue Good for newcomers OnlyDust Open for OnlyDust contributors released on @next Type: feature New feature or request
Projects
None yet