diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f48ac1355..7846e4a4d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ orbs: executors: standard-node: docker: - - image: "cimg/node:14.17.6" + - image: "cimg/node:18.14.2" - image: "circleci/redis:6.2.1-alpine" - image: "circleci/postgres:12.3-postgis" environment: @@ -15,7 +15,7 @@ executors: POSTGRES_DB: bloom cypress-node: docker: - - image: "cypress/base:14.17.0" + - image: "cypress/base:18.14.1" - image: "circleci/redis:6.2.1-alpine" - image: "circleci/postgres:12.3-postgis" environment: @@ -35,9 +35,6 @@ executors: REDIS_URL: "redis://localhost:6379/0" REDIS_USE_TLS: "0" PARTNERS_PORTAL_URL: "http://localhost:3001" - puppeteer-node: - docker: - - image: "cimg/node:14.17.6-browsers" jobs: setup: diff --git a/.dockerignore b/.dockerignore index 36d76cf4cd..a7c62d42d6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -27,6 +27,4 @@ **/values.dev.yaml backend/core/dist backend/core/test -detroit-ui-components/__tests__ -detroit-ui-components/storybook-static README.md \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index d191fcc4ea..54df1d3b92 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -45,7 +45,6 @@ module.exports = { }, ignorePatterns: [ "node_modules", - "storybook-static", ".next", "dist", "migration/", diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fe1ff5ee72..d1e497a597 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies diff --git a/.github/workflows/pre-release_components.yml b/.github/workflows/pre-release_components.yml index 63ea2bc840..3fdde4f3f8 100644 --- a/.github/workflows/pre-release_components.yml +++ b/.github/workflows/pre-release_components.yml @@ -3,7 +3,7 @@ name: Pre-release ui-components on: # Triggers the workflow on push only for the dev branch push: - branches: [ dev ] + branches: [dev] jobs: build: @@ -21,18 +21,18 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.ADMIN_TOKEN }} - + - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 14 - registry-url: 'https://registry.npmjs.org' + node-version: 18 + registry-url: "https://registry.npmjs.org" - name: Version ui-components run: yarn version:prerelease:ui-components env: GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }} - + - name: Publish ui-components run: yarn publish:ui-components env: diff --git a/.gitignore b/.gitignore index ffcbdc3d13..ba3dcda84a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,6 @@ yarn-error.log* .next/ **/out/_next* -# Storybook build output -storybook-static - # Cypress test output videos **/cypress/videos **/cypress/screenshots diff --git a/.node-version b/.node-version index 5595ae1aa9..72e4a483c0 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14.17.6 +18.14.2 diff --git a/.prettierignore b/.prettierignore index 6641aa098f..01cee720ef 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,6 @@ **/*.hbs .github .travis.yml -detroit-ui-components/CHANGELOG.md sites/public/CHANGELOG.md sites/public/src/md_content/* sites/partners/CHANGELOG.md diff --git a/.travis.yml b/.travis.yml index 0bf423f94c..232129dbde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,11 @@ language: node_js node_js: - - 14 -cache: - yarn: true + - 18 services: - redis-server before_install: - sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf - - sudo systemctl restart postgresql@11-main + - sudo systemctl restart postgresql@12-main - sleep 1 before_script: - cp sites/public/.env.template sites/public/.env @@ -51,12 +49,13 @@ jobs: - yarn start -p 3000 & - yarn wait-on "http-get://localhost:3000" && yarn cypress run - kill $(jobs -p) || true +dist: focal addons: - postgresql: "11" + postgresql: "12" apt: packages: - - postgresql-11 - - postgresql-client-11 + - postgresql-12 + - postgresql-client-12 - libgconf-2-4 env: global: PGPORT=5433 @@ -64,4 +63,4 @@ env: TEST_DATABASE_URL=postgres://localhost:5433/bloom_test REDIS_TLS_URL=redis://127.0.0.1:6379/0 NEW_RELIC_ENABLED=false - NEW_RELIC_LOG_ENABLED=false \ No newline at end of file + NEW_RELIC_LOG_ENABLED=false diff --git a/Dockerfile.sites-partners b/Dockerfile.sites-partners index b0cb303c53..b08ea65157 100644 --- a/Dockerfile.sites-partners +++ b/Dockerfile.sites-partners @@ -42,7 +42,6 @@ WORKDIR /usr/src/app/ # to ensure that breaking changes in local dependencies from those packages are included # instead of being pulled from npm. COPY backend/core ./backend/core -COPY detroit-ui-components ./detroit-ui-components COPY --from=development /usr/src/app/package.json ./ COPY --from=development /usr/src/app/yarn*.lock ./ diff --git a/Dockerfile.sites-public b/Dockerfile.sites-public index 3cff93b66a..92296b8bb6 100644 --- a/Dockerfile.sites-public +++ b/Dockerfile.sites-public @@ -40,7 +40,6 @@ WORKDIR /usr/src/app/ # to ensure that breaking changes in local dependencies from those packages are included # instead of being pulled from npm. COPY backend/core ./backend/core -COPY detroit-ui-components ./detroit-ui-components COPY --from=development /usr/src/app/package.json ./package.json COPY --from=development /usr/src/app/yarn*.lock ./ diff --git a/Dockerfile.ui-components b/Dockerfile.ui-components deleted file mode 100644 index 5857e6df70..0000000000 --- a/Dockerfile.ui-components +++ /dev/null @@ -1,28 +0,0 @@ -# Here we're using a non alpine image because it includes python -FROM node:14.17 AS build - -WORKDIR /usr/src/app/ - -# default port is 40953 -ENV PORT=40953 - -COPY . . - -WORKDIR /usr/src/app/detroit-ui-components - -COPY detroit-ui-components/yarn*.lock detroit-ui-components/package.json ./ - -RUN yarn install - -COPY ./detroit-ui-components . - -RUN yarn build-storybook - -EXPOSE ${PORT} - -WORKDIR /usr/src/app/detroit-ui-components/storybook-static - -# Can't use the ["", ""] syntax here because it doesn't interpolate variables. -# This is the "shell" form of CMD -# We're serving the static assets with python because start-storybook takes a long time -CMD python -m SimpleHTTPServer ${PORT} diff --git a/README.md b/README.md index 534f2235c9..45751de88a 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,6 @@ In some cases the sites diverge slightly to accomodate jurisdictional customizat - `shared-helpers` contains types and functions intended for shared use between the public and partners sites. - Visit [shared-helpers/README](https://github.com/bloom-housing/bloom/blob/dev/shared-helpers/README.md) for more details. ---- - -- `detroit-ui-components` contains our internal component library based on our internal design system. It is comprised of React components that we consume internally and also build to be configurable for outside consumers. We use [Storybook](https://storybook.js.org/), an environment that renders each of our components to provide documentation and display iterations. -- Visit [ui-components/README](https://github.com/bloom-housing/bloom/blob/dev/ui-components/README.md) for more details and view our [published Storybook](https://storybook.bloom.exygy.dev/). - ## Getting Started for Developers If this is your first time working with Bloom, please be sure to check out the `sites/public`, `sites/partners` and `backend/core` README files for important configuration information specific to those pieces. diff --git a/backend/core/package.json b/backend/core/package.json index dc29b29d5e..2a09a89d4c 100644 --- a/backend/core/package.json +++ b/backend/core/package.json @@ -46,7 +46,7 @@ "dependencies": { "@anchan828/nest-sendgrid": "^0.3.25", "@google-cloud/translate": "^6.2.6", - "@nestjs/bull": "^0.4.2", + "@nestjs/bull": "^0.6.3", "@types/mapbox": "^1.6.42", "bull": "^4.1.0", "@nestjs/cli": "^8.2.1", @@ -107,8 +107,8 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@babel/core": "^7.11.6", - "@babel/plugin-proposal-decorators": "^7.10.5", + "@babel/core": "^7.21.3", + "@babel/plugin-proposal-decorators": "^7.21.0", "@nestjs/schematics": "^8.0.7", "@nestjs/testing": "^8.3.1", "@types/axios": "^0.14.0", @@ -145,7 +145,7 @@ "testEnvironment": "node" }, "engines": { - "node": "14", + "node": "18", "yarn": "^1.22" } } diff --git a/backend/core/test/activity-logs/activity-log.e2e-spec.ts b/backend/core/test/activity-logs/activity-log.e2e-spec.ts index f0f802ada5..1c1eec86d9 100644 --- a/backend/core/test/activity-logs/activity-log.e2e-spec.ts +++ b/backend/core/test/activity-logs/activity-log.e2e-spec.ts @@ -26,7 +26,7 @@ import { Listing } from "../../src/listings/entities/listing.entity" declare const expect: jest.Expect jest.setTimeout(30000) -describe.skip("Programs", () => { +describe.skip("Activity", () => { let app: INestApplication let adminId: string let adminAccessToken: string diff --git a/detroit-ui-components/.env.template b/detroit-ui-components/.env.template deleted file mode 100644 index 2cad7eca35..0000000000 --- a/detroit-ui-components/.env.template +++ /dev/null @@ -1,2 +0,0 @@ -MAPBOX_TOKEN= -IDLE_TIMEOUT=5 \ No newline at end of file diff --git a/detroit-ui-components/.npmignore b/detroit-ui-components/.npmignore deleted file mode 100644 index f63b5d74a9..0000000000 --- a/detroit-ui-components/.npmignore +++ /dev/null @@ -1,99 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Next.js cache and compiled artifacts -.next/** - -# Storybook and storybook build output -.storybook/** -storybook-static - -# Storyshots and other tests -__tests__/** -*.stories.tsx -*.storyshot -# Temporary test images -- TODO: refactor -public/images/banner.png -public/images/listing.jpg - -# Cypress test output videos -apps/**/cypress/videos -apps/**/cypress/screenshots - -# Environment vars for dev/test -.env -.env.template - -# Complied Typescript -dist -sites/public/.next - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/** -sites/public/node_modules/** -detroit-ui-components/node_modules/** -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# dotenv environment variables file -.env - -# Mac files -.DS_Store - -# Yarn -yarn-error.log -.pnp/ -.pnp.js -# Yarn Integrity file -.yarn-integrity -.yarn/** - -# IDE configs -.idea -.vscode diff --git a/detroit-ui-components/.storybook/constants.ts b/detroit-ui-components/.storybook/constants.ts deleted file mode 100644 index 7045e4e922..0000000000 --- a/detroit-ui-components/.storybook/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum BADGES { - GEN2 = "gen2", -} diff --git a/detroit-ui-components/.storybook/main.js b/detroit-ui-components/.storybook/main.js deleted file mode 100644 index f9d922efb8..0000000000 --- a/detroit-ui-components/.storybook/main.js +++ /dev/null @@ -1,71 +0,0 @@ -const path = require("path") -const { resolve } = require("path") -const bloomTheme = require("../tailwind.config.js") -const tailwindVars = require("../tailwind.tosass.js")(bloomTheme) -const { NormalModuleReplacementPlugin } = require("webpack") - -module.exports = { - stories: ["../src/**/*.stories.@(tsx|mdx)"], - addons: [ - "@storybook/addon-actions", - "@storybook/addon-docs", - "@storybook/addon-a11y", - "@storybook/addon-viewport", - "@storybook/addon-knobs", - "@geometricpanda/storybook-addon-badges", - ], - typescript: { - check: false, - checkOptions: {}, - reactDocgen: "react-docgen-typescript", - reactDocgenTypescriptOptions: { - shouldExtractLiteralValuesFromEnum: true, - propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true), - }, - }, - // In trouble? try https://storybook.js.org/docs/configurations/custom-webpack-config/#debug-the-default-webpack-config - webpackFinal: async (config, { configType }) => { - // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION' - // You can change the configuration based on that. - // 'PRODUCTION' is used when building the static version of storybook. - - // Make whatever fine-grained changes you need - config.module.rules.push({ - test: /\.scss$/, - use: [ - "style-loader", - "css-loader", - { - loader: "postcss-loader", - options: { - postcssOptions: { - ident: "postcss", - plugins: [require("tailwindcss"), require("autoprefixer")], - }, - }, - }, - { - loader: "sass-loader", - options: { - additionalData: tailwindVars, - }, - }, - ], - }) - - config.module.rules.push({ - test: /\.(ts|tsx)$/, - use: [ - { - loader: "ts-loader", - options: { - transpileOnly: true, - }, - }, - ], - }) - - config.resolve.extensions.push(".ts", ".tsx") - return config - }, -} diff --git a/detroit-ui-components/.storybook/next-link.js b/detroit-ui-components/.storybook/next-link.js deleted file mode 100644 index 7ed506426f..0000000000 --- a/detroit-ui-components/.storybook/next-link.js +++ /dev/null @@ -1,10 +0,0 @@ -const { createElement } = require("react") -const { action } = require("@storybook/addon-actions") - -// Used to produce actions in Storybook when NextJS links are clicked -function onClick(event) { - event.preventDefault() - action("onClickLink")(event.target.href) -} - -module.exports = ({ children, href }) => createElement("a", { ...children.props, href, onClick }) diff --git a/detroit-ui-components/.storybook/preview-body.html b/detroit-ui-components/.storybook/preview-body.html deleted file mode 100644 index aee48afd8b..0000000000 --- a/detroit-ui-components/.storybook/preview-body.html +++ /dev/null @@ -1,3 +0,0 @@ -
Try out different styles with the Knobs below.
- > - ) -} - -export const withFontAwesomeIcon = () => { - const iconSelect = select("Icon", ["coffee", "rotate", "table"], "rotate") - - const iconsMap = { - coffee: faCoffee, - rotate: faArrowsRotate, - table: faTable, - } - - return ( - <> - - -Try out different icons with the Knobs below.
- > - ) -} - -export const small = () => ( - -) - -export const big = () => ( - -) - -export const SmallAndPrimary = () => ( - -) - -export const NormalCase = () => ( - -) - -export const NormalCaseAndSuccess = () => ( - -) - -export const borderless = () => ( - -) - -export const unstyled = () => ( - -) - -export const inlineIcon = () => ( - <> - -Customized using the following variable overrides:
- -- {cssVarsOverride.replace(".button-overrides ", ":root ").replace(".button-overrides ", "")} -- > - ) -} - -export const loading = () => ( - -) - -// TODO: replace with tailwind markup, if it matters -export const inaccessible = () => ( - -) - -// Example of how you can override axe a11y checks -inaccessible.parameters = { - a11y: { - config: { - rules: [ - { - id: "color-contrast", - enabled: false, - }, - ], - }, - }, -} diff --git a/detroit-ui-components/src/actions/Button.tsx b/detroit-ui-components/src/actions/Button.tsx deleted file mode 100644 index 48c692ac48..0000000000 --- a/detroit-ui-components/src/actions/Button.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import * as React from "react" -import "./Button.scss" -import { AppearanceProps, classNamesForAppearanceTypes } from "../global/AppearanceTypes" -import { Icon, IconSize, UniversalIconType } from "../icons/Icon" - -export interface ButtonProps extends AppearanceProps { - id?: string - type?: "button" | "submit" | "reset" - children: React.ReactNode - onClick?: (e: React.MouseEvent) => void - icon?: UniversalIconType - iconPlacement?: "left" | "right" - iconSize?: IconSize - iconColor?: string - // TODO: inlineIcon is deprecated - inlineIcon?: "left" | "right" - inline?: boolean - unstyled?: boolean - fullWidth?: boolean - className?: string - disabled?: boolean - loading?: boolean - ariaLabel?: string - dataTestId?: string - "data-test-id"?: string - iconClass?: string - passToIconClass?: string -} - -export const buttonClassesForProps = (props: Omit
{subheader}
- )} -- -
- ))} -{props.note}
- } - - return ( -{props.subNote}
} - {props.errorMessage && ( -{item.description}
-{groupNote}
} - -{groupSubNote}
} - {error && errorMessage && ( -More content here.
- -{props.subheading}
- - ) -} - -export { HeadingGroup as default, HeadingGroup } diff --git a/detroit-ui-components/src/headers/Hero.scss b/detroit-ui-components/src/headers/Hero.scss deleted file mode 100644 index 9fc6adeff3..0000000000 --- a/detroit-ui-components/src/headers/Hero.scss +++ /dev/null @@ -1,63 +0,0 @@ -.hero { - @apply bg-primary-darker; - @apply py-10; - @apply px-5; - @apply text-white; - @apply text-center; - @apply bg-cover; - - @screen md { - @apply py-20; - } - - &.centered { - background-position: center center; - } -} - -.hero__button, -.with_secondary a { - width: 100%; -} - -.hero__buttons { - @apply grid; - @apply md:grid-cols-4; - @apply gap-5; - @apply max-w-screen-md; - @apply m-auto; -} -.hero__title { - @apply text-4xl; - @apply mb-5; - @apply mx-auto; - letter-spacing: -0.04em; - max-width: 41rem; - - @screen md { - @apply text-6xl; - @apply mb-8; - } - - em { - @apply not-italic; - @apply underline; - -webkit-text-decoration-color: $tailwind-warn; - -moz-text-decoration-color: $tailwind-warn; - text-decoration-color: $tailwind-warn; - } -} - -.hero__subtitle { - @apply font-sans; - @apply text-base; - @apply text-gray-100; - @apply mb-8; - @apply mx-auto; - max-width: 41rem; - text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5); - - @screen md { - @apply text-lg; - } -} diff --git a/detroit-ui-components/src/headers/Hero.stories.tsx b/detroit-ui-components/src/headers/Hero.stories.tsx deleted file mode 100644 index b901892a56..0000000000 --- a/detroit-ui-components/src/headers/Hero.stories.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import * as React from "react" - -import { Hero } from "./Hero" - -export default { - title: "Headers/Hero", -} - -export const withListings = () => ( -Customized using the following variable overrides:
- -{cssVarsOverride.replace(".page-header-overrides ", "")}- > - ) -} diff --git a/detroit-ui-components/src/headers/PageHeader.tsx b/detroit-ui-components/src/headers/PageHeader.tsx deleted file mode 100644 index 5fe3174f5e..0000000000 --- a/detroit-ui-components/src/headers/PageHeader.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import * as React from "react" -import "./PageHeader.scss" - -export interface PageHeaderProps { - className?: string - inverse?: boolean - title?: React.ReactNode - subtitle?: string - children?: React.ReactNode - tabNav?: React.ReactNode -} - -const PageHeader = (props: PageHeaderProps) => { - const classNames = ["page-header", "md:pt-16"] - if (props.className) { - classNames.push(...props.className.split(" ")) - } - - if (props.inverse) { - classNames.push("bg-primary-dark") - classNames.push("text-white") - } else { - classNames.push("bg-primary-lighter") - } - - return ( -
{props.subtitle}
} - {props.children} - - {props.tabNav ? props.tabNav : null} - -{props.copyright}
- {props.children && } -{props.children}
: props.children} - -Test
-Test
-{props.children}
: props.children} -{t("listings.sections.additionalFees")}
-{contentProps?.contentSubheader?.text}
- > - ) - } - const getContent = () => { - return ( - <> -- {contentProps?.tableSubheader?.text} -
- {cardTags && cardTags?.length > 0 && ( -{props.subtitle}
} -{t("nav.signInMFA.addNumberSecondaryTitle")}
++ {mfaType === RequestType.sms + ? t("nav.signInMFA.haveSentCodeToPhone") + : t("nav.signInMFA.haveSentCodeToEmail")} +
++ {t("nav.signInMFA.verificationChoiceSecondaryTitle")} +
+{data.rule}
- > - } - /> - -
{listing.name}
diff --git a/sites/partners/src/pages/listings/add.tsx b/sites/partners/src/pages/listings/add.tsx
index 9811d47f95..6c04f189d9 100644
--- a/sites/partners/src/pages/listings/add.tsx
+++ b/sites/partners/src/pages/listings/add.tsx
@@ -1,9 +1,8 @@
import React, { useContext, useEffect } from "react"
import Head from "next/head"
import { useRouter } from "next/router"
-import { SiteAlert, t } from "@bloom-housing/ui-components"
+import { PageHeader, SiteAlert, t } from "@bloom-housing/ui-components"
import { AuthContext } from "@bloom-housing/shared-helpers"
-import { PageHeader } from "../../../../../detroit-ui-components/src/headers/PageHeader"
import Layout from "../../layouts"
import PaperListingForm from "../../components/listings/PaperListingForm"
import { MetaTags } from "../../components/shared/MetaTags"
diff --git a/sites/partners/src/pages/reset-password.tsx b/sites/partners/src/pages/reset-password.tsx
index 401bdce0e7..9b53dc4a1a 100644
--- a/sites/partners/src/pages/reset-password.tsx
+++ b/sites/partners/src/pages/reset-password.tsx
@@ -3,17 +3,17 @@ import { useRouter } from "next/router"
import { useForm } from "react-hook-form"
import {
AppearanceStyleType,
+ Button,
Field,
Form,
t,
SiteAlert,
setSiteAlertMessage,
+ FormCard,
+ Icon,
+ AlertBox,
} from "@bloom-housing/ui-components"
import { AuthContext } from "@bloom-housing/shared-helpers"
-import { Button } from "../../../../detroit-ui-components/src/actions/Button"
-import { FormCard } from "../../../../detroit-ui-components/src/blocks/FormCard"
-import { Icon } from "../../../../detroit-ui-components/src/icons/Icon"
-import { AlertBox } from "../../../../detroit-ui-components/src/notifications/AlertBox"
import FormsLayout from "../layouts/forms"
const ResetPassword = () => {
diff --git a/sites/partners/src/pages/sign-in.tsx b/sites/partners/src/pages/sign-in.tsx
index c3d02399dd..f1a3770605 100644
--- a/sites/partners/src/pages/sign-in.tsx
+++ b/sites/partners/src/pages/sign-in.tsx
@@ -13,9 +13,6 @@ import {
t,
ResendConfirmationModal,
RequestType,
- FormSignInMFACode,
- FormSignInAddPhone,
- FormSignInMFAType,
} from "@bloom-housing/ui-components"
import FormsLayout from "../layouts/forms"
import {
@@ -29,6 +26,9 @@ import {
onSubmitMfaCodeWithPhone,
onSubmitMfaCode,
} from "../lib/users/signInHelpers"
+import { FormSignInAddPhone } from "../components/users/FormSignInAddPhone"
+import { FormSignInMFACode } from "../components/users/FormSignInMFACode"
+import { FormSignInMFAType } from "../components/users/FormSignInMFAType"
const SignIn = () => {
const { login, requestMfaCode, userService } = useContext(AuthContext)
diff --git a/sites/partners/src/pages/unauthorized.tsx b/sites/partners/src/pages/unauthorized.tsx
index 01a2827232..4858109761 100644
--- a/sites/partners/src/pages/unauthorized.tsx
+++ b/sites/partners/src/pages/unauthorized.tsx
@@ -1,7 +1,6 @@
import Layout from "../layouts"
import Head from "next/head"
-import { t } from "@bloom-housing/ui-components"
-import { Hero } from "../../../../detroit-ui-components/src/headers/Hero"
+import { Hero, t } from "@bloom-housing/ui-components"
export default () => {
const pageTitle = t("errors.unauthorized.title")
diff --git a/sites/partners/src/pages/users/index.tsx b/sites/partners/src/pages/users/index.tsx
index 65e2897a5c..f81c266850 100644
--- a/sites/partners/src/pages/users/index.tsx
+++ b/sites/partners/src/pages/users/index.tsx
@@ -1,12 +1,17 @@
import React, { useContext, useEffect, useMemo, useState } from "react"
import Head from "next/head"
import dayjs from "dayjs"
-import { t, SiteAlert, AlertBox } from "@bloom-housing/ui-components"
-import { Button } from "../../../../../detroit-ui-components/src/actions/Button"
-import { PageHeader } from "../../../../../detroit-ui-components/src/headers/PageHeader"
-import { Drawer } from "../../../../../detroit-ui-components/src/overlays/Drawer"
-import { AgTable, useAgTable } from "../../../../../detroit-ui-components/src/tables/AgTable"
-import { AppearanceStyleType } from "../../../../../detroit-ui-components/src/global/AppearanceTypes"
+import {
+ t,
+ SiteAlert,
+ AlertBox,
+ Button,
+ PageHeader,
+ Drawer,
+ AgTable,
+ useAgTable,
+ AppearanceStyleType,
+} from "@bloom-housing/ui-components"
import { User } from "@bloom-housing/backend-core/types"
import { AuthContext } from "@bloom-housing/shared-helpers"
import { faFileExport } from "@fortawesome/free-solid-svg-icons"
diff --git a/sites/partners/styles/overrides.scss b/sites/partners/styles/overrides.scss
index 608c456fad..ecb8934c5f 100644
--- a/sites/partners/styles/overrides.scss
+++ b/sites/partners/styles/overrides.scss
@@ -1,26 +1,36 @@
/* Overrides the default ui-components styles with Detroit-specific styles. */
-@import url("https://fonts.googleapis.com/css?family=Montserrat:400,600,700");
+@import "../public/static/fonts/Montserrat.css";
+@import "@bloom-housing/ui-components/src/global/tokens/fonts.scss";
+@import "@bloom-housing/ui-components/src/global/tokens/borders.scss";
+@import "@bloom-housing/ui-components/src/global/tokens/colors.scss";
+@import "@bloom-housing/ui-components/src/global/tokens/screens.scss";
+@import "@bloom-housing/ui-components/src/global/tokens/sizes.scss";
+@import "@bloom-housing/ui-components/src/global/mixins.scss";
+@import "@bloom-housing/ui-components/src/global/text.scss";
+@import "@bloom-housing/ui-components/src/global/markdown.scss";
+@import "@bloom-housing/ui-components/src/global/lists.scss";
+@import "@bloom-housing/ui-components/src/global/accordion.scss";
#__next {
.site-header {
- --logo-title-font-size-desktop: var(--bloom-font-size-tiny);
- --logo-title-font-size-mobile: var(--bloom-font-size-sm);
+ --logo-title-font-size-desktop: var(--bloom-font-size-sm);
+ --logo-title-font-size-mobile: var(--bloom-font-size-xs);
--logo-image-desktop-max-height: var(--bloom-s20);
--logo-image-desktop-min-height: var(--bloom-s20);
- --mobile-menu-font-size: var(--bloom-font-size-sm);
- --mobile-dropdown-item-font-size: var(--bloom-font-size-tiny);
+ --mobile-menu-font-size: var(--bloom-font-size-xs);
+ --mobile-dropdown-item-font-size: var(--bloom-font-size-sm);
--logo-image-mobile-display: none;
--notice-display-mobile: none;
--link-text-hover-color: var(--bloom-color-gray-750);
--link-text-color: var(--bloom-color-gray-750);
- --link-font-size: var(--bloom-font-size-sm);
+ --link-font-size: var(--bloom-font-size-xs);
.button {
text-transform: uppercase;
font-weight: 700;
text-decoration: none;
letter-spacing: var(--bloom-letter-spacing-widest);
- font-size: var(--bloom-font-size-sm);
+ font-size: var(--bloom-font-size-xs);
svg {
rect {
fill: var(--bloom-color-primary);
@@ -34,6 +44,34 @@
}
}
}
+
+ .button {
+ --inline-font-size: var(--bloom-font-size-sm);
+ --unstyled-inline-font-size: var(--bloom-font-size-sm);
+ --normal-font-size: var(--bloom-font-size-2xs);
+ }
+
+ .view-item {
+ --label-font-size: var(--bloom-font-size-sm);
+ }
+
+ .footer-sock {
+ --background-color: var(--bloom-color-black);
+ }
+
+ .grid-section__title {
+ font-size: 1.375rem;
+ }
+
+ .drawer__header {
+ h1 {
+ font-size: 1.375rem;
+ }
+ }
+
+ .page-header {
+ --padding-desktop: var(--bloom-s14) 0 var(--bloom-s10) 0;
+ }
}
// Listing table Detroit styles
@@ -47,21 +85,23 @@
}
:root {
- --bloom-font-sans: [ "Montserrat", "Open Sans", "Helvetica", "Arial", "Verdana", "sans-serif" ];
- --bloom-font-alt-sans: [ "Montserrat", "Open Sans", "Helvetica", "Arial", "Verdana",
- "sans-serif" ];
+ --detroit-font-sans: "Montserrat", "Open Sans", "Helvetica", "Arial", "Verdana", "sans-serif";
+ --detroit-font-serif: "Montserrat", "Droid Serif", "Georgia", "Times", "serif";
+
+ --bloom-font-sans: var(--detroit-font-sans);
+ --bloom-font-alt-sans: var(--detroit-font-sans);
+ --bloom-font-serif: var(--detroit-font-serif);
--bloom-color-accent-cool: #297e73;
- --bloom-color-gray-700: "#000000";
- --bloom-color-gray-800: "#18252A";
- --bloom-color-gray-950: "#000000";
- --bloom-color-lush: "#feb70d";
+ --bloom-color-gray-700: #000000;
+ --bloom-color-gray-800: #18252a;
+ --bloom-color-gray-950: #000000;
+ --bloom-color-lush: #feb70d;
--bloom-color-primary-dark: rgb(0, 68, 69);
- --bloom-color-primary-darker: "#004445";
- --bloom-color-primary-light: "#F2F2F2";
+ --bloom-color-primary-darker: #004445;
+ --bloom-color-primary-light: #f2f2f2;
--bloom-color-primary-lighter: #f2f2f2;
--bloom-color-primary: rgb(41, 126, 115);
- --bloom-color-warn: "#feb70d";
- --bloom-font-serif: var(--detroit-font-serif);
+ --bloom-color-warn: #feb70d;
--primary-appearance-hover-background-color: white;
--primary-appearance-hover-label-color: var(--bloom-color-primary);
--primary-appearance-hover-border-color: var(--bloom-color-primary);
diff --git a/sites/partners/tailwind.config.js b/sites/partners/tailwind.config.js
index a8032c1479..f0972617b0 100644
--- a/sites/partners/tailwind.config.js
+++ b/sites/partners/tailwind.config.js
@@ -2,7 +2,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const cloneDeep = require("clone-deep")
-const bloomTheme = cloneDeep(require("../../detroit-ui-components/tailwind.config.js"))
+const bloomTheme = cloneDeep(require("@bloom-housing/ui-components/tailwind.config.js"))
// Modify bloomTheme to override any Tailwind vars
// For example:
// bloomTheme.theme.colors.white = "#f0f0e9"
@@ -47,7 +47,8 @@ module.exports = {
"./pages/**/*.tsx",
"./src/**/*.tsx",
"./layouts/**/*.tsx",
- "../../detroit-ui-components/src/**/*.tsx",
+ "../../shared-helpers/src/**/*.tsx",
+ "../../node_modules/@bloom-housing/ui-components/src/**/*.tsx",
],
safelist: [/grid-cols-/],
},
diff --git a/sites/partners/tsconfig.json b/sites/partners/tsconfig.json
index 3e47600f6d..3daa37b63c 100644
--- a/sites/partners/tsconfig.json
+++ b/sites/partners/tsconfig.json
@@ -3,8 +3,9 @@
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "preserve",
- "allowJs": true
+ "allowJs": true,
+ "incremental": true
},
- "exclude": ["node_modules", "cypress", "cypress-file-upload"],
+ "exclude": ["node_modules", "cypress", "cypress-file-upload", "cypress.config.ts"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}
diff --git a/sites/public/.babelrc b/sites/public/.babelrc
deleted file mode 100644
index 55f3f85dc3..0000000000
--- a/sites/public/.babelrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "presets": ["next/babel"],
- "plugins": ["istanbul"]
-}
diff --git a/sites/public/.env.template b/sites/public/.env.template
index f9f469a48e..953e4d47f9 100644
--- a/sites/public/.env.template
+++ b/sites/public/.env.template
@@ -16,4 +16,3 @@ NEW_RELIC_LICENSE_KEY=
GA_KEY=
GTM_KEY=
SHOW_FINDER=TRUE
-
diff --git a/sites/public/.jest/setup-tests.js b/sites/public/.jest/setup-tests.js
index 295298187d..31b77fe730 100644
--- a/sites/public/.jest/setup-tests.js
+++ b/sites/public/.jest/setup-tests.js
@@ -1,12 +1,11 @@
import { addTranslation } from "@bloom-housing/ui-components"
-import general from "../../../detroit-ui-components/src/locales/general.json"
+import generalTranslations from "../../../shared-helpers/src/locales/general.json"
import general_overrides from "../src/page_content/locale_overrides/general.json"
-import { configure } from "@testing-library/dom"
import { serviceOptions } from "@bloom-housing/backend-core"
import axios from "axios"
import "@testing-library/jest-dom/extend-expect"
-addTranslation(general)
+addTranslation(generalTranslations)
addTranslation(general_overrides)
process.env.backendApiBase = "http://localhost:3100"
@@ -17,8 +16,6 @@ global.beforeEach(() => {
})
})
-configure({ testIdAttribute: "data-test-id" })
-
// Need to set __next on base div to handle the overlay
const portalRoot = document.createElement("div")
portalRoot.setAttribute("id", "__next")
diff --git a/sites/public/__tests__/eligibility_questionnaire/EligibilityAge.test.tsx b/sites/public/__tests__/eligibility_questionnaire/EligibilityAge.test.tsx
index 900bde227c..ae5a01d177 100644
--- a/sites/public/__tests__/eligibility_questionnaire/EligibilityAge.test.tsx
+++ b/sites/public/__tests__/eligibility_questionnaire/EligibilityAge.test.tsx
@@ -39,19 +39,23 @@ describe("{title}
+ {title}