Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Karina/wmdp 184 enfore required (#92)
* add ts check to all js files * add dev note regarding incremental type checking * add TS-specific eslint * update read me with development typecheck and linting tips * update read me with development typecheck and linting tips * add and setup prettier * WMDP-26 Set Up PR Template (#2) Changes added a .github folder which should store all github related processes (e.g. github actions, and templates) added PR template Context for reviewers We want to establish a consistent pull request template that we’ll use. * Update app/.babelrc Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/package.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * add eslintrc.js * add stories dir and examples * .eslint.js: prettier updates to eslint file * add storybook dependencies * Fix pull request template conflict (#8) - Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md` - Updated the pull request template to be slightly more generic * Karina/wmdp 61 initial nextjs setup (#4) * yarn create next-app --typescript * clean up auto-generated pages, public and styles * next.config.js: setup i18n locale for internationalization * next.config.js: add code comment re: internationalization * add html tags for VO * Update app/styles/Home.module.css update stickcy nav Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * tsconfig: target es6 Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * add testRegex and testPathIgnorePatterns * setup jest-axe * add new lines add end of files * Karina/wmdp 35 setup test suite (#5) * yarn create next-app --typescript * clean up auto-generated pages, public and styles * next.config.js: setup i18n locale for internationalization * next.config.js: add code comment re: internationalization * add html tags for VO * Update app/styles/Home.module.css update stickcy nav Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * tsconfig: target es6 * add babelec * add __mocks__ with mock styles for testing * -test: add first jest test and snapshot test for Home page - add jest.setup.js to require jest-dom * - add jest.config.js - package.json: add react testing library, babel and jest dependencies - add first test - update jsx - yarn.lock updated with new packages * Update app/.babelrc Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/package.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * add testRegex and testPathIgnorePatterns * setup jest-axe * add new lines add end of files * jest.config.js: add inline comments * README: add tsconfig documentation * README: add test script documentation Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Karina/wmdp 33 linter typechecker (#6) * yarn create next-app --typescript * clean up auto-generated pages, public and styles * next.config.js: setup i18n locale for internationalization * next.config.js: add code comment re: internationalization * add html tags for VO * Update app/styles/Home.module.css update stickcy nav Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * tsconfig: target es6 * add babelec * add __mocks__ with mock styles for testing * -test: add first jest test and snapshot test for Home page - add jest.setup.js to require jest-dom * - add jest.config.js - package.json: add react testing library, babel and jest dependencies - add first test - update jsx - yarn.lock updated with new packages * .eslintrc.json: extend nava eslint config * package.json: add eslint-config-nava * add ts check to all js files * add dev note regarding incremental type checking * add TS-specific eslint * update read me with development typecheck and linting tips * update read me with development typecheck and linting tips * add and setup prettier * Update app/.babelrc Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/package.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update package.json add scripts to package.json * run prettier * add checkJs to tsconfig, remove duplicate code from js files * add typescript parser and implement type information with linting * eslintrc: add prettier recommended plugin * preettierrc: add trailing comma check, remove redundant code * README: add auto-generated modified note * Update app/README.md Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * add testRegex and testPathIgnorePatterns * re-add localesubpaths to next.config.js * tsconfig.json: remove inline comment * README: add docimentation for eslint and tsconfig * setup jest-axe * add new lines add end of files * jest.config.js: add inline comments * README - add documentation for test * README: add tsconfig documentation * README: add test script documentation * README: add documentation for dependencies * yarn.lock * Update app/__mocks__/styleMock.js Co-authored-by: Rocket <rocketnova@users.noreply.github.com> Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * fix eslint errors * WIP * Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9) Create a separate tsconfig file to specify jsx mode. Next.js requires the typescript jsx mode to be `preserve`, but ts-jest needs it to be a flavor of `react`. See: - https://www.typescriptlang.org/docs/handbook/jsx.html - https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig - kulshekhar/ts-jest#63 (comment) - vercel/next.js#19155 (reply in thread) * add home page story and uswds dependency * update dependencies * add uswds * support sass in storybook * fix eslint errors (#10) * fix eslint errors * update prettier and linting rules so that they're compatible * add new eslint rule to README * WIP - debugging uswds storybook with Rocket * add storybook static to git ignore * Remove storybook-static. * Dockerize the application. * Create LICENSE.md using Apache 2.0 (#13) * Dockerize the application (#12) * WIP. * Both next.js and storybook working. * USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue. * Clean up unnecessary WIP stuff. * Refactor to use same naming convention for all uswds assets. Add comments. * Update dockerization to better support local development. * Remove extraneous yarn command. * Run formatter. * Write some brief documentation. * Fix typo. * setup CI for NextJS template app (#16) * Let prettier format project files. * Run prettier via yarn format. * Let prettier format project files (#17) * yarn: add next.intl * add messages directory with english and spanish json messages pages * .storybook/preview: set up next-intl with storybook * next.config: update next local config for itnernationalization * app.tsx: add next-intl local/messages provider for internationalization * tests: add nextintlprovider to jest tests, update snapshots * update gulp * create src directories -- move src folders * add tests and stories for Layout and Index * add scss loading for storybook * run linter and prettier * run prettier * run prettier and lint * update yarn.lock * add prettier alphabetize imports -- add storybook-static to prettier ignore * show compile warnigns * remove space * add container background * WIP: successfully leveraging built-in nextjs sass compiling. * Working storybook + nextjs + sass + uswds build. - Drops support for [CSS modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) - Drops requirement for Gulp and USWDS compile - Requires postcss and postcss-loader, which storybook says should be deprecated * wip * delete deprecated flies, add yarn.lock * add welcome and eligibility page * update ci.yml (#19) * Run prettier. * Update packages. * Simplify docker. Update README. Use postinstalll script. * Fix postinstall command. * Tell prettier to ignore USWDS static assets. * Disable nextjs telemetry. * refactor * jest * test wip * Add -p flag to creating public dir so mkdir doesn't error. * Change comment style so we don't get unnecessary indents. * Refactor which files storybook recognizes as stories. * Use storybook lazy compilation. * Remove no longer needed gulpfile. * Unpin package versions; use at least instead. * Remove no longer needed css import. * add stories * run prettier, no trailing comma * correct linting errors * Remove storybook lazy compilation. Not working. * Remove non-essential storybook dependencies. * Don't bind mount node_modules. * delete depracated code * host fonts locally for easier sb and jest setup and wider browser support * support tsconfig module imports in jest and sb * Switch base image to alpine. * Run yarn format. * Update README about node_modules in docker. * setup next-i18next in project, jest, and sb -- todo: get sb globe to render * Run formatter. * Streamline docker build even more. * Remove no longer installed storybook addons. * Remove storybook-addon-i18next. * Run formatter. * Try storybook-i18n addon. Not quite right. * Match eslint rule for space before parens to rule as described in README. * Match prettier and eslint for trailing commas. * Use the storybook-react-i18next addon for internationalization in storybook. * Remove wip test of fs package. * Restore homepage to previous state. * Document i18n config. * add storybook-static to git ignore * add import order to prettier * add src/ - move pages to src * app- update import * public: update translations * _app.tsx: add Layout to app * add components dir and Layout component * index: update deprecated index layout * update template styles * update index story * apply title class to template title * update tests and stories * run prettier - add prettier-plugin-sort-imports * run eslint - add JSX global to linter * fix translation * yarn format and delete dead code * run lint * Copy over application-template-nextjs at ca2cc15. Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15) - Install and configure storybook - Create the first story - Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system - Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook - Gitignore storybook, uswds assets, and compiled css - Prettier ignore uswds assets - Use postinstall hook to copy uswds static assets - Stop using CSS modules - Update some package dependencies - Switch Docker base image to use alpine for increased speed * Copy over application-template-nextjs at cd06ba6. Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24) - Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization - Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js` - Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n - Move jest i18n config into `/tests/jest-i18n.ts` - Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization - Add support for `<em>` tags in react-i18next in both next.js and storybook. Extras: - Remove `space-before-function-paren` eslint rule - Update eslint to follow prettier's rules - Rename `test` dir to `tests` (plural) * Copy over application-template-nextjs at cfe7c3d. Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26) - adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure) - moves `api/`, `pages/` and `messages/` directories to `src/` - creates `components` directory and adds template `Layout` component Extras: - sets up prettier alphabetize imports - adds storybook-static to prettier ignore - sets $theme-show-compile-warnings to true for uswds * Copy over application-template-nextjs at 0a349fa. Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29) - Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates) - Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning) Note: These features were already enabled in this repo, so this commit is just bringing in stylistic updates to make the two repos identical. * en/common.json: add contact questions * add contact page * remove dead code * contact: add contact page basic styling and copy * create TextInput component -- add tests and storybook for contact page and textinput component * Copy over application-template-nextjs at f59d2ac. Add layout styles missing from PR #26. [#37](navapbc/template-application-nextjs#37) * fix tests * update tests * wip * fix tests * run lint and format * address rocket's comments * update yarn.lock * update eslint.json * update eslintrc * update textinput types for build * run prettier * add number-format * fix bug * en: update copy for header and index page * Layout: update header to match new design * remove depracated font imports * pages: add clinic page, update contact page to route to clinic page * add clinic.json to public directory * add search.svg: magnifying glass for uswds search button * tsconfig: add public module import * update keys * wip * public: add clinic page copy * ButtonLink: add disabled prop * pages: handle clinic selection and disable button if clinic isn't selected * unselect if research is reset * add income page * add jest tests * add stories * update income table styling * Update app/jest.config.js Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/package.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/public/locales/en/common.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/public/locales/en/common.json Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * Update app/src/components/Dropdown.tsx Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * update tests * add accordion storybook test * add jest tests for conditional alternate page routing from eligibility page * add alternate jest test * update styles * add review page * run prettier and lint * update tests * Update app/src/pages/clinic.tsx Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov> * Update app/src/pages/clinic.tsx Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov> * add numberOfClinicsToReturn * add numberOfClinicsToReturn * add Table component and summary page * wip * wip * wip * wip * wip * add localStorage hook to persist data across refresh - add conditional continue button to contact page * eligibility: add conditional review routing * wip * clinic: address type bug * add Alert story * add summary and review story * dangerouslyset inner html of alert * update tests * prepoluate selected clinic from review page * Eligibility: add 'have you had WIC before' question and radio * Overview tables: add before qiestion and answers to review and summary * fix broken eligibility test * address type issue * format * add minimum phone length * remove dead code * remove dead code * contact: remove dead width code * Karina/wmdp 182 restrict user flow (#101) * remove dead code * contact: getServersideProps- WIP rerouting * contact, clinic, income and review: restrict user access to these pages based off of previousRoute * contact, clinic, income and review: restrict user access to these pages based off of previousRoute * remove dead code * address getserversideprops type error * yarn format * update snaps * Update app/src/pages/clinic.tsx Co-authored-by: Rocket <rocketnova@users.noreply.github.com> * yarn format Co-authored-by: Rocket <rocketnova@users.noreply.github.com> Co-authored-by: Alsia Plybeah <alsia@navapbc.com> Co-authored-by: Rocket <rocketnova@users.noreply.github.com> Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com> Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
- Loading branch information