Skip to content

Commit

Permalink
Merge pull request #211 from cisagov/beta
Browse files Browse the repository at this point in the history
Bring beta into main
  • Loading branch information
h-m-f-t authored Jan 29, 2024
2 parents d71e48e + 81e270a commit 3938d55
Show file tree
Hide file tree
Showing 68 changed files with 7,995 additions and 1,006 deletions.
11 changes: 11 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const yaml = require("js-yaml");
const svgSprite = require("eleventy-plugin-svg-sprite");
const { imageShortcode, imageWithClassShortcode } = require('./config');

// This package allows us to set a .env file in our local environments
const dotenv = require('dotenv');
dotenv.config();

module.exports = function (config) {
// Set pathPrefix for site
let pathPrefix = '/';
Expand Down Expand Up @@ -67,6 +71,13 @@ module.exports = function (config) {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd');
});

// Sitemap will not load the overwritten absoluteUrl filter,
// so we'll define a fresh custom filter that'll use the SITE_URL
// env variable to build the full url.
config.addFilter("customAbsoluteUrl", function(url) {
return process.env.SITE_URL ? process.env.SITE_URL + url : url;
});

// Get the first `n` elements of a collection.
config.addFilter('head', (array, n) => {
if (!Array.isArray(array) || array.length === 0) {
Expand Down
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Bug
description: Report a bug or problem with the application
labels: ["bug"]

body:
- type: markdown
id: help
attributes:
value: |
> **Note**
> GitHub Issues use [GitHub Flavored Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for formatting.
- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: "Please add a concise description of the issue"
placeholder: "Example: The application shows an internal server error when attempting to apply for a new domain"
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: "Please add a concise description of the behavior you would expect if this issue were not occurring"
placeholder: "Example: When submitting a new domain application, the request should be successful, OR if there is a problem with the user's application preventing submission, errors should be enumerated to the user"
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: |
How can the issue be reliably reproduced? Feel free to include screenshots or other supporting artifacts
Example:
1. In the test environment, fill out the application for a new domain
2. Click the button to trigger a save/submit on the final page and complete the application
3. See the error
value: |
1.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: |
Where is this issue occurring? If related to development environment, list the relevant tool versions.
Example:
- Environment: Sandbox
- Browser: Chrome x.y.z
- Python: x.y.z
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Please include additional references (screenshots, design links, documentation, etc.) that are relevant"
- type: textarea
id: issue-links
attributes:
label: Issue Links
description: |
What other issues does this story relate to and how?
Example:
- 🚧 Blocked by: #123
- 🔄 Relates to: #234
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Issue
description: Describe an idea, feature, content, or non-bug finding

body:
- type: markdown
id: title-help
attributes:
value: |
> Titles should be short, descriptive, and compelling. Use sentence case.
- type: textarea
id: issue-description
attributes:
label: Issue description
description: |
Describe the issue so that someone who wasn't present for its discovery can understand why it matters. Use full sentences, plain language, and [good formatting](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax).
validations:
required: true
- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance criteria
description: "If known, share 1-3 statements that would need to be true for this issue to be considered resolved. Use a [task list](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists#creating-task-lists) if appropriate."
placeholder: "- [ ]"
- type: textarea
id: additional-context
attributes:
label: Additional context
description: "Share any other thoughts, like how this might be implemented or fixed. Screenshots and links to documents/discussions are welcome."
- type: textarea
id: links-to-other-issues
attributes:
label: Links to other issues
description: |
"Add issue #numbers this relates to and how (e.g., 🚧 [construction] Blocks, ⛔️ [no_entry] Is blocked by, 🔄 [arrows_counterclockwise] Relates to)."
placeholder: 🔄 Relates to...
- type: markdown
id: note
attributes:
value: |
> We may edit the text in this issue to document our understanding and clarify the product work.
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/story.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Story
description: Capture actionable sprint work
labels: ["story"]

body:
- type: markdown
id: help
attributes:
value: |
> **Note**
> GitHub Issues use [GitHub Flavored Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for formatting.
- type: textarea
id: story
attributes:
label: Story
description: |
Please add the "as a, I want, so that" details that describe the story.
If more than one "as a, I want, so that" describes the story, add multiple.
Example:
As an analyst
I want the ability to approve a domain application
so that a request can be fulfilled and a new .gov domain can be provisioned
value: |
As a
I want
so that
validations:
required: true
- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance Criteria
description: |
Please add the acceptance criteria that best describe the desired outcomes when this work is completed
Example:
- Application sends an email when analysts approve domain requests
- Domain application status is "approved"
Example ("given, when, then" format):
Given that I am an analyst who has finished reviewing a domain application
When I click to approve a domain application
Then the domain provisioning process should be initiated, and the applicant should receive an email update.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Please include additional references (screenshots, design links, documentation, etc.) that are relevant"
- type: textarea
id: issue-links
attributes:
label: Issue Links
description: |
What other issues does this story relate to and how?
Example:
- 🚧 Blocked by: #123
- 🔄 Relates to: #234
139 changes: 133 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,134 @@
## Changes proposed in this pull request:
-
-
-
## Ticket

## security considerations
[Note the any security considerations here, or make note of why there are none]
Resolves #00
<!--Reminder, when a code change is made that is user facing, beyond content updates, then the following are required:
- a developer approves the PR
- a designer approves the PR or checks off all relevant items in this checklist.
All other changes require just a single approving review.-->

## Changes

<!-- What was added, updated, or removed in this PR. -->
- Change 1
- Change 2

<!--
Please add/remove/edit any of the template below to fit the needs
of this specific PR.
--->

## Context for reviewers

<!--Background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. -->

## Setup

<!-- Add any steps or code to run in this section to help others run your code.
Example 1:
```sh
echo "Code goes here"
```
Example 2: If the PR was to add a new link with a redirect, this section could simply be:
-go to /path/to/start/page
-click the blue link in the <insert location>
-notice user is redirected to <proper end location>
-->

## Code Review Verification Steps

### As the original developer, I have

#### Satisfied acceptance criteria and met development standards

- [ ] Met the acceptance criteria, or will meet them in a subsequent PR
- [ ] Created/modified automated tests
- [ ] Added at least 2 developers as PR reviewers (only 1 will need to approve)
- [ ] Messaged on Slack or in standup to notify the team that a PR is ready for review
- [ ] Changes to “how we do things” are documented in READMEs and or onboarding guide
- [ ] If any model was updated to modify/add/delete columns, makemigrations was ran and the assoicated migrations file has been commited.

#### Ensured code standards are met (Original Developer)

- [ ] All new functions and methods are commented using plain language
- [ ] Did dependency updates in Pipfile also get changed in requirements.txt?
- [ ] Interactions with external systems are wrapped in try/except
- [ ] Error handling exists for unusual or missing values

#### Validated user-facing changes (if applicable)

- [ ] New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
- [ ] Checked keyboard navigability
- [ ] Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
- [ ] Add at least 1 designer as PR reviewer

### As a code reviewer, I have

#### Reviewed, tested, and left feedback about the changes

- [ ] Pulled this branch locally and tested it
- [ ] Reviewed this code and left comments
- [ ] Checked that all code is adequately covered by tests
- [ ] Made it clear which comments need to be addressed before this work is merged
- [ ] If any model was updated to modify/add/delete columns, makemigrations was ran and the assoicated migrations file has been commited.

#### Ensured code standards are met (Code reviewer)

- [ ] All new functions and methods are commented using plain language
- [ ] Interactions with external systems are wrapped in try/except
- [ ] Error handling exists for unusual or missing values
- [ ] (Rarely needed) Did dependency updates in Pipfile also get changed in requirements.txt?

#### Validated user-facing changes as a developer

- [ ] New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
- [ ] Checked keyboard navigability
- [ ] Meets all designs and user flows provided by design/product
- [ ] Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

- [ ] Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)
- [ ] Chrome
- [ ] Microsoft Edge
- [ ] FireFox
- [ ] Safari

- [ ] (Rarely needed) Tested as both an analyst and applicant user

**Note:** Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

### As a designer reviewer, I have

#### Verified that the changes match the design intention

- [ ] Checked that the design translated visually
- [ ] Checked behavior
- [ ] Checked different states (empty, one, some, error)
- [ ] Checked for landmarks, page heading structure, and links
- [ ] Tried to break the intended flow

#### Validated user-facing changes as a designer

- [ ] Checked keyboard navigability
- [ ] Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

- [ ] Tested with multiple browsers (check off which ones were used)
- [ ] Chrome
- [ ] Microsoft Edge
- [ ] FireFox
- [ ] Safari

- [ ] (Rarely needed) Tested as both an analyst and applicant user

## Screenshots

<!-- If this PR makes visible interface changes, an image of the finished interface can help reviewers
and casual observers understand the context of the changes.
A before image is optional and can be included at the submitter's discretion.
Consider using an animated image to show an entire workflow.
You may want to use [GIPHY Capture](https://giphy.com/apps/giphycapture) for this! 📸
_Please frame images to show useful context but also highlight the affected regions._
--->
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ CSS and SASS can be added or imported into the `styles/styles.scss`. You can als

Javascript can be added to the admin UI or site UI by adding or importing code into the `js/admin.js` or `js/app.js` files respectively. This template uses [esbuild](https://esbuild.github.io/) to bundle your javascript and fingerprint the files in the site build.

### Managing environment variables

Environment variables are set and managed on [pages.cloud.gov](https://pages.cloud.gov/)

## Contributing

See [CONTRIBUTING](CONTRIBUTING.md) for additional information.
Expand Down
8 changes: 4 additions & 4 deletions _data/assetPaths.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"admin.js": "/assets/js/admin-44W43542.js",
"admin.map": "/assets/js/admin-44W43542.js.map",
"admin.js": "/assets/js/admin-77FHK54G.js",
"admin.map": "/assets/js/admin-77FHK54G.js.map",
"app.js": "/assets/js/app-XWR645AF.js",
"app.map": "/assets/js/app-XWR645AF.js.map",
"uswds.js": "/assets/js/uswds-init.js",
"styles.css": "/assets/styles/styles-EGZPWJZ2.css",
"styles.map": "/assets/styles/styles-EGZPWJZ2.css.map"
"styles.css": "/assets/styles/styles-XNWETRGL.css",
"styles.map": "/assets/styles/styles-XNWETRGL.css.map"
}
Loading

0 comments on commit 3938d55

Please sign in to comment.