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

Upgrade to tailwind v2 #1805

Merged
merged 24 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4cf27f8
Upgrade to Next 11 and React 17
jaredcwhite Sep 1, 2021
55a4555
Switch pages from MDX to markdown-to-jsx
jaredcwhite Sep 2, 2021
8b2ae21
Merge branch 'dev' into 1685/upgrade-to-next-11
jaredcwhite Sep 4, 2021
cf9c3a0
Use tsx for Next error pages
jaredcwhite Sep 4, 2021
756ec3d
Fix lack of semantic heading on Listing photo form
jaredcwhite Sep 4, 2021
daa4516
Add #1793 to Changelog
jaredcwhite Sep 4, 2021
8af140b
Upgrade to Tailwind 2, PostCSS 8, Storybook 6.3
jaredcwhite Sep 8, 2021
279129a
Upgade Changelook with #1805
jaredcwhite Sep 8, 2021
254d6de
Upgrade to Node 14
jaredcwhite Sep 10, 2021
38fb929
Update `.node-version` file
jaredcwhite Sep 10, 2021
1d63306
Testing explicit tailwind dep on Netlify
jaredcwhite Sep 10, 2021
7b897f1
Update partners also with tailwind dep
jaredcwhite Sep 10, 2021
8a1f04c
Update Node version in CircleCI
jaredcwhite Sep 10, 2021
6fc0477
Use Node 14.17.4 instead for security fixes
jaredcwhite Sep 10, 2021
a703ee2
Whoops, make that 14.17.6 =)
jaredcwhite Sep 10, 2021
7a7e5e4
Bump Cypress in CircleCI back down to 14.17.0
jaredcwhite Sep 10, 2021
2920854
Merge branch 'dev' into upgrade-to-tailwind-v2
jaredcwhite Sep 10, 2021
4b82759
Bump up React Hook Form in public app
jaredcwhite Sep 10, 2021
f9d7b32
Fix lockfile, update GitHub lint action
jaredcwhite Sep 10, 2021
45b7721
Remove stray </td> causing a linting issue
jaredcwhite Sep 10, 2021
aabe70a
Fix code style issues with Prettier
lint-action Sep 10, 2021
77e9978
Merge remote-tracking branch 'remotes/upstream/dev' into upgrade-to-t…
seanmalbert Sep 14, 2021
cf9d120
new lines on two files
seanmalbert Sep 14, 2021
949c498
export updates
seanmalbert Sep 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
executors:
standard-node:
docker:
- image: "cimg/node:12.18.4"
- image: "cimg/node:14.17.6"
- image: "circleci/redis:6.2.1-alpine"
- image: "circleci/postgres:12.3-postgis"
environment:
Expand All @@ -15,7 +15,7 @@ executors:
POSTGRES_DB: bloom
cypress-node:
docker:
- image: "cypress/base:12.18.2"
- image: "cypress/base:14.17.0"
- image: "circleci/redis:6.2.1-alpine"
- image: "circleci/postgres:12.3-postgis"
environment:
Expand All @@ -40,7 +40,7 @@ executors:
PARTNERS_PORTAL_URL: "http://localhost:3001"
puppeteer-node:
docker:
- image: "cimg/node:12.18.4-browsers"
- image: "cimg/node:14.17.6-browsers"

jobs:
setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.18.4
14.17.6
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. The format
- Add new /unauthorized page ([#1763](https://github.com/bloom-housing/bloom/pull/1763)) (Dominik Barcikowski)

- Fixed:

- Update Listings component to sort listings by status ([#1585](https://github.com/bloom-housing/bloom/pull/1585))
- Preferences ordinal bug in listings management ([#1641](https://github.com/bloom-housing/bloom/pull/1641)) (Emily Jablonski)
- Updates EnumListingReviewOrderType to be ListingReviewOrder ([#1679](https://github.com/bloom-housing/bloom/pull/1679))
Expand All @@ -37,6 +38,11 @@ All notable changes to this project will be documented in this file. The format
- Reset page to 1 on limit change ([#1809](https://github.com/bloom-housing/bloom/pull/1809)) (Dominik Barcikowski)
- Update public and partners to support preferred unit ids ([#1774](https://github.com/bloom-housing/bloom/pull/1774)) (Dominik Barcikowski)

- Changed:

- Upgrade the public and partners sites to Next v11 and React v17 ([#1793](https://github.com/bloom-housing/bloom/pull/1793)) (Jared White)
- **Breaking Change**

### UI Components

- Added:
Expand All @@ -52,6 +58,9 @@ All notable changes to this project will be documented in this file. The format
- More robust Features section for public listing view ([#1688](https://github.com/bloom-housing/bloom/pull/1688))

- Changed:

- Upgraded Tailwind to v2, PostCSS to v8, and Storybook to 6.3 ([#1805])(https://github.com/bloom-housing/bloom/pull/1805)) (Jared White)
- Upgraded React to v17
- StandardTable new optional prop to translate cell content ([#1707](https://github.com/bloom-housing/bloom/pull/1707)) (Emily Jablonski)
- Removed business logic from ListingsList component ([#1752](https://github.com/bloom-housing/bloom/pull/1752)) (Emily Jablonski)
- **Breaking Change**: Removed listings prop and replaced with children and a listingsCount prop
Expand Down
2 changes: 1 addition & 1 deletion backend/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"testEnvironment": "node"
},
"engines": {
"node": "12",
"node": "14",
"yarn": "^1.22"
},
"gitHead": "5f7694e3f2baff2a1a7a22e0676e487dda781a3e"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"lerna": "^3.22.1",
"lint-staged": "^10.4.0",
"prettier": "^2.1.0",
"react": "16.13.1",
"react-test-renderer": "16.13.1",
"react": "^17.0.2",
"react-test-renderer": "^17.0.2",
"rimraf": "^3.0.2",
"ts-jest": "^26.4.1",
"typescript": "^3.9.7",
Expand Down
2 changes: 1 addition & 1 deletion sites/partners/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ignore = "/bin/false"

[build.environment]

NODE_VERSION = "12.18.4"
NODE_VERSION = "14.17.6"
YARN_VERSION = "1.22.4"
NEXT_TELEMETRY_DISABLED = "1"

Expand Down
4 changes: 4 additions & 0 deletions sites/partners/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
65 changes: 33 additions & 32 deletions sites/partners/next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-env node */
/* eslint-disable @typescript-eslint/no-var-requires */

const withTM = require("next-transpile-modules")(["@bloom-housing"])
const withSass = require("@zeit/next-sass")
const withCSS = require("@zeit/next-css")
const withTM = require("next-transpile-modules")([
"@bloom-housing/ui-components",
"@bloom-housing/backend-core",
])
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
})
const withMDX = require("@next/mdx")()

if (process.env.NODE_ENV !== "production") {
require("dotenv").config()
Expand All @@ -31,32 +31,33 @@ const tailwindVars = require("@bloom-housing/ui-components/tailwind.tosass.js")(

// Tell webpack to compile the ui components package
// https://www.npmjs.com/package/next-transpile-modules
module.exports = withCSS(
withBundleAnalyzer(
withMDX(
withSass(
withTM({
target: "serverless",
env: {
backendApiBase: BACKEND_API_BASE,
listingServiceUrl: BACKEND_API_BASE + LISTINGS_QUERY,
idleTimeout: process.env.IDLE_TIMEOUT,
showDuplicates: process.env.SHOW_DUPLICATES === "TRUE",
publicBaseUrl: process.env.PUBLIC_BASE_URL,
cloudinaryCloudName: process.env.CLOUDINARY_CLOUD_NAME,
cloudinaryKey: process.env.CLOUDINARY_KEY,
cloudinarySignedPreset: process.env.CLOUDINARY_SIGNED_PRESET,
mapBoxToken: MAPBOX_TOKEN,
},
i18n: {
locales: process.env.LANGUAGES ? process.env.LANGUAGES.split(",") : ["en"],
defaultLocale: "en",
},
sassLoaderOptions: {
additionalData: tailwindVars,
},
})
)
)
)
module.exports = withBundleAnalyzer(
withTM({
target: "serverless",
env: {
backendApiBase: BACKEND_API_BASE,
listingServiceUrl: BACKEND_API_BASE + LISTINGS_QUERY,
idleTimeout: process.env.IDLE_TIMEOUT,
showDuplicates: process.env.SHOW_DUPLICATES === "TRUE",
publicBaseUrl: process.env.PUBLIC_BASE_URL,
cloudinaryCloudName: process.env.CLOUDINARY_CLOUD_NAME,
cloudinaryKey: process.env.CLOUDINARY_KEY,
cloudinarySignedPreset: process.env.CLOUDINARY_SIGNED_PRESET,
mapBoxToken: MAPBOX_TOKEN,
},
i18n: {
locales: process.env.LANGUAGES ? process.env.LANGUAGES.split(",") : ["en"],
defaultLocale: "en",
},
sassOptions: {
additionalData: tailwindVars,
},
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
type: "asset/source",
})
return config
},
})
)
12 changes: 7 additions & 5 deletions sites/partners/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
"electron": "^13.1.7",
"moment": "^2.29.1",
"nanoid": "^3.1.12",
"next": "^10.1.0",
"next": "^11.1.1",
"next-plugin-custom-babel-config": "^1.0.2",
"node-polyglot": "^2.4.0",
"node-sass": "^4.14.1",
"qs": "^6.10.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^6.15.5",
"swr": "^0.3.5"
"swr": "^0.3.5",
"tailwindcss": "2.2.10"
},
"devDependencies": {
"@babel/core": "^7.11.6",
Expand All @@ -49,7 +50,8 @@
"concurrently": "^5.3.0",
"cypress": "^4.12.1",
"js-levenshtein": "^1.1.6",
"next-transpile-modules": "^4.1.0",
"next-transpile-modules": "^8.0.0",
"postcss": "^8.3.6",
"sass-loader": "^10.0.3",
"typescript": "^3.9.7",
"webpack": "^4.44.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Layout from "../layouts"
import Head from "next/head"
import { Hero, MarkdownSection, t } from "@bloom-housing/ui-components"

export default () => {
const Error = () => {
const pageTitle = t("errors.notFound.title")

return (
Expand All @@ -19,3 +19,5 @@ export default () => {
</Layout>
)
}

export default Error
2 changes: 1 addition & 1 deletion sites/partners/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*eslint-env node*/

module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
plugins: ["tailwindcss", "autoprefixer"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ const ListingPhoto = () => {
<>
<input type="hidden" {...register("image.fileId")} />
<input type="hidden" {...register("image.label")} />
<GridSection grid={false} separator>
<span className="form-section__title">{t("listings.sections.photoTitle")}</span>
<span className="form-section__description">{t("listings.sections.photoSubtitle")}</span>
<GridSection
grid={false}
separator
title={t("listings.sections.photoTitle")}
description={t("listings.sections.photoSubtitle")}
>
<GridSection columns={1} tinted inset>
<GridCell>
{listingFormPhoto?.fileId && listingFormPhoto.fileId != "" ? (
Expand Down
Loading