Skip to content

Add tutorial about Single Page Application#1514

Closed
codec-abc wants to merge 14 commits intoyewstack:masterfrom
codec-abc:master
Closed

Add tutorial about Single Page Application#1514
codec-abc wants to merge 14 commits intoyewstack:masterfrom
codec-abc:master

Conversation

@codec-abc
Copy link
Contributor

Description

As discussed in the issue #1384 and the Discord server this PR add a tutorials section and specifically the tutorial @sheshbabu has written in his blog.

Fixes # (issue) 1384

On the technical side I struggled to add the page to the website. Specifically, I needed to add the page and the entry for the sidebar in the 0.17.3 version so it shows up when running docusaurus. I'm not sure if it's in the correct directory. I would appreciate feedback about this.

Checklist:

  • I have run ./ci/run_stable_checks.sh
  • I have reviewed my own code
  • I have added tests

@teymour-aldridge
Copy link
Contributor

Thanks for adding this!

I think it's not a bad move adding a tutorial to the documentation. Questions that come to mind to me about this are:

  • is this a tutorial we want to "officially" adopt – i.e. (a) do we want an "official" tutorial and (b) if so, should it be this one?
  • are we prepared/able to take on an additional maintanance burden which is entails: (a) the need to fix/patch mistakes people encounter and (b) keep the tutorial up to date with the project as it progresses?

My thoughts on the first question are that we don't want an "official" tutorial, but including a few community contributed tutorials in the documentation seems like a solid plan.

In terms of maintance perhaps we should have a maintanance structure similar to Yewtil – i.e. that bugfixes/improvements are accepted but the core project maintainers don't commit to maintaining it?

@codec-abc
Copy link
Contributor Author

@teymour-aldridge:
It seems like the questions you have are mostly targeted at the Yew organization and members. If so, it might be better to bring some folks that can share opinions about your question here. At my level, I don't have answer to these.

@teymour-aldridge
Copy link
Contributor

Yup. It would be useful to have @jstarry or @siku2 (forgive me for the ping 😄) give an opinion on whether they want to adopt/write a tutorial.

In any case I have a review for this in the works.

Copy link
Contributor

@teymour-aldridge teymour-aldridge left a comment

Choose a reason for hiding this comment

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

There's quite a bit here! This is just an initial pass to fix some spelling grammar.

My fear is that some of the code is going to fall behind/get confused as it is updated and it may be a struggle to keep it compiling and running as intended, particularly because it's written up as a series of diffs so at each stage the code needs to work and we can't set up some sort of CI for the progress as far as I can see.

I realise that you didn't write the original tutorial so it might be difficult to address some of these issues.

I'm pretty convinced that this should either be an unoffical tutorial included in the documentation, or set up somewhere externally and then linked to by us.

original_id: single-page-application
---

This tutorial is based on an tutorial by [Sheshbabu](https://github.com/sheshbabu). The original article can be found [here.](http://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/). It has been slightly reworked and should give a pretty good understanding of Yew and how to build single pages Application. Still, if you see a way in which it can improve this tutorial to do reach the Yew community. Contributions are welcome.
Copy link
Contributor

Choose a reason for hiding this comment

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

an tutorial => a tutorial
single pages Application => single page applications

I'm not 100% sure about what the meaning of "Still, if you see a way in which it can improve this tutorial to do reach the Yew community." is

Suggested change
This tutorial is based on an tutorial by [Sheshbabu](https://github.com/sheshbabu). The original article can be found [here.](http://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/). It has been slightly reworked and should give a pretty good understanding of Yew and how to build single pages Application. Still, if you see a way in which it can improve this tutorial to do reach the Yew community. Contributions are welcome.
This tutorial is based on a tutorial by [Sheshbabu](https://github.com/sheshbabu). The original article can be found [here.](http://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/). It has been slightly reworked and should give a pretty good understanding of Yew and how to build single page applications. Still, if you see a way in which it can improve this tutorial to do reach the Yew community. Contributions are welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just a way to encourage people to do a PR to improve the tutorial if they see a way to do so. How you would phrase it?

wasm-bindgen = "0.2"
```

Now, we will create a new file named `Makefile.toml` to automate our build. We will use the following content:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this needs some explanation (that it uses a tool called cargo-make) – just something brief?

@teymour-aldridge
Copy link
Contributor

Also it looks to me like the spellcheck hasn't fired?

codec-abc and others added 9 commits August 27, 2020 00:08
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
@codec-abc
Copy link
Contributor Author

What do you mean by spellcheck firing? Is there something in particular that should run spellcheck on this? Or maybe you mean using something like Word on the text?

…s/single-page-application.md

Co-authored-by: Teymour Aldridge <[email protected]>
@teymour-aldridge
Copy link
Contributor

We have a Github action which checks all the spellings, but it seems not to have run on this PR for some reason.

@teymour-aldridge
Copy link
Contributor

teymour-aldridge commented Oct 4, 2020

This has been sitting for a while – I think it would be better hosted externally and then linked to as a "community resource" in the documentation

On the technical side I struggled to add the page to the website. Specifically, I needed to add the page and the entry for the sidebar in the 0.17.3 version so it shows up when running docusaurus. I'm not sure if it's in the correct directory. I would appreciate feedback about this.

Perhaps we should add a note stating that people writing code for Yew might find it useful to ask on the Discord server if they get stuck?

@jeffreyscottgraham
Copy link

So where to find this tutorial after all the above, so that it stays current?

@teymour-aldridge
Copy link
Contributor

Not sure. @sheshbabu might be happy to have a look and update the blog post where they think would be appropriate to do so and we can add a link to their tutorial under a "community resources" section?

@ranile
Copy link
Member

ranile commented Aug 14, 2021

#1968 added the tutorial so we can now close this PR

@siku2 siku2 closed this Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants