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

Docs: Getting Started content for Documentation #96

Merged
merged 29 commits into from
Jul 5, 2018

Conversation

bernars-usa
Copy link
Contributor

This reorganizes the Getting Started content that existed in https://github.com/usds/us-forms-system/blob/master/docs/getting-started.md. This is a branch off of #90, and addresses part of #86.

I'm looking for feedback on organization as well as technical accuracy. There are likely gaps in information here as well; if you feel like pointing those out here, please do, otherwise we can add more in another pass after the reorganization. Up to you, dear reviewer.

cc @usds/forms-system


To enable your form, create the following files. For an example of these files, see the [us-forms-system-starter-app repository](https://github.com/usds/us-forms-system-starter-app).

- A [form config file](https://github.com/usds/us-forms-system-starter-app/blob/master/js/config/form.js). For more information, see "Creating a form config file."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd love to give more information about these files, if there's anything to elaborate on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that's fair. These are pretty standard files needed for a generic React app. I wonder how much we should explain here and how much we should expect people to know from React. Would love your thoughts on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder how much we should explain here and how much we should expect people to know from React.

I'll look into what React resources exist and see if there's anything easily linkable. 👍

@bernars-usa bernars-usa self-assigned this Jun 20, 2018
Copy link
Contributor

@annekainicUSDS annekainicUSDS 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 great! Just a few minor comments

@@ -1,7 +1,13 @@
# Getting started with the Forms System Library

### Creating a new application with the US Forms System Starter App
Depending on your needs, you can either create a brand new application from scratch or install the US Forms Library in an existing application.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nitpicky, but I notice sometimes we refer to this library as US Forms System, or US Forms Library, or Forms System Library. We might just want to pick 1 name and be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we definitely need to standardize. Will poll on which we like. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Per conversation in HipChat, we're going to go with US Forms System.


### [Installing the library in an existing application](getting-started/installing-the-library-in-an-existing-application.md)

If your existing application has a web server to run the app locally, you can install the US Forms System Library in that app.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the real distinction of why you would want to go this route is less about the existence of a web server and more about just having an existing React app that you want to integrate us-forms-system into, so I might change this content to reflect that. Let me know if that doesn't make sense!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes a ton of sense, and is a much better description. I'll incorporate that!

@@ -0,0 +1,35 @@
# Installing the library in an existing application

If your existing application has a web server to run the app locally, you can install the US Forms System Library in that app.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above


1. Install the library:
```bash
npm install --save https://github.com/usds/us-forms-system.git
Copy link
Contributor

Choose a reason for hiding this comment

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

Once we move to publish this library as an npm package, we'll have to update these instructions. Need to remind myself to do this at that point!


To enable your form, create the following files. For an example of these files, see the [us-forms-system-starter-app repository](https://github.com/usds/us-forms-system-starter-app).

- A [form config file](https://github.com/usds/us-forms-system-starter-app/blob/master/js/config/form.js). For more information, see "Creating a form config file."
Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that's fair. These are pretty standard files needed for a generic React app. I wonder how much we should explain here and how much we should expect people to know from React. Would love your thoughts on this.


The US Forms System Starter App creates the initial files, configuration, build process, and web server you need to start building your form immediately.

For more information, including app installation instructions, see the [US Forms System Starter App README](https://github.com/usds/us-forms-system-starter-app#us-forms-system-starter-app).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was talking to @fatimanoorva this afternoon about where to put the instructions for setting up the starter app. I'm leaning toward wanting to keep the instructions in this repo alongside the other docs, rather than keeping two sets of docs in separate repos. Thoughts/feelings?

There's also an issue open about needing to enhance those instructions (#79). I'm working on getting the starter app running on my machine, too, and taking notes.

@bernars-usa
Copy link
Contributor Author

Besides the failing CI, this is ready for another round of reviews. Thanks for the first pass, @annekainicUSDS!

To enable your form, create the following files. For an example of these files, see the [us-forms-system-starter-app repository](https://github.com/usds/us-forms-system-starter-app).

- A [form config file](https://github.com/usds/us-forms-system-starter-app/blob/master/js/config/form.js). For more information, see "Creating a form config file."
- An entry [app.js](https://github.com/usds/us-forms-system-starter-app/blob/master/app.js) file.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@annekainicUSDS - Is this an acceptable description?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think so


### Creating a new application with the US Forms System Starter App
Depending on your needs, you can either create a brand new application from scratch or install the US Forms System in an existing application. For more information about React apps, see the [React project's Hello World tutorial](https://reactjs.org/docs/hello-world.html).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a link to a React tutorial here. Let me know if that feels like overkill.

@bernars-usa
Copy link
Contributor Author

@usds/forms-system - This is ready for a final review. Note that it's not going into master, so we can iterate more later.

@bernars-usa
Copy link
Contributor Author

I've actually returned to this PR to incorporate some of the notes and thoughts in #79. I'll drop a comment when this is ready for review (again).

@bernars-usa
Copy link
Contributor Author

This is ready for review (again). Based on conversation in #79 and #87, this PR now includes:

Navigate through the whole map topic here (💻 Rendered): "Getting started with the US Forms System"

Copy link
Contributor

@annekainicUSDS annekainicUSDS left a comment

Choose a reason for hiding this comment

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

LGTM! A couple of minor comments


Once your repository is set up and dependencies are installed, you can begin building your app by editing `/js/config/form.js`. For more information, see "[Creating a form config file](building-a-form/creating-a-form-config-file.md)."

To run your app locally, in Terminal (Mac and Linux) or the Command Prompt (Windows), type `npm start`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add a line that says, "Once the server has started you should be able to view your form at localhost:8080". It also says this in the server output in the terminal, but it might be useful to include here anyway.


2. Install peer dependencies:
```bash
npm install --save-dev @department-of-veterans-affairs/formation
Copy link
Contributor

Choose a reason for hiding this comment

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

We no longer need formation, so you can remove this line!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering about that one!

To enable your form, create the following files. For an example of these files, see the [us-forms-system-starter-app repository](https://github.com/usds/us-forms-system-starter-app).

- A [form config file](https://github.com/usds/us-forms-system-starter-app/blob/master/js/config/form.js). For more information, see "Creating a form config file."
- An entry [app.js](https://github.com/usds/us-forms-system-starter-app/blob/master/app.js) file.
Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think so


### Node.js and npm

Node.js is a JavaScript runtime environment that allows you to execute complete JavaScript programs. When you install Node.js, it automatically installs a package manager called npm. You need both Node.js and npm to develop using the US Forms System. For more information, including installation instructions, see the [Node.js website](https://nodejs.org).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not totally positive about this, but I think they need at least Node version 8 in order for this to work properly. I don't know if there's a specific version of npm needed in order for this to work, but I'm using 5.6.0 locally, so I might recommend at least having version 5 or great installed? @dmethvin-gov do you know more about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dave says 8 is right, so that's what I documented. 👍

@bernars-usa
Copy link
Contributor Author

Thanks so much for the reviews on this. I'm going to merge it into #90 now. If there's additional feedback, I'll incorporate it in a subsequent PR.

@bernars-usa bernars-usa merged commit 736036e into forms-docs Jul 5, 2018
@bernars-usa bernars-usa deleted the getting-started branch July 5, 2018 18:37
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.

2 participants