-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add guide for using GitHub Codespaces #152
base: main
Are you sure you want to change the base?
Conversation
…NHS Prototype Kit
All comments, feedback welcome. I'm not the best writer and squeezed this in between other work. |
Looks great, I'll give it a proper review asap (maybe next week though) and try to follow the instructions. Thanks for this 👍 |
I've suggested some changes (I probably should have done a PR)
Getting startedStart pagePage 1Page 2 |
Do you have those changes in a branch @vickytnz? Just the type of feedback needed. I just whacked up an initial bunch of stuff to shape for the docs. :) |
sorry it's pushed to this branch, I haven't quite figured out how to do review changes from my laptop yet 🙈 |
Oh I see. Didn't spot that, no worries that's all good. |
The one thing that I missed when doing some rewrites was the balance of 'you can do this' and 'you can do this and the prototype kit has been set up to make it easy for you'- I kinda wrote it for the first option without thinking about the second. It could be something as simple as a line about 'For this tutorial we are using Codespaces. This is because it is it popular and part of Github. The prototype has built-in functionality to make it easy to connect to Codespaces' or similar. |
Followed along and seems to work nicely. 👍 Minor comments:
Happy to make these changes myself if you prefer @paulmsmith Need a review from @sarawilcox and then we'll be good to go. |
And another thing… 😃 I did a test push and it went into the nhsuk-prototype-kit repo, rather than a fork/clone of it.
|
Hi @paulmsmith, I just had a go at this and I think it's good! I made a teeny tweak to capitalisation just to check how things work. I'll come back to this PR over the next few days to review the content fully. For now, I just wanted to get an idea how it works from a user's point of view. It works very similarly to GitPod so I was familiar with this sort of set up but it will be completely new for some people, especially content designers. I think Codespaces won't just be for people who can't install software. It's probably also good for people who don't have strong technical skills and are finding it difficult to install the prototype kit (or something like that). I can see people creating a Codespace following this guide, but then getting stuck on the editing/working with Codespaces page. The page goes into saving changes, managing prototypes etc. But I suspect non-specialists will need more help getting started. Just knowing:
The page points people off to https://docs.github.com/en/codespaces/getting-started/quickstart. But I'm struggling to understand that page. It's quite technical and the examples are not the sort that content designers can relate to. I think people will need more help saving their changes and committing back to GitHub. Don't know if it helps to take them through the few key commands that I use as a content designer:
I'll feedback more comments when I do a proper content review. I'm wondering if @LauraJD would like to have a go at this as someone completely new to using the kit in the browser. |
@paulmsmith @anandamaryon1 @vickytnz I've made a few tweaks (mainly to remove the suggesting of using the 'Fork' button for now). I think we could put this live, and then get some feedback on it from a few people who try it out? |
I have realised why we keep trying to use forking - it's the only option that is easily possible from the web browser only. RIght now unless we can test how someone can create a Codespace and then create a new GitHub repository using Codespaces (which I can't figure out right now) it risks circular logic. Because of this I've just fudges it and said it's not possible right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to manage expectations about using Codespaces for now as without a template it's actually pretty hard to do new? It might be possible to do it somehow with visual studio code but it's going to need instructions that I can't quite figure out right now.
@frankieroberto sorry i'm still figuring out how to show changes in the code editor - you'll need to go and look at my actual code change, oops. Actually it is this: 1. Go to the prototype repositoryGo to the GitHub repository for the prototype you wish to use. For this guide we will be using the NHS prototype kit repository. If you do not have a prototype repositoryIs it not possible right now to install the kit in a new Github repository unless you can install software on your computer. You can try using Codespaces using the NHS prototype kit repository. You will not be able to save your progress. |
Made small content edits. I do think this is close now. But some more general thoughts:
|
There might be another way to do this. Maybe there's a way to upload a whole folder of files within the GitHub interface somehow? Or I guess people could use GitHub Desktop to upload the initial folder, if they can install that but can't easily install or use Node.js? A template repo is worth exploring too though! |
@frankieroberto Interesting! I hadn't thought of just dropping the files into the repo in the browser… Have given it a try and it seems that when you download the repo as a .zip it doesn't include I also tried 'importing' the prototype kit repo into a fresh repo but it seem to be exactly the same as forking, where it brings over all of the Git history. Possibly there's another way or a setting I've missed, but I couldn't get it working myself. Update: tried making a fork of the proto repo in my own account, then turning that into a template repo and then making a new repo from that template but it keeps erroring… Maybe because it's weird that I'm trying to clone my own repo? Not sure what's going wrong though. If anyone else wants to try it, it's here: https://github.com/anandamaryon1/proto-template-test.git Another update: Think I've cracked it! What I did…
This seems like a good and fairly simple option, albeit that will require step by step instructions with screenshots as VScode isn't super intuitive. One question remains, how does this work when publishing the prototype to an org Github account, rather than your own (which is not advised)? |
|
To add to this can of worms… I suppose another option is to make an npm package, similar to how gov do it? I'm not sure of the pros and cons to this though. |
I still think that could be an option for the future (as it'd make updates way easier) - but will take a fair bit of work. And even if we do that, then a template repo, which would include the kit via |
<h3>If you do not have a prototype repository</h3> | ||
|
||
<p>It is not possible right now to install the kit in a new Github repository unless you can install software on your computer.</p> | ||
|
||
<p>You can try using Codespaces with the <a href="https://github.com/nhsuk/nhsuk-prototype-kit">NHS prototype kit repository</a>. You will not be able to save your progress.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit can now be updated to mention using the 'Use this template' feature on the NHS prototype kit repo on GitHub.
This PR is to add instructions for using the NHS Prototype Kit with Github Codespaces which is intended as a viable option for people who cannot (or would prefer not to) install the prototype kit on their computers.
It is contingent on a separate PR being merged to the prototype kit for a devcontainer to enable this.
Get started page
Setup the prototype kit on GitHub Codespaces
Step 1 - Create a Codespace
Step 2 - Working with Codespaces