From 6783c767949de7271205a3764d8df741341e55a5 Mon Sep 17 00:00:00 2001 From: Thad Kerosky Date: Fri, 9 Feb 2024 09:36:43 -0500 Subject: [PATCH 01/10] epic-stack w conform v1,remix v2.5,on root add header --- heat-stack/README.md | 6 +- heat-stack/app/components/error-boundary.tsx | 2 +- heat-stack/app/components/forms.tsx | 41 +- heat-stack/app/components/search-bar.tsx | 3 +- heat-stack/app/components/toaster.tsx | 28 +- heat-stack/app/components/ui/button.tsx | 2 +- heat-stack/app/components/ui/sonner.tsx | 26 + heat-stack/app/entry.server.tsx | 7 +- heat-stack/app/root.tsx | 277 +- ...iginal_v2.3.tsx => root_original_v2.5.tsx} | 118 +- .../_auth+/auth.$provider.callback.test.ts | 2 +- .../routes/_auth+/auth.$provider.callback.ts | 4 +- .../app/routes/_auth+/auth.$provider.ts | 4 +- .../app/routes/_auth+/forgot-password.tsx | 42 +- heat-stack/app/routes/_auth+/login.tsx | 71 +- heat-stack/app/routes/_auth+/logout.tsx | 4 +- heat-stack/app/routes/_auth+/onboarding.tsx | 61 +- .../routes/_auth+/onboarding_.$provider.tsx | 66 +- .../app/routes/_auth+/reset-password.tsx | 55 +- heat-stack/app/routes/_auth+/signup.tsx | 50 +- heat-stack/app/routes/_auth+/verify.tsx | 69 +- .../app/routes/_marketing+/logos/logos.ts | 44 +- .../app/routes/_marketing+/logos/tailwind.svg | 2 +- .../app/routes/_marketing+/tailwind-preset.ts | 27 + heat-stack/app/routes/_seo+/robots[.]txt.ts | 4 +- heat-stack/app/routes/_seo+/sitemap[.]xml.ts | 5 +- heat-stack/app/routes/admin+/cache.tsx | 35 +- .../app/routes/admin+/cache_.lru.$cacheKey.ts | 8 +- .../routes/admin+/cache_.sqlite.$cacheKey.ts | 8 +- .../app/routes/admin+/cache_.sqlite.tsx | 4 +- heat-stack/app/routes/me.tsx | 4 +- .../routes/resources+/download-user-data.tsx | 8 +- .../app/routes/resources+/healthcheck.tsx | 4 +- .../resources+/note-images.$imageId.tsx | 6 +- .../resources+/user-images.$imageId.tsx | 6 +- .../routes/settings+/profile.change-email.tsx | 78 +- .../routes/settings+/profile.connections.tsx | 9 +- .../app/routes/settings+/profile.index.tsx | 64 +- .../app/routes/settings+/profile.password.tsx | 68 +- .../settings+/profile.password_.create.tsx | 59 +- .../app/routes/settings+/profile.photo.tsx | 63 +- heat-stack/app/routes/settings+/profile.tsx | 7 +- .../settings+/profile.two-factor.disable.tsx | 14 +- .../settings+/profile.two-factor.index.tsx | 15 +- .../settings+/profile.two-factor.verify.tsx | 65 +- heat-stack/app/routes/users+/$username.tsx | 7 +- .../users+/$username_+/__note-editor.tsx | 243 +- .../users+/$username_+/notes.$noteId.tsx | 50 +- .../$username_+/notes.$noteId_.edit.tsx | 19 +- .../routes/users+/$username_+/notes.new.tsx | 5 +- .../app/routes/users+/$username_+/notes.tsx | 9 +- heat-stack/app/routes/users+/index.tsx | 6 +- heat-stack/app/styles/tailwind.css | 11 +- heat-stack/app/utils/auth.server.ts | 6 +- heat-stack/app/utils/connections.server.ts | 2 +- heat-stack/app/utils/db.server.ts | 12 +- heat-stack/app/utils/extended-theme.ts | 17 +- heat-stack/app/utils/misc.tsx | 60 +- heat-stack/app/utils/monitoring.client.tsx | 13 + heat-stack/app/utils/permissions.server.ts | 60 + .../app/utils/providers/github.server.ts | 1 - heat-stack/app/utils/request-info.ts | 2 +- heat-stack/app/utils/session.server.ts | 2 +- heat-stack/app/utils/theme.server.ts | 2 +- heat-stack/app/utils/toast.server.ts | 16 +- heat-stack/app/utils/user.ts | 44 + heat-stack/app/utils/verification.server.ts | 2 +- heat-stack/components.json | 2 +- heat-stack/other/Dockerfile | 3 +- heat-stack/other/litefs.yml | 9 + heat-stack/package-lock.json | 4876 ++++++----------- heat-stack/package.json | 110 +- heat-stack/remix.init/gitignore | 22 + heat-stack/server/index.ts | 14 +- heat-stack/tailwind.config.ts | 10 +- heat-stack/tests/e2e/onboarding.test.ts | 2 +- heat-stack/tests/e2e/settings-profile.test.ts | 2 +- heat-stack/tests/setup/custom-matchers.ts | 6 +- heat-stack/tsconfig.json | 15 +- 79 files changed, 3090 insertions(+), 4115 deletions(-) create mode 100644 heat-stack/app/components/ui/sonner.tsx rename heat-stack/app/{root_original_v2.3.tsx => root_original_v2.5.tsx} (81%) create mode 100644 heat-stack/app/routes/_marketing+/tailwind-preset.ts create mode 100644 heat-stack/app/utils/permissions.server.ts create mode 100644 heat-stack/remix.init/gitignore diff --git a/heat-stack/README.md b/heat-stack/README.md index 60a8605b..7d035d10 100644 --- a/heat-stack/README.md +++ b/heat-stack/README.md @@ -80,7 +80,7 @@ To re-create the patch for py file support in `/patch`, use these [instructions] ```sh -npx create-remix@latest --install --template epicweb-dev/epic-stack +npx create-epic-app@latest ``` [![The Epic Stack](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/246885449-1b00286c-aa3d-44b2-9ef2-04f694eb3592.png)](https://www.epicweb.dev/epic-stack) @@ -91,9 +91,9 @@ npx create-remix@latest --install --template epicweb-dev/epic-stack ## Watch Kent's Introduction to The Epic Stack -[![screenshot of a YouTube video](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/242088051-6beafa78-41c6-47e1-b999-08d3d3e5cb57.png)](https://www.youtube.com/watch?v=yMK5SVRASxM) +[![Epic Stack Talk slide showing Flynn Rider with knives, the text "I've been around and I've got opinions" and Kent speaking in the corner](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/277818553-47158e68-4efc-43ae-a477-9d1670d4217d.png)](https://www.epicweb.dev/talks/the-epic-stack) -["The Epic Stack" by Kent C. Dodds at #RemixConf 2023 💿](https://www.youtube.com/watch?v=yMK5SVRASxM) +["The Epic Stack" by Kent C. Dodds](https://www.epicweb.dev/talks/the-epic-stack) ## Docs diff --git a/heat-stack/app/components/error-boundary.tsx b/heat-stack/app/components/error-boundary.tsx index 80c1406b..715b8c8e 100644 --- a/heat-stack/app/components/error-boundary.tsx +++ b/heat-stack/app/components/error-boundary.tsx @@ -39,7 +39,7 @@ export function GeneralErrorBoundary({ ? (statusHandlers?.[error.status] ?? defaultStatusHandler)({ error, params, - }) + }) : unexpectedErrorHandler(error)} ) diff --git a/heat-stack/app/components/forms.tsx b/heat-stack/app/components/forms.tsx index ad2868ad..131c33b2 100644 --- a/heat-stack/app/components/forms.tsx +++ b/heat-stack/app/components/forms.tsx @@ -1,5 +1,5 @@ -import { useInputEvent } from '@conform-to/react' -import React, { useId, useRef } from 'react' +import { useInputControl } from '@conform-to/react' +import React, { useId } from 'react' import { Checkbox, type CheckboxProps } from './ui/checkbox.tsx' import { Input } from './ui/input.tsx' import { Label } from './ui/label.tsx' @@ -19,7 +19,7 @@ export function ErrorList({ return (