wasp icon indicating copy to clipboard operation
wasp copied to clipboard

In examples/, modify example apps so that they have links to the Wasp source code

Open Martinsos opened this issue 3 years ago • 8 comments

When users are looking at Wasp example apps, they have no idea where to find the Wasp source code from which these apps were built! We could add, to each app, a banner at the bottom (or top), or some link, that says "check out the Wasp source for this app here".

Martinsos avatar Oct 06 '21 14:10 Martinsos

Do you mean something like this https://github.blog/2008-12-19-github-ribbons/?

h4r1337 avatar Jun 21 '22 13:06 h4r1337

Do you mean something like this https://github.blog/2008-12-19-github-ribbons/?

Exactly, this could be a good way to do it :)!

Martinsos avatar Jun 21 '22 13:06 Martinsos

I think I can do that... Is that also required for all pages? like in example/thoughts there is a main page and login/signup pages so, should I add that to all of the pages or just the main page?

h4r1337 avatar Jun 21 '22 13:06 h4r1337

Sounds good, pls do give it a try! Hmmm, I am not sure actually, I haven't thought about it. It might be a bit tricky to do it for all pages in Wasp, since we don't have an easy way to do "layouts" yet. You could do it by having your own wrapper in which you wrap all of the React components though. What do you think is better, having it only on homepage or on all pages? I am a bit tempted to have it everywhere, so it is easy for users to jump to the code at any point. But I am ok with whatever approach you pick, homepage is also good.

Martinsos avatar Jun 21 '22 14:06 Martinsos

Hey gang, I added this simple example banner a while back: https://github.com/wasp-lang/wasp/blob/a0b7477d19ff1ab70215ade454a81406720c6997/examples/waspleau/ext/WaspExampleHeader.js that was integrated into to these sample apps:

  • https://waspleau.netlify.app/

    • Screen Shot 2022-06-21 at 7 54 54 PM
  • https://waspello.netlify.app/

Feel free to use it as inspiration, or throw it away :D

shayneczyzewski avatar Jun 21 '22 23:06 shayneczyzewski

This is much better...

h4r1337 avatar Jun 23 '22 14:06 h4r1337

I am not familiar with wrapper components, can I add it manually for now? will think of some way to inherit from a base layout component later...

h4r1337 avatar Jun 24 '22 12:06 h4r1337

Go for whatever you feel comfortable with and we can then discuss it in the PR!

Martinsos avatar Jun 24 '22 12:06 Martinsos

Just saw that this issue is not yet closed. Can we close this?

h4r1337 avatar Aug 22 '22 10:08 h4r1337

Yes you did this one, let's close it!

Martinsos avatar Aug 23 '22 15:08 Martinsos