DCC-EX / WebThrottle-EX

WebThrottle-EX is a web based (html,jQuery,JavaScript) Controller/Throttle for DCC-EX EX-CommandStations
https://dcc-ex.com/WebThrottle-EX
GNU General Public License v3.0
21 stars 14 forks source link

End user update process #15

Closed matt-vdv closed 3 years ago

matt-vdv commented 3 years ago

At the moment, it is hard for end users to update the software, these are their options:

Does anyone have any ideas?

ManiAkasapu commented 3 years ago

@matt-hu I do not know if this is possible until we can embed HTML inside standalone application.. I am no expert but imagine something like clicking on a App icon (windows, mac, linux) it opens a wrapper application with Webthrottle embeded inside it. If we can embed and get chromium functionality inside and it supports serial and webstorage features, we then, only need a button to update the files from the latest repo released.

matt-vdv commented 3 years ago

@ManiAkasapu, if you check out the pwa branch, I have started to add pwa support. This allows it to be installed similar to an app.

One thing I thought of was setting up GitHub Pages for this repo, then it would automatically build from the master branch (I've done this in my fork, see here.

Another option would be to wrap it in a framework to produce native apps, as you said.

matt-vdv commented 3 years ago

@ManiAkasapu, @FrightRisk, would the GitHub Pages option I talked about above be possible?

I have got the pwa working. If you use the pwa branch, then look in the url bar next to the bookmark button. You should see a little plus button, this will install it locally.

I am also working on an electron version of the code.

matt-vdv commented 3 years ago

@ManiAkasapu @FrightRisk Just to give everyone an update, I have managed to get the PWA system to work. If you use my fork here and look in the navigation bar, you will see a small plus sign. If you click this, it will install it onto your PC (check under E on the start menu) and it will launch as a separate app. This also works offline as well!

ManiAkasapu commented 3 years ago

@matt-hu I did not see plus. Where exactly?

matt-vdv commented 3 years ago

@ManiAkasapu Its in the address bar: image Next to bookmarks The screenshot shows how it appears in the new edge on windows 10, but it should be the same in chrome

ManiAkasapu commented 3 years ago

No. I did not see. Look like it is kind of save for offline option. What it is called in Chrome? @matt-hu

ManiAkasapu commented 3 years ago

Also our throttle only works with chrome because of experimental feature it allows.

matt-vdv commented 3 years ago

Here is a chrome screenshot: image It takes a few seconds for it to appear

Basically, a lightweight version of chrome is used to run the app offline, so as long as the flag is enabled in chrome, it works in the app

matt-vdv commented 3 years ago

@ManiAkasapu What version of chrome are you on? (To find out, press the three dots, then under help - About google chrome in case you don't know where to find it)

ManiAkasapu commented 3 years ago

May be the flag you mentioned is not enabled on my chrome?!!

ManiAkasapu commented 3 years ago

I still did not see it. FYI, I am on Mac.

matt-vdv commented 3 years ago

@ManiAkasapu for some reason I can't see the image you posted...

ManiAkasapu commented 3 years ago
image
ManiAkasapu commented 3 years ago

Sorry, Its keep uploading but not completed.

matt-vdv commented 3 years ago

@ManiAkasapu I can see it now. Just doing a google search to find out why its not working...

matt-vdv commented 3 years ago

@ManiAkasapu If you use the three dot menu, do you get an option like this: image

matt-vdv commented 3 years ago

@ManiAkasapu Sorry, I think I made a mistake during my initial explanation. The PWA feature is only available when the site is hosted, not when running locally. To get around this, I have set up GitHub Pages in my fork. Unless you are using my fork, the install option won't show up. Here is the address for my fork: https://matt-hu.github.io/exWebThrottle Hope this helps

ManiAkasapu commented 3 years ago

@matt-hu I just tried with Chrome in Mac. It is very good. It even showed on "Search for App" in Mac.

matt-vdv commented 3 years ago

@ManiAkasapu that's great! Do you reckon we should use this to distribute the program, rather than a download?

ManiAkasapu commented 3 years ago

@matt-hu I am no expert. Let's ask @FrightRisk

ManiAkasapu commented 3 years ago

@matt-hu On second thought. Can we have a button in settings page that says "Install on my system", Which exactly does what it is doing now?

matt-vdv commented 3 years ago

@ManiAkasapu Good idea! I have started work on that.

FrightRisk commented 3 years ago

Sorry just getting to this now. The web page is changing and will be much easier to update, though it will have to be built. That said, since everything is in dcc-ex.github.io, the files can be added there directly. I am still not up to speed on the PWA option. Are there any "cons" to this?

matt-vdv commented 3 years ago

@FrightRisk no 'cons ' as far as I am aware

ManiAkasapu commented 3 years ago

Yes. I tried it was good. I just added suggestion to have install button inside settings page.. that avoids searching in chrome menu and also we can move where ever we want later...

FrightRisk commented 3 years ago

So is the idea, they can use the latest version directly from the website and then optionally "install on my system"?

On Sat, Nov 21, 2020 at 8:17 PM Mani Kumar A notifications@github.com wrote:

Yes. I tried it was good. I just added suggestion to have install button inside settings page.. that avoids searching in chrome menu and also we can move where ever we want later...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/exWebThrottle/issues/15#issuecomment-731661616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWCHEKNJOOTZ7O2I34LSRBRDLANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

@FrightRisk Exactly that. We would have a build branch on this repo that we push to every time we want to release an update, then the website would be automatically rebuilt, anyone using the website would get the update. People who had installed it would get the update as soon as they are connected to Wi-Fi (I believe chrome can do it in the background, before they even open the app)

FrightRisk commented 3 years ago

That sounds good. I need to look and see how the new website affects things if at all. We went to Sphinx, so the website publishing is slightly different. I think if there is an exwebthrottle folder then when it builds the html it will pull it across to the live site.

On Sun, Nov 22, 2020 at 12:19 PM Matt notifications@github.com wrote:

@FrightRisk https://github.com/FrightRisk Exactly that. We would have a build branch on this repo that we push to every time we want to release an update, then the website would be automatically rebuilt, anyone using the website would get the update. People who had installed it would get the update as soon as they are connected to Wi-Fi (I believe chrome can do it in the background, before they even open the app)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/exWebThrottle/issues/15#issuecomment-731779966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWCQFPZZEOPL3X6UUODSRFB2DANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

@FrightRisk I think the exwebthrottle stuff is done the same way... The files are scattered amongst the various folders.

If you are ready for us to go ahead with this, I can make the changes to the website and create a pull request once everything else is done

FrightRisk commented 3 years ago

That sounds good. I am trying to merge some changes now and resolve a conflix

On Mon, Nov 23, 2020 at 12:24 PM Matt notifications@github.com wrote:

@FrightRisk https://github.com/FrightRisk I think the exwebthrottle stuff is done the same way... The files are scattered amongst the various folders.

If you are ready for us to go ahead with this, I can make the changes to the website and create a pull request once everything else is done

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/exWebThrottle/issues/15#issuecomment-732306778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWDOUJBGBYVS2WL6U7LSRKLEZANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

@FrightRisk If we do want to go ahead with this, here are the steps we would need to take (in this order):

  1. Prepare the repo - I can do this, this involves creating the build branch and merging/correcting everything from pwa branch
  2. Set up GitHub pages to build from the build branch - someone with admin needs to do this
  3. Sort out the dcc-ex.github.io repo - again, I can do this, as long as someone merges my pull request
FrightRisk commented 3 years ago

Why build from build instead of Main? If you do 1, I'll do 2. then we can get to 3.

On Tue, Nov 24, 2020 at 12:08 PM Matt notifications@github.com wrote:

@FrightRisk https://github.com/FrightRisk If we do want to go ahead with this, here are the steps we would need to take (in this order):

  1. Prepare the repo - I can do this, this involves creating the build branch and merging/correcting everything from pwa branch
  2. Set up GitHub pages to build from the build branch - someone with admin needs to do this
  3. Sort out the dcc-ex.github.io repo - again, I can do this, as long as someone merges my pull request

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/exWebThrottle/issues/15#issuecomment-733114941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWGFOXPPQFBHBOBTUBDSRPSCHANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

@FrightRisk The reason I said build from a build branch is to avoid accidentally releasing a new feature before we are ready. At the moment, we let new features accumulate on the master branch from our individual dev branches, then once enough features have accumulated, we tag it and make a release. With the new system, this wouldn't work as it builds as soon as you push to the branch you are building from. This would mean people would be using code that is untested and halfway between versions.

matt-vdv commented 3 years ago

@FrightRisk 1 is done, made a PR for 3, so only 2 left to do!

FrightRisk commented 3 years ago

So help me out here a bit more. My limited understanding is that in a repository, you can have a web page. We already have a web page located at dcc-ex.github.io (dcc-ex.com). So if we set up pages on this repo, we now have two websites to maintain? I guess it isn't a "real" website as much as it is just a repo that happens to have web access to what's in it. So then the actual website would point to whatever is in the WebThrottle-EX repo in the "build" branch and that just happens to be pointed to and exposed as a website by github pages. So WebThrottle doesn't ever get copied to or run from where the full website is hosted. Do I have it?

Fred

On Sun, Nov 22, 2020 at 12:19 PM Matt notifications@github.com wrote:

@FrightRisk https://github.com/FrightRisk Exactly that. We would have a build branch on this repo that we push to every time we want to release an update, then the website would be automatically rebuilt, anyone using the website would get the update. People who had installed it would get the update as soon as they are connected to Wi-Fi (I believe chrome can do it in the background, before they even open the app)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/exWebThrottle/issues/15#issuecomment-731779966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWCQFPZZEOPL3X6UUODSRFB2DANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

@FrightRisk exactly right!

FrightRisk commented 3 years ago

Ok, so I'll create a "site" and point it to build. Is it build root or /docs?

matt-vdv commented 3 years ago

@FrightRisk build at root please!

FrightRisk commented 3 years ago

done. I'll check your PR and if everything is caught up with other changes and there are no conflicts, I'll merge it.

matt-vdv commented 3 years ago

@FrightRisk Thanks! Just checked, the build appears to be fully working, will thoroughly check later...

FrightRisk commented 3 years ago

So then I'll just have to merge

On Mon, Nov 30, 2020 at 11:29 AM Matt notifications@github.com wrote:

@FrightRisk https://github.com/FrightRisk Thanks! Just checked, the build appears to be fully working, will thoroughly check later...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DCC-EX/WebThrottle-EX/issues/15#issuecomment-735894102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI36OWGGADU7ILV7Q5NZBD3SSPB6ZANCNFSM4SZL3TXQ .

matt-vdv commented 3 years ago

Everything is working! Great job guys!! I am tweaking some things and there will be more web content up soon. What is the process now for making changes? Which branch is for development? And how do things get into _build? For example, there is a misspelling I need to correct, where do I do it and how to I make sure it is merged and buit wherever it needs to be?

@FrightRisk To push the typo, make the change in whichever branch you like (can be master), then pull the change to master (if not already there) and then to build. Normally, we will only push to build when we tag and create a release, but as we are still migrating, I think we can make an exception as we haven't technically released 1.3.0 yet...

In the future, development will be done on feature specific branches, this I have done a little already (pwa, unified-settings etc.)

matt-vdv commented 3 years ago

@ManiAkasapu Could you please read the above and see if you agree with what I have set out?

If everyone is ok with this, I will write contributing guidelines detailing all of this at some point...

ManiAkasapu commented 3 years ago

@matt-hu So, If the build (branch) version is changed, its gonna automatically notify the user with a Banner along with button on the top of screen (if current version < build version) and clicking on button will update and once its done the banner gets removed?

matt-vdv commented 3 years ago

@ManiAkasapu Even better than that! No user input needed, all done automatically when the web page is refreshed (either by opening the app, opening the webpage or refreshing the page)

ManiAkasapu commented 3 years ago

Then I have nothing to comment except Wonderful !!! @matt-hu

matt-vdv commented 3 years ago

@ManiAkasapu Thanks!

I will write up the contributing file when I get some time...