-
-
Notifications
You must be signed in to change notification settings - Fork 914
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
Docs and demo app being on a separate branch is weird #133
Comments
@Martinsos I like your separate dirs suggestion. I personally would go with This would make it easy for our The patch idea sounds cool, but also like a lot of extra work. At the moment, it's pretty easy to apply changes to both manually when necessary. |
Cool, that is good then! Ok, although I really hope nobody would directly clone the repo, I think the only way for us to keep open-saas maintainable is to give up on people directly cloning, because that limits us. So I would avoid considering that as a use case. It is easy to apply changes -> that surprises me, I thought it would be quite hard to keep applying changes to both. For example, all these small PRs I did, how will we apply those to the demo app? We will also be having bigger PRs soon, how will we apply those changes? Sounds easiest to me to always reapply things that are unique to the demo app on top of whatever is the latest state of the actual template, which is why I was mentioning patch files, and why I thought that current approach with branches actually has those benefits. |
We should take a look at #131 (comment) while doing this and if we go with two dirs, also add a top level |
I like the thinking generally in this thread 👍 the template and the demo app should be separate (dir level or repo level) and the updating of the demo app isn't that much work so it's okay if it remains a manual operation. Fork ideaAnother idea I had while I was thinking about this issue today: why don't we make this repo the "open-saas template repo" and then fork this repo where we then make changes to the template to match the current "open-saas demo app". If it's a fork, we can sync it to the main repo (Github has support for this in the UI) and that way we get the benefits from the changes in the main repo, while keep the commits that make up the demo app. |
From what I see, we all agree we don't want That sounds good to me as well. As for the other stuff... At first, I was against giving up on users cloning the repo. Anyway, I wanted to keep cloning (or something similar to cloning) because:
However, the docs and demo app thing is annoying, and it does seem more practical to separate this stuff into folders inside the same repo. So, here's the compromise I propose:
|
Ok thanks for the ideas @infomiho and @sodic ! Github template vs
|
@Martinsos I agree with the likely approach.
I'm still not convinced here. How do you feel about the arguments on why we should also support something like
Could you list some examples of this (and also would the same problems persist in the |
Martin blackmailed me on a call, and we're doing it his way. (just kidding, he explained everything and it makes sense) |
@Martinsos when updating the demo-app, i've often just been cherry-picking commits over to Btw, I've removed the |
Ok that is what I suspected. I think that will become a problem as time goes, so we should consider how to make this process of updating the demo-app as straightforward as possible. @vincanger could you just give me a very high level overview here, how does the demo app differ from the template? I expect an answer like "well it is 98% the same, but we added this thing here, and removed this thing here, and changed this title, and that is really it". |
I started some initial work on this, so I assigned myself to the issue now. Two main tasks:
Vince I did some intial digging into the differences on my own, but will still need your help to finalize it. I made a draft PR where I documented what I did so far, and plan to continue from there: #154 . |
The fact that docs for the template, and a demo app (which is template + some small modifications) are on a separate branch (
deployed-version
) from the actual template (main
) is weird.When updating the template, one would normally also want to update the docs, and maybe also the demo app. We should be able to update all of these in one PR.
What we are actually doing here right now is using multiple branches to have multiple projects in the same repo, but that is not how this should be done, we should use directories for that.
One reason for doing this before was that we allowed people to create a new repo by using GitHub's "template repo" functionality. We gave up on that, so that is not a valid reason any more.
One could also argue that having a demo app and docs on a separate branch allows for easy updating of them with new changes from the template (you merge in new stuff from the template when it updates). That does however also mean that those changes can't be done in the same PR in which they are done for the template, which is not great. But this is a better argument, and the question is, how are we going to be updating demo app and docs?
So, let's try to figure this out!
Current approach
Ok, so problems with the current approach:
I wonder, how do we now make sure that demo app and docs are up to date? If somebody does a PR to
deployed-version
branch, does it get deployed automatically, both app and docs? I know we ask users to make changes for docs againstdeployed-version
, but who makes sure that the demo app gets updated with those changes and re-deployed?Does the fact that demo app is on separate branch help with updating it when template changes? Is it always one big fat commit on top of commits from template so you just keep rebasing that one, or merging into it?
All in dirs
What if we put stuff into directories?
So at the top level we would have
template/
anddemo-app/
(oropen-saas-sh
).Then, one can make changes to everything in a single PR.
But, the bad thing is, they should make changes to everything in a single PR. If we did use some branch tricks to help us update the demo app based on changes in the template, we can't use that anymore, at least not as easily.
So how do we easily update demo-app and docs, when template changes? Maybe we could have them implemented in some smart way: so instead of having them be duplicates of template and its docs, we would represent them as patch files, and would have a script that applies patch files to the template to produce demo app and its docs? Is there some existing tooling or something that would help with this? Sounds a bit too much?
Separate repo
So instead of having multiple branches, we could have demo app in a separate repo. I am not sure we get much with this though. Kind of makes sense, because now it is an actual another app that is made from open-saas template, but other from it semantically being "better", I don't see any other benefits, it has all the same problems as the approach with multiple branches. It does feel a bit better though, less/not wrong.
What now
Ok, this is a problem statement + some potential solutions: let's discuss!
The text was updated successfully, but these errors were encountered: