Skip to content

Commit

Permalink
converted input2 screen to entry form, adjusted formatting, renamed "…
Browse files Browse the repository at this point in the history
…Graphs.tsx" to "HeatLoadAnalysis.tsx", removed placeHolders, removed Standard Deviation of UA graph
  • Loading branch information
jkoren committed Jan 15, 2024
1 parent c25da15 commit 6c18fb8
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 160 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,78 @@
export function CurrentHeatingSystem() {
const fuelType = 'Natural Gas'
const heatingSystemEfficiency = '75'
const setPoint = '70'
const setbackTemperature = '65'
const setbackTime = '7'
import { Form } from '@remix-run/react'
// removed temporarily for single-page app format
// import { Button } from '#/app/components/ui/button.tsx'
import { Input } from '#/app/components/ui/input.tsx'
import { Label } from '#/app/components/ui/label.tsx'

export function CurrentHeatingSystem() {
const titleClassTailwind = 'text-5xl font-extrabold tracking-wide'
const subTitleClassTailwind = 'text-2xl font-semibold text-zinc-950'
return (
<div className="section-title">
Current Heating System
<hr />
<div className="flex flex-row">
<div className="basis-1/2">
<div className="item-title">
Fuel Type
<br />
<div className="item-big">{fuelType}</div> <br />
Heating System Efficiency (%)
<br />
<div className="item-big">{heatingSystemEfficiency}</div> <br />
</div>
<div>
<h2 className={`${titleClassTailwind}`}>Existing Heating System</h2>

<Form method="post" action="/current">
<div>
<Label htmlFor="fuelType">
<b>Fuel Type</b>
</Label>
<Input name="fuelType" id="fuelType" type="text" />
</div>

<div>
<Label htmlFor="heatingSystemEfficiency">
<b>Heating system efficiency %</b>
</Label>
<Input
name="heatingSystemEfficiency"
id="heatingSystemEfficiency"
type="text"
/>
</div>

<div>
<Label htmlFor="designTemperatureOverride">
<b>Design temperature override (°F)</b>
</Label>
<Input
name="designTemperatureOverride"
id="designTemperatureOverride"
type="text"
/>
</div>

<div className="basis-1/2">
<div className="item-group-title">Thermostat Settings</div>
<div className="item-title">
Set Point (°F) <br />
<div className="item">{setPoint}</div> <br />
Setback Temperature (°F)
<br />
<div className="item">{setbackTemperature}</div> <br />
Setback Time (h)
<div className="item">{setbackTime}</div>
<h6 className={`${subTitleClassTailwind}`}>Thermostat Settings</h6>

<div className="flex flex-row">
<div className="basis-1/3">
<Label htmlFor="setPoint">Set Point (°F) </Label>
<Input
name="setPointTemperature"
id="setPointTemperature"
type="text"
/>
</div>

<div className="basis-1/3">
<Label htmlFor="setPoint">Setback Temperature (°F)</Label>
<Input
name="setBackTemperature"
id="setBackTemperature"
type="text"
/>
</div>

<div className="basis-1/3">
<Label htmlFor="setPoint">Setback hours per day</Label>
<Input name="setBackTime" id="setBackTime" type="text" />
</div>
</div>
</div>
</Form>

{/* removed temporarily for single page app format */}
{/* <div>
<Button type="submit">Next ={'>'}</Button>
</div> */}
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { AnalysisHeader } from './AnalysisHeader.tsx'
import { EnergyUseHistoryChart } from './EnergyUseHistoryChart.tsx'

export function EnergyUseHistory() {
const titleClassTailwind = 'text-5xl font-extrabold tracking-wide'
return (
<div className="section-title">
Energy Use History
<div>
<h2 className={`${titleClassTailwind}`}>Energy Use History</h2>
<AnalysisHeader />
<EnergyUseHistoryChart />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const data = [
export function HeatLoad() {
return (
<div>
<div className="item-title">Heat Load</div>
<div className="item-title">Heating System Demand</div>

<ResponsiveContainer width="100%" height={400}>
<ScatterChart
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const data = [
export function WholeHomeUAComparison() {
return (
<div>
<div className="item-title">Whole Home UA Comparison</div>
<div className="item-title">Whole-home heat loss comparison</div>

<ResponsiveContainer width="100%" height={400}>
<ComposedChart
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { AnalysisHeader } from './AnalysisHeader.tsx'
import { HeatLoad } from './Graphs/HeatLoad.tsx'
import { StandardDeviationOfUA } from './Graphs/StandardDeviationOfUA.tsx'
import { WholeHomeUAComparison } from './Graphs/WholeHomeUAComparison.tsx'

export function Graphs() {
const fuelType = 'Natural Gas'
return (
<div className="section-title">
Fuel Type <br />
<div>
<h2 className="text-5xl font-extrabold tracking-wide">
Heat Load Analysis
</h2>
Fuel Type
{fuelType}
<AnalysisHeader />
<hr />
<HeatLoad />
<WholeHomeUAComparison />
<StandardDeviationOfUA />
</div>
)
}
Original file line number Diff line number Diff line change
@@ -1,84 +1,52 @@
import { Form } from '@remix-run/react'
import { Button } from '#/app/components/ui/button.tsx'
// import { Button } from '#/app/components/ui/button.tsx'
import { Input } from '#/app/components/ui/input.tsx'
import { Label } from '#/app/components/ui/label.tsx'

export function HomeInformation() {
const titleClassTailwind = 'text-5xl font-extrabold tracking-wide'
const subTitleClassTailwind = 'text-2xl font-semibold text-zinc-950'
return (
<div>
<h2 className="text-5xl font-extrabold tracking-wide">
Home Information
</h2>
<h2 className={`${titleClassTailwind}`}>Home Information</h2>

<Form method="post" action="/homes">
<div className="mt-10">
<h6 className="text-2xl font-semibold text-zinc-950">
Resident/Client
</h6>
<h6 className={`${subTitleClassTailwind}`}>Resident/Client</h6>

<div className="mt-4 flex space-x-4">
<div>
<Label htmlFor="firstName">First Name</Label>
<Input
name="firstName"
id="firstName"
type="text"
placeholder="Bob"
/>
<Input name="firstName" id="firstName" type="text" />
</div>
<div>
<Label htmlFor="lastName">Last Name</Label>
<Input
name="lastName"
id="lastName"
type="text"
placeholder="Barker"
/>
<Input name="lastName" id="lastName" type="text" />
</div>
</div>
</div>

<div className="mt-9">
<h6 className="text-2xl font-semibold text-zinc-950">Address</h6>
<h6 className={`${subTitleClassTailwind}`}>Address</h6>

<div className="mt-4 flex space-x-4">
<div>
<Label htmlFor="address">Street address</Label>
<Input
name="address"
id="address"
type="text"
placeholder="76 Framingham Ave."
/>
<Input
name="addressTwo"
id="adressTwo"
type="text"
placeholder="Apt 256"
/>
<Input name="address" id="address" type="text" />
<Input name="addressTwo" id="adressTwo" type="text" />

<div className="mt-4 flex">
<div>
<Label htmlFor="city">City/Town</Label>
<Input
name="city"
id="city"
type="text"
placeholder="Boston"
/>
<Input name="city" id="city" type="text" />
</div>
<div>
<Label htmlFor="state">State</Label>
<Input name="state" id="state" type="text" placeholder="MA" />
<Input name="state" id="state" type="text" />
</div>
<div>
<Label htmlFor="zipcode">Zipcode</Label>
<Input
name="zipcode"
id="zipcode"
type="text"
placeholder="02856"
/>
<Input name="zipcode" id="zipcode" type="text" />
</div>
</div>
</div>
Expand All @@ -87,22 +55,14 @@ export function HomeInformation() {

<div className="mt-9">
<h6>
<Label
className="text-2xl font-semibold text-zinc-950"
htmlFor="livingArea"
>
<Label className={`${subTitleClassTailwind}`} htmlFor="livingArea">
Living Area (sf)
</Label>
</h6>

<div className="mt-4">
<div>
<Input
name="livingArea"
id="livingArea"
type="number"
placeholder="3000"
/>
<Input name="livingArea" id="livingArea" type="number" />
<p className="mt-2 text-sm text-slate-500">
The home's above-grade, conditioned space
</p>
Expand Down
11 changes: 2 additions & 9 deletions heat-stack/app/routes/_heat+/heatloadanalysis.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { Graphs } from '../../components/ui/heat/CaseSummaryComponents/Graphs.tsx'
import { Graphs } from '../../components/ui/heat/CaseSummaryComponents/HeatLoadAnalysis.tsx'

export default function HeatLoadAnalysis() {
return (
<main className="main-container">
<div>
<h1 className="page-title">Heat Load Analysis</h1>
<Graphs />
</div>
</main>
)
return <Graphs />
}
6 changes: 2 additions & 4 deletions heat-stack/app/routes/_heat+/single.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { CurrentHeatingSystem } from '../../components/ui/heat/CaseSummaryComponents/CurrentHeatingSystem.tsx'
import { EnergyUseHistory } from '../../components/ui/heat/CaseSummaryComponents/EnergyUseHistory.tsx'
import { Graphs } from '../../components/ui/heat/CaseSummaryComponents/Graphs.tsx'
import { HomeInformation } from '../../components/ui/heat/CaseSummaryComponents/HomeInformation.tsx'
import HeatLoadAnalysis from './heatloadanalysis.tsx'

export default function Inputs() {
return (
<div>
{/* <div className="container items-center justify-between gap-4 md:h-24 md:flex-row"> */}
<HomeInformation />
<CurrentHeatingSystem />
<EnergyUseHistory />
<h1 className="page-title">Heat Load Analysis</h1>
<Graphs />
<HeatLoadAnalysis />
</div>
)
}

0 comments on commit 6c18fb8

Please sign in to comment.