Skip to content
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

Web app #116

Merged
merged 70 commits into from
Oct 11, 2022
Merged

Web app #116

merged 70 commits into from
Oct 11, 2022

Conversation

georgefst
Copy link
Collaborator

@georgefst georgefst commented Sep 20, 2022

Commit history is messy, This should be squash-merged. (I'm usually a stickler for clean git history, but this has been pretty error-prone and exploratory because of my lack of previous experience with GHCJS and GitHub actions)

Note that I don't intend to close #81 with this PR. This just gets an initial version of the app included in to this repository.

The last few points there may be worth tackling now (CI, hosting, docs). Indeed we need to do something about CI to get this PR to pass. Currently CI is trying to build the web package with some pretty old GHCs and that's not going to work. I'd be happy if we only check the Nix build on CI. I may need @cdepillabout's help with this stuff.

The rest I'm unlikely to revisit while the workflow is so awkward. Such as Miso/GHCJS still being stuck on GHC 8.6. And jsaddle-warp crashing in Firefox.

@georgefst georgefst marked this pull request as draft September 20, 2022 19:00
@georgefst georgefst mentioned this pull request Sep 20, 2022
11 tasks
@georgefst
Copy link
Collaborator Author

georgefst commented Sep 25, 2022

Although, it looks like Firefox won't load the CSS because it gets the wrong mime type

I can't reproduce (Firefox fails catastrophically for me, as mentioned in another thread, and Chromium doesn't complain), but I'd guess 692919b solves this.

Also, it looks like it is sending thousands of requests. Is this just how Miso/GHCJS works?

I'm no expert either, but I believe this is down to how JSaddle works. The production build won't have this issue.

Only build pretty-simple package in cabal CI. Build web with Nix in CI.
@georgefst
Copy link
Collaborator Author

Shall we merge this then? The other things I think we should do right now are auto-deploy (to your github.io?) on merges to master, and put a link in the README. I'm pretty indifferent as to whether or not we do that in this PR, or separate ones.

@cdepillabout
Copy link
Owner

I can't reproduce (Firefox fails catastrophically for me, as mentioned in another thread, and Chromium doesn't complain), but I'd guess 692919b solves this.

Ah, I was just running cabal run web in the wrong directory. I was running it at the root, but it expects to be run in web/. I tried to clarify this in #119.

Shall we merge this then?

Yeah, sounds good to me! I'm completely fine if you want to tackle the deployment stuff in a separate PR.

Or this PR is fine too if it is easier for you.

@georgefst
Copy link
Collaborator Author

Yeah, sounds good to me! I'm completely fine if you want to tackle the deployment stuff in a separate PR.

I've started now, so I'll finish.

I've set up a Cachix cache for this project, and invited you via email. This should speed things up considerably since we actually miss Miso's cache quite a lot. But we'll need some configuration so that the GitHub Actions runner can push to this cache. As you're the owner of the repository, I think only you can do this. See here.

You might also want to take over on configuring deploy.yaml to point it to your github.io repo, and feed in the right auth tokens. I've got it as far as putting the right files on a branch in this repo. Documentation here.

When that's all done, we need to uncomment some TODOs in the YAML files before merging.

@cdepillabout
Copy link
Owner

cdepillabout commented Oct 1, 2022

I've set up a Cachix cache for this project, and invited you via email.

I never ended up getting an email about this. Would you be able to try to re-send it? You should be able to find my email in either the git history for this repo or on https://functor.tokyo/about.

I'll add the Cachix keys/tokens to this repo after I sign up.

edit: With the Miso cachix enabled, it looks like nix-building web only takes like 8 minutes. That's not too bad. I'd be fine with not having our own cachix cache if that is easier.

Add explanation how to run local web server
@cdepillabout
Copy link
Owner

I clicked around in the settings for a while and got the website deploying correctly from the gh-pages branch:

https://cdepillabout.github.io/pretty-simple/

Looks good!

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@georgefst
Copy link
Collaborator Author

I never ended up getting an email about this. Would you be able to try to re-send it? You should be able to find my email in either the git history for this repo or on https://functor.tokyo/about.

I've just tried again. I previously took the email from the commit history, but maybe I made a mistake.

But actually, I think it's possible that no email needs to be sent, and you just need to sign up for Cachix. Then visit the page I used to add you.

@cdepillabout
Copy link
Owner

cdepillabout commented Oct 9, 2022

@georgefst Hey, I didn't get an email this time either. I may not have time to get to this for another week or so. How about merging this branch as is, and I can try to setup cachix in a future PR when I have some more free time?

@georgefst
Copy link
Collaborator Author

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web app improvements
2 participants