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

Closed
10 tasks
ivpavici opened this issue Apr 19, 2024 · 46 comments · Fixed by #1112
Closed
10 tasks

Improve JSDocs by adding examples of usages #1090

ivpavici opened this issue Apr 19, 2024 · 46 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!)

IMPORTANT: add @example only to exported functions

TODO utils:

  • src/utils/calldata/validate
  • src/utils/calldata/formatter
  • src/utils/calldata/propertyOrder
  • src/utils/calldata/requestParser
  • src/utils/calldata/responseParser
  • src/utils/calldata/tuple
  • src/utils/calldata/parser/index.ts
  • src/utils/events/index.ts
  • src/utils/hash/classHash.ts
  • src/utils/hash/transactionHash/v3.ts
@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

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

@PedroCo3lho
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a developer who have worked with web and mobile development, recently i'm walking trough web3 development starting with Starknet. i've contributed to some web3 projects and integrate some wallets.

How I plan on tackling this issue

With my programming experience i can understand data flows and code architecture that make add examples in starknet.js clear and suitable to my profile

@ivpavici
Copy link
Collaborator Author

@PedroCo3lho feel free, although please test your solution - we will not accept a PR without proper testing!

Copy link

github-actions bot commented Jul 3, 2024

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JovanMwesigwa
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a blockchain developer with a robust technical background and extensive experience in creating educational content for the blockchain community. Over the years, I have published more than 20 technical blogs on various blockchain topics, which can be found here - https://celo.academy/u/jovan/activity/topics. These publications demonstrate my ability to break down complex concepts into easily digestible content, a skill that will be valuable in enhancing the Starknet JS documentation.

Additionally, I have developed a comprehensive portfolio showcasing my work and tutorials, available https://unrealjoova.vercel.app/tutorials. This portfolio reflects my hands-on experience with blockchain technology and my commitment to sharing knowledge with the developer community.

Currently, I am the co-founder of OneRamp https://oneramp.io, where we focus on making blockchain technology more accessible to users and developers alike. My role involves not only development but also creating clear and concise documentation and user guides, ensuring our solutions are user-friendly and well-documented.

My technical writing skills, combined with my deep understanding of blockchain technology, make me well-suited to contribute to the Starknet JS repository. I am confident that I can improve the documentation by incorporating small code snippets and examples, making it easier for developers to understand and utilize Starknet JS.

You can find more about my professional background and connect with me on my social profiles:

I look forward to the opportunity to contribute to Starknet JS and help enhance its documentation for the benefit of the developer community.

How I plan on tackling this issue

To approach the problem of improving the Starknet JS documentation, I would follow a structured and iterative process:

  1. Assessment and Planning
    a. Review Existing Documentation:
  • Conduct a thorough review of the current Starknet JS documentation to understand its structure, content, and areas needing improvement.
    Identify gaps, inconsistencies, and outdated information.
  1. Content Development
    a. Create a Documentation Plan:
  • Develop a detailed plan outlining the structure of the documentation, including sections like Getting Started, Tutorials, API Reference, Examples, and Troubleshooting.
    Define the scope and sequence of content to be updated or added.
  1. Implementation and Integration
    a. Use GitBook for Documentation:
  • Set up GitBook as the platform for hosting and managing the documentation. GitBook's features like real-time collaboration, version control, and integration with GitHub will streamline the process.
    Migrate the existing documentation to GitBook and organize it according to the new structure.
  1. Maintenance and Updates
    a. Regular Updates:
  • Establish a process for regularly updating the documentation to reflect changes in Starknet JS and new features.
    Encourage contributions from the community to keep the documentation current and comprehensive.

@adriansb3105
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a 4-year-old software developer, and passionate about this great technology which is Web3. What I wish is for every developer to be close to it the same as I was.

How I plan on tackling this issue

I will create several real-world test applications to have useful use cases in order to improve the documentation with real examples that people can understand and use.

@ALverlaine
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am in the final six months of my Computer Science master's degree at UCLouvain in Belgium thus I am starting to seek opportunities, and a friend who already finished university introduced me to StarkNet so here i am :). I think i have enough skills to add some example to the usage of some functions, i am more here as an entry point to be more familiar with StarkNet.

How I plan on tackling this issue

The first thing I would do, since I am new to this, would be to understand how the function works. If possible, I would test it and then see what we can do with it and its purpose in the code. I think by this point, the examples of usage will become clearer.

@HumbertoTM10
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a software developer with experience in Web2 projects, I'm getting more into the Web3 world and will be pleased to contribute in the project.

How I plan on tackling this issue

I will get into the current docs to understand the right functioning in order to provide concise examples.

@mohit-100
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a MERN stack developer with a strong focus on React development and experience in building scalable web and mobile applications. My work on various projects, including e-commerce platforms and LMS systems, has honed my skills in both front-end and back-end technologies. I am proficient in Node.js, Express.js, AWS serverless, and Docker CI/CD, with a growing interest in blockchain technology. My ability to deliver comprehensive solutions makes me a strong fit for innovative projects that require a blend of technical expertise and creativity

How I plan on tackling this issue

My approach to problem-solving begins with thoroughly understanding the problem, clarifying any unclear requirements, and identifying constraints. I then break the problem into smaller, manageable components, prioritizing tasks based on impact. After researching and exploring potential solutions, I choose the best approach, often starting with a prototype. I iterate and refine the solution based on feedback and thorough testing. Finally, I ensure that the process is well-documented for future reference and continuous improvement

@martinvibes
Copy link

martinvibes commented Aug 25, 2024

hello @ivpavici I would love to participate on this if i'm giving the opportunity :)

@RuneRogue
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a blockchain and DeFi developer . I am having experience of 8 months . I am currently working as a Blockchain Researcher and Developer. My Experience in programming language like Go , Rust , Java will help me to solve this issue.

@Tushar4059x
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i wanna work on this issue

How I plan on tackling this issue

trust me i'm good with js ;)

@martinvibes
Copy link

hello @ivpavici is any of the jsdoc issues still remaining?
would love to work on one :)

@Kaminar-i
Copy link

hello @ivpavici please can i also be assigned?

@llamitaOnfire
Copy link

Hi @ivpavici just created the issue #1225 to take the propertyOrder section. Can you assign it to me?

@LuisDi98
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a software engineer, already checked BlackStarGoku documentation and I want to take the requestParser documentation section.

How I plan on tackling this issue

I created an issue as mentioned before, please assign it to me.
Issue: #1226

@Benjtalkshow
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I am available to work on this. ETA: 48hrs

@ivpavici
Copy link
Collaborator Author

Hi all! We no longer have a budget for external contributions currently...

Thanks for reaching out though, if we get more funds I will open new issues!

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