-
Notifications
You must be signed in to change notification settings - Fork 145
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
Conversation
Preview is available here: |
730378a
to
d4e1b9b
Compare
Preview is available here: |
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
d4e1b9b
to
098ee9e
Compare
Preview is available here: |
1 similar comment
Preview is available here: |
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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 If you agree with that @leighmcculloch, then maybe you can review and merge if you like it, @ElliotFriend? |
There was a problem hiding this 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:
@chadoh should we bump review for all PRs that this PR depends on? |
And just make sure it works, in general. It was pretty broken.
Relies on these fixes:
And can be cleaned up once this is merged: