Solana-Workshops / .contributing

Details about contributing to new or existing workshops
1 stars 0 forks source link

Expense Tracker Workshop #2

Closed GitBolt closed 1 year ago

GitBolt commented 1 year ago

Here is the code: https://github.com/GitBolt/solana-expense-tracker

Please do let me know if I should make any modifications!

This is a basic app with simple UI that allows:

All entries are PDAs owned by the user account.

buffalojoec commented 1 year ago

Hey, this is looking great so far!

I'm getting this error from your UI:

Screenshot 2023-05-11 at 2 29 35 PM

However, I could kinda see the wheel graph! That's cool!

A few requests from my side:

Also, according to the grant posting on Superteam's board, the deliverables are as follows:

A fully functional application built on Solana that demonstrates the ability to interact with the Solana blockchain. All source code for the application, written in a professional manner with clear documentation committed to https://github.com/Solana-Workshops. A detailed README file that explains how to set up and run the application. A technical workshop that teaches participants how to build the application deployed to Solana Playground (https://beta.solpg.io/tutorials). All workshop materials, including presentation slides, code examples, and any other necessary materials. You've got 1, 2, 3 and 5 in your repository, but in regards to #4:

You cannot host websites on Solana Playground, but you can host Rust programs and client-side JavaScript code. What's your plan for adding this workshop to their collection?

Have a look at that error and my comments above, and then ping me for another review, ser

GitBolt commented 1 year ago

gm @buffalojoec

buffalojoec commented 1 year ago

Hey the documentation is looking great. Thank you for adding all of that context. There's a couple quick-fixes needed in the README, like you have */utils/* in the link when the real directory is /util/.

Also, the SolPG button does seem to work correctly and it's great that you have it, but check out the tutorials in SolPG's tutorials page. This is where we want you to add your finished workshop once it's all done. You can add just the program and tests, and put the parts of your README into the tutorial that pertain to the program and tests, and then provide a link to the repository and say something like "For the full workshop with a user interface go here".

Finally, the app itself still has some bugs.

I can't seem to delete any existing expenses with the little red trash can button. The preview on my wallet shows "Unknown Error" and when I approve nothing happens.

Also, I can't add any expenses, it again shows "Unknown Error" on the wallet and then I get this on the UI:

Screenshot 2023-05-12 at 2 16 20 PM

Also I noticed these variable names have underscore prefixes and they probably shouldn't:

Screenshot 2023-05-12 at 2 23 14 PM
GitBolt commented 1 year ago

Fixed these issues! Can you check once more? And sure, I'll add this to SolPg tutorials as well! @buffalojoec

buffalojoec commented 1 year ago

OK great! Works good on my end!

Just one nit pick: please add a little note about how to add the IDL types to the util/idl.ts file. I know you have it in there, but just mention they have to name it IDLType and IDLData.

Other than that we're good to go. Nice work!

Once you've got a tutorial PR'ed into Solana Playground's repository, link the PR here and I'll add this workshop into the collection, and then we'll call it a day!

GitBolt commented 1 year ago

Added IDL instruction, made a PR to solpg's repo, let's wait for it to merge!

GitBolt commented 1 year ago

gm @buffalojoec it's merged! https://github.com/solana-playground/solana-playground/pull/135

buffalojoec commented 1 year ago

@GitBolt great, did you pull all formatting changes into your repository? Acheron requested both rustfmt and prettier

GitBolt commented 1 year ago

yeah I did! forgot some minor update with test, just commited it as well @buffalojoec

buffalojoec commented 1 year ago

I still seem to run into this error when trying to interact with the UI. Any idea why?

Screenshot 2023-05-25 at 11 19 39 AM Screenshot 2023-05-25 at 11 19 57 AM
GitBolt commented 1 year ago

@buffalojoec finally fixed! apologize for the issues!

buffalojoec commented 1 year ago

Cool, last favor: Change the provider configs in the Anchor.toml to this:

Screenshot 2023-05-30 at 3 45 21 PM

Then we can merge it in. I've set up a repository for you, go ahead and fork it, paste your code, and create a Pull Request https://github.com/Solana-Workshops/Expense-Tracker

buffalojoec commented 1 year ago

You might even be able to PR from your existing repo to the new empty one

GitBolt commented 1 year ago

Thanks. Changed it.

I'm not able to fork/clone repo however as its an empty repo. Can you just add a LICENSE for example?

buffalojoec commented 1 year ago

Try now!