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

fix: update frontend tutorial to latest libs #1121

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Dec 11, 2024

@chadoh chadoh marked this pull request as draft December 11, 2024 19:08
@stellar-jenkins
Copy link

@chadoh chadoh force-pushed the fix/dapp-tutorial branch 2 times, most recently from 730378a to d4e1b9b Compare December 11, 2024 19:41
@chadoh chadoh marked this pull request as ready for review December 11, 2024 19:43
@stellar-jenkins
Copy link

And just make sure it works, in general. It was pretty broken.

Relies on these fixes:

- stellar/soroban-template-astro#13
- stellar/soroban-template-astro#14

And can be cleaned up once this is merged:

- Creit-Tech/Stellar-Wallets-Kit#49
@stellar-jenkins
Copy link

1 similar comment
@stellar-jenkins
Copy link

Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One ask inline, otherwise looks good.

Reading this doc also reminded me the docs are pronoun heavy that increases the effort to read them, and shifts focus to the author and reader, rather that than the topic under discussion. Fixing that is out of scope of this PR though.

@@ -19,25 +19,32 @@ Let's get started.

You're going to need [Node.js](https://nodejs.org/en/download/package-manager/) v18.14.1 or greater. If you haven't yet, install it now.

We want to initialize our current project as an Astro project. To do this, we can again turn to the `stellar contract init` command, which has a `--frontend-template` flag that allows us to pass the url of a frontend template repository. As we learned in [Storing Data](../smart-contracts/getting-started/storing-data.mdx#adding-the-increment-contract), `stellar contract init` will not overwrite existing files, and is safe to use to add to an existing project.
We want to initialize our current project as an Astro project. To do this, we can clone a template. You can find Soroban templates on GitHub by [searching for repositories that start with "soroban-template-"](https://github.com/search?q=%22soroban-template-%22&type=repositories). For this tutorial, we'll use [stellar/soroban-template-astro](https://github.com/stellar/soroban-template-astro). We'll also use a tool called [degit](https://github.com/Rich-Harris/degit) to clone the template without its git history. This will allow us to set it up as our own git project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find Soroban templates on GitHub by

soroban-template-

'Soroban template' doesn't feel specific enough and is also oddly over specific.

Soroban is the contract runtime. But a dapp / web app is primarily interacting with the Stellar network, not the contract runtime.

Templates could exist that don't use contracts at all too.

stellar-template?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, @leighmcculloch. I think stellar-template-* is probably a better prefix.

So far, these templates have been focused on interacting with smart contract projects, which is why we started with soroban-template-*.

If we want to update this, we will need to update all the existing templates. These are mostly owned by @ElliotFriend. What do you think, Elliot?

Copy link
Member

@leighmcculloch leighmcculloch Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we consider using repo topics?

Repo topics are convenient because you can browse and search them on GitHub, where-as searching for repos with a particular prefix is harder / less accurate and will match on unrelated things.

For example:
https://github.com/topics/stellar

I think we could create a topic stellar-template:
https://github.com/topics/stellar-template

Vs searching for repos with a particular prefix, which requires devs to have knowledge of GitHub search queries:
https://github.com/search?q=soroban-template-+in:name&type=repositories

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another pro for repo topics is that any repo assigned a topic will have a little blue circle with the topic name in it on it's home page, which when folks click will take them to a browsable list of repos sorted by popularity that are also tagged with the topic. i.e. Repo topics are self discoverable.

Copy link
Contributor

@ElliotFriend ElliotFriend Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this conversation is a bit old at this point, sorry. I'm not very familiar with repo topics, but it sounds like that's an easier, more discoverable way to go. Maybe we can also recommend that stellar-template-* is a convention that's often used for templates?

To the point @chadoh made, it does seem like something we could tackle in a subsequent PR

Edit: I've gone through my templates and added the following topics, for whatever it's worth. soroban, soroban-template, soroban-template-frontend, soroban-frontend-template, stellar, stellar-template, stellar-template-frontend, stellar-frontend-template. Figured the shotgun approach might get all our bases covered lol

@chadoh
Copy link
Contributor Author

chadoh commented Dec 17, 2024

the docs are pronoun heavy that increases the effort to read them, and shifts focus to the author and reader, rather that than the topic under discussion

I'm not quite sure I understand the complaint. You mean all the switching between "we" and "you", @leighmcculloch?

Regardless, it seems like maybe both this and the "rename to stellar-template- can be dealt with in a follow-up PR?

If you agree with that @leighmcculloch, then maybe you can review and merge if you like it, @ElliotFriend?

Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good, but we should change from a repo name prefix to a repo topic, or both, so that folks can search for templates using repo topics.

Conversation here:

@Ifropc
Copy link
Contributor

Ifropc commented Jan 9, 2025

@chadoh should we bump review for all PRs that this PR depends on?

@janewang janewang merged commit 46090c9 into stellar:main Jan 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants