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

Front End from Nava next.js template #283

Merged
merged 10 commits into from
Jul 20, 2023

Conversation

SammySteiner
Copy link
Contributor

Summary

Fixes #110

Time to review: 30 minutes

Changes proposed

Added Nava next.js template application to /frontend

Context for reviewers

Please navigate to /frontend and

  • confirm you can install and run the application locally
  • confirm you can run the storybook locally
  • confirm you can run the application on docker
  • confirm you can run the storybook on docker
  • confirm you can run the tests

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@SammySteiner SammySteiner marked this pull request as ready for review July 18, 2023 17:55
Copy link
Collaborator

@lucasmbrown-usds lucasmbrown-usds left a comment

Choose a reason for hiding this comment

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

Overall looks really good! left a couple comments, mostly I think the ADR comment needs to be addressed.

Lots of fun bells and whistles with this one!

@@ -0,0 +1,26 @@
# Use Markdown Architectural Decision Records
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should all these ADRs be moved into our ADR directory and merged with our ADRs in terms of numbering, etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll move those over.

.grype.yml Outdated
# High severity
# Ignoring since this is only a dependency of dev tools: storybook (for storybook docs site),
# eslint (for Linting in CI), and sass (for compiling CSS during CI build phase)
- vulnerability: GHSA-ww39-953v-wcq6
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these vulnerabilities still live?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, I just double checked and it seems like they are no longer in the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, noting that when we add infrastructure via terraform, we'll have a github workflow that incorporates the grype scanning in the ci/cd pipeline.

Copy link
Contributor

Choose a reason for hiding this comment

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

TIL anchore scan is grype


import Header from "src/components/Header";

describe("Header", () => {
Copy link
Collaborator

@lucasmbrown-usds lucasmbrown-usds Jul 19, 2023

Choose a reason for hiding this comment

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

we love to see front-end tests!

expect(header).toBeInTheDocument();
});

it("passes accessibility scan", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

require("@testing-library/jest-dom");
const { toHaveNoViolations } = require("jest-axe");

expect.extend(toHaveNoViolations);
Copy link
Collaborator

Choose a reason for hiding this comment

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

very nice

@SammySteiner SammySteiner assigned acouch and unassigned acouch Jul 19, 2023
@SammySteiner SammySteiner requested a review from acouch July 19, 2023 18:17
Copy link
Collaborator

@lucasmbrown-usds lucasmbrown-usds left a comment

Choose a reason for hiding this comment

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

These changes look great to me, thanks @SammySteiner .

My review shouldn't "count" as a strong approval for you because I'm no longer sharp enough to catch vulnerabilities etc, but it looks good to me!

Copy link
Contributor

@daphnegold daphnegold left a comment

Choose a reason for hiding this comment

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

Amazing! :shipit: 🚀 A couple comments on small things like broken links


- [I18next](https://www.i18next.com/) is used for internationalization.
- Next.js's [internationalized routing](https://nextjs.org/docs/advanced-features/i18n-routing) feature is enabled. Toggling between languages is done by changing the URL's path prefix (e.g. `/about` ➡️ `/es/about`).
- Configuration for the i18n routing and i18next libraries are located in [`next-i18next.config.js`](../app/next-i18next.config.js).
Copy link
Contributor

Choose a reason for hiding this comment

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

This local file link needs to be updated, it is broken

1. Edit `next-i18next.config.js` and add the language to `locales`, using the BCP47 language tag (e.g. `en` or `es`).
1. Add a language folder, using the same BCP47 language tag: `mkdir -p public/locales/<lang>`
1. Add a language file: `touch public/locales/<lang>/common.json` and add the translated content. The JSON structure should be the same across languages. However, non-default languages can omit keys, in which case the default language will be used as a fallback.
1. Optionally, add a label for the language to the `locales` object in [`.storybook/preview.js`](../app/.storybook/preview.js)
Copy link
Contributor

Choose a reason for hiding this comment

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

This file path needs to be updated, broken too

@SammySteiner SammySteiner merged commit fee47d2 into main Jul 20, 2023
@SammySteiner SammySteiner deleted the sammysteiner/issue-110-client-setup branch July 20, 2023 19:17
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.

[Task]: Front-end Repo Setup
4 participants