From d8c55532899334a0af7b0727bf3dd1f4ff6e1728 Mon Sep 17 00:00:00 2001
From: Jeff Korenstein <67333843+jkoren@users.noreply.github.com>
Date: Tue, 26 Dec 2023 23:49:12 -0500
Subject: [PATCH] set up route placeholders, /cases, /casesummary (#127)
* set up route placeholders, /cases, /casesummary
* created a directory to hold HEAT UI components and moved Case Summary components to that directory
---
heat-stack/app/components/CaseSummary.tsx | 18 -----------
.../CurrentHeatingSystem.tsx | 0
.../EnergyUseHistory.tsx | 0
.../EnergyUseHistoryChart.tsx | 4 +--
.../CaseSummaryComponents/Graphs.tsx | 0
.../CaseSummaryComponents/Graphs/HeatLoad.tsx | 0
.../Graphs/StandardDeviationOfUA.tsx | 0
.../Graphs/WholeHomeUAComparison.tsx | 0
.../CaseSummaryComponents/HomeInformation.tsx | 4 +--
heat-stack/app/root.tsx | 32 ++++++++++---------
heat-stack/app/routes/_heat+/CaseSummary.tsx | 18 +++++++++++
heat-stack/app/routes/_heat+/index.tsx | 17 ++++++++++
.../_marketing+/{index.tsx => epicstack.tsx} | 0
13 files changed, 56 insertions(+), 37 deletions(-)
delete mode 100644 heat-stack/app/components/CaseSummary.tsx
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/CurrentHeatingSystem.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/EnergyUseHistory.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/EnergyUseHistoryChart.tsx (92%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/Graphs.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/Graphs/HeatLoad.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/Graphs/WholeHomeUAComparison.tsx (100%)
rename heat-stack/app/components/ui/{ => heat}/CaseSummaryComponents/HomeInformation.tsx (95%)
create mode 100644 heat-stack/app/routes/_heat+/CaseSummary.tsx
create mode 100644 heat-stack/app/routes/_heat+/index.tsx
rename heat-stack/app/routes/_marketing+/{index.tsx => epicstack.tsx} (100%)
diff --git a/heat-stack/app/components/CaseSummary.tsx b/heat-stack/app/components/CaseSummary.tsx
deleted file mode 100644
index b77bc392..00000000
--- a/heat-stack/app/components/CaseSummary.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { CurrentHeatingSystem } from './ui/CaseSummaryComponents/CurrentHeatingSystem.tsx'
-import { EnergyUseHistory } from './ui/CaseSummaryComponents/EnergyUseHistory.tsx'
-import { Graphs } from './ui/CaseSummaryComponents/Graphs.tsx'
-import { HomeInformation } from './ui/CaseSummaryComponents/HomeInformation.tsx'
-
-export function CaseSummary() {
- return (
-
-
-
Case Summary
-
-
-
-
-
-
- )
-}
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/CurrentHeatingSystem.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/CurrentHeatingSystem.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/CurrentHeatingSystem.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/CurrentHeatingSystem.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistory.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/EnergyUseHistory.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistory.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/EnergyUseHistory.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistoryChart.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/EnergyUseHistoryChart.tsx
similarity index 92%
rename from heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistoryChart.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/EnergyUseHistoryChart.tsx
index 595b0f5e..ab530869 100644
--- a/heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistoryChart.tsx
+++ b/heat-stack/app/components/ui/heat/CaseSummaryComponents/EnergyUseHistoryChart.tsx
@@ -1,4 +1,4 @@
-import { Checkbox } from '../../../components/ui/checkbox.tsx'
+import { Checkbox } from '../../../../components/ui/checkbox.tsx'
import {
Table,
@@ -7,7 +7,7 @@ import {
TableHead,
TableHeader,
TableRow,
-} from '../../../components/ui/table.tsx'
+} from '../../../../components/ui/table.tsx'
const months = [
{
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/Graphs.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/Graphs.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/Graphs/HeatLoad.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/HeatLoad.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/Graphs/HeatLoad.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/HeatLoad.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/Graphs/WholeHomeUAComparison.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/WholeHomeUAComparison.tsx
similarity index 100%
rename from heat-stack/app/components/ui/CaseSummaryComponents/Graphs/WholeHomeUAComparison.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/WholeHomeUAComparison.tsx
diff --git a/heat-stack/app/components/ui/CaseSummaryComponents/HomeInformation.tsx b/heat-stack/app/components/ui/heat/CaseSummaryComponents/HomeInformation.tsx
similarity index 95%
rename from heat-stack/app/components/ui/CaseSummaryComponents/HomeInformation.tsx
rename to heat-stack/app/components/ui/heat/CaseSummaryComponents/HomeInformation.tsx
index ad560b2e..4ec97b8f 100644
--- a/heat-stack/app/components/ui/CaseSummaryComponents/HomeInformation.tsx
+++ b/heat-stack/app/components/ui/heat/CaseSummaryComponents/HomeInformation.tsx
@@ -1,6 +1,6 @@
import { Form } from '@remix-run/react'
-import { Input } from '../input.tsx'
-import { Label } from '../label.tsx'
+import { Input } from '../../input.tsx'
+import { Label } from '../../label.tsx'
export function HomeInformation() {
const name = 'Pietro Schirano'
diff --git a/heat-stack/app/root.tsx b/heat-stack/app/root.tsx
index 56ee30ad..55492c12 100644
--- a/heat-stack/app/root.tsx
+++ b/heat-stack/app/root.tsx
@@ -6,7 +6,6 @@ import {
type LinksFunction,
} from '@remix-run/node'
import { Links, Scripts, Outlet } from '@remix-run/react'
-import { CaseSummary } from './components/CaseSummary.tsx'
import { href as iconsHref } from './components/ui/icon.tsx'
import fontStyleSheetUrl from './styles/font.css'
import tailwindStyleSheetUrl from './styles/tailwind.css'
@@ -18,7 +17,11 @@ import { prisma } from './utils/db.server.ts'
import { getEnv } from './utils/env.server.ts'
import { combineHeaders, getDomainUrl } from './utils/misc.tsx'
import { useNonce } from './utils/nonce-provider.ts'
-import { combineServerTimings, makeTimings, time } from './utils/timing.server.ts'
+import {
+ combineServerTimings,
+ makeTimings,
+ time,
+} from './utils/timing.server.ts'
// Hints may not be required. Double check.
import { WeatherExample } from './components/WeatherExample.tsx'
import { Weather } from './WeatherExample.js'
@@ -115,9 +118,9 @@ export async function loader({ request }: DataFunctionArgs) {
)
}
-/**
- * Step 4 of making Server Timings
- * https://github.com/epicweb-dev/epic-stack/blob/main/docs/server-timing.md
+/**
+ * Step 4 of making Server Timings
+ * https://github.com/epicweb-dev/epic-stack/blob/main/docs/server-timing.md
*/
export const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {
return {
@@ -125,7 +128,11 @@ export const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {
}
}
-export default function HeatStack({ children, env = {}, nonce }: {
+export default function HeatStack({
+ children,
+ env = {},
+ nonce,
+}: {
children: React.ReactNode
nonce: string
env?: Record
@@ -138,14 +145,11 @@ export default function HeatStack({ children, env = {}, nonce }: {
-
- Title
-
+ Site header
+
-
-
- Footer
-
+
+ Site footer