Skip to content

Commit

Permalink
Merge pull request #208 from policy-design-lab/feature/dmc_sada_page
Browse files Browse the repository at this point in the history
[0.11.0 Release] DMC & SADA page, Logo Change, Webpack Building Update
  • Loading branch information
pengyin-shan authored Nov 8, 2023
2 parents 410d0ab + 83b4a56 commit 69e8bc8
Show file tree
Hide file tree
Showing 21 changed files with 1,226 additions and 227 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [unreleased]

### Added

- Dairy Margin Coverage page and Supplemental Agricultural Disaster Assistance page with corresponding components for their attributes [#206](https://github.com/policy-design-lab/pdl-frontend/issues/206)

### Changed

- Optimize webpack config to save docker building time [#203](https://github.com/policy-design-lab/pdl-frontend/issues/203)
- Change PDL logo to use the new design [#209](https://github.com/policy-design-lab/pdl-frontend/issues/209)

## [0.10.0] - 2023-10-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 5 additions & 25 deletions src/components/PDLLogo.tsx

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/components/cropinsurance/chart/CropInsuranceBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,10 @@ export default function CropInsuranceBar({
parseFloat(totalIndemnitiesInDollarsBar.attr("width")),
y: totalIndemnitiesInDollarsBar.attr("y")
},
{ x: margin.left + graphWidth, y: totalIndemnitiesInDollarsBar.attr("y") }
{
x: margin.left + graphWidth,
y: totalIndemnitiesInDollarsBar.attr("y")
}
];
d3.select(rnBar.current)
.append("path")
Expand Down
48 changes: 41 additions & 7 deletions src/components/crp/CRPTotalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,19 @@ function Table({ columns, data }: { columns: any; data: any }) {
key={column.id}
{...column.getHeaderProps(column.getSortByToggleProps())}
{...column.getHeaderProps({
style: { paddingLeft: column.paddingLeft, paddingRight: column.paddingRight }
style: {
paddingLeft: column.paddingLeft,
paddingRight: column.paddingRight
}
})}
>
<Box sx={{ display: "flex", flexDirection: "horizontal", alignItems: "center" }}>
<Box
sx={{
display: "flex",
flexDirection: "horizontal",
alignItems: "center"
}}
>
{column.render("Header")}
<div>
{(() => {
Expand Down Expand Up @@ -185,7 +194,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 6, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 6,
display: "flex",
justifyContent: "center"
}}
>
TOTAL CRP BENEFITS
</Box>
Expand All @@ -200,7 +214,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 2, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 2,
display: "flex",
justifyContent: "center"
}}
>
PCT. NATIONWIDE <br /> (as of Sep. 2022)
</Box>
Expand All @@ -215,7 +234,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 2, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 2,
display: "flex",
justifyContent: "center"
}}
>
NO. OF CONTRACTS <br /> (as of Sep. 2022)
</Box>
Expand All @@ -230,7 +254,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 2, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 2,
display: "flex",
justifyContent: "center"
}}
>
NO. OF FARMS <br /> (as of Sep. 2022)
</Box>
Expand All @@ -245,7 +274,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 2, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 2,
display: "flex",
justifyContent: "center"
}}
>
ACRES <br /> (as of Sep. 2022)
</Box>
Expand Down
50 changes: 43 additions & 7 deletions src/components/crp/CategoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,19 @@ function Table({ columns, data }: { columns: any; data: any; statePerformance: a
key={column.id}
{...column.getHeaderProps(column.getSortByToggleProps())}
{...column.getHeaderProps({
style: { paddingLeft: column.paddingLeft, paddingRight: column.paddingRight }
style: {
paddingLeft: column.paddingLeft,
paddingRight: column.paddingRight
}
})}
>
<Box sx={{ display: "flex", flexDirection: "horizontal", alignItems: "center" }}>
<Box
sx={{
display: "flex",
flexDirection: "horizontal",
alignItems: "center"
}}
>
{column.render("Header")}
<div>
{(() => {
Expand Down Expand Up @@ -197,7 +206,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 12, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 12,
display: "flex",
justifyContent: "center"
}}
>
STATES
</Box>
Expand All @@ -208,7 +222,14 @@ function App({
}) {
return (
<div style={{ textAlign: "left" }}>
<Box sx={{ py: 2, pl: 6, display: "flex", justifyContent: "flex-start" }}>
<Box
sx={{
py: 2,
pl: 6,
display: "flex",
justifyContent: "flex-start"
}}
>
{props.value}
</Box>
</div>
Expand All @@ -219,7 +240,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 6, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 6,
display: "flex",
justifyContent: "center"
}}
>
{`${category} Benefit`.toUpperCase()}
</Box>
Expand Down Expand Up @@ -250,7 +276,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 6, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 6,
display: "flex",
justifyContent: "center"
}}
>
{`${category} Percentage Within State`.toUpperCase()}
</Box>
Expand Down Expand Up @@ -281,7 +312,12 @@ function App({
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 7, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 7,
display: "flex",
justifyContent: "center"
}}
>
CRP BENEFITS
</Box>
Expand Down
20 changes: 17 additions & 3 deletions src/components/csp/CSPTotalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,19 @@ function Table({ columns, data }: { columns: any; data: any }) {
key={column.id}
{...column.getHeaderProps(column.getSortByToggleProps())}
{...column.getHeaderProps({
style: { paddingLeft: column.paddingLeft, paddingRight: column.paddingRight }
style: {
paddingLeft: column.paddingLeft,
paddingRight: column.paddingRight
}
})}
>
<Box sx={{ display: "flex", flexDirection: "horizontal", alignItems: "center" }}>
<Box
sx={{
display: "flex",
flexDirection: "horizontal",
alignItems: "center"
}}
>
{column.render("Header")}
<div>
{(() => {
Expand Down Expand Up @@ -156,7 +165,12 @@ function App({ statePerformance }: { statePerformance: any }): JSX.Element {
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 9, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 9,
display: "flex",
justifyContent: "center"
}}
>
CSP BENEFITS
</Box>
Expand Down
50 changes: 43 additions & 7 deletions src/components/csp/CategoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,19 @@ function Table({ columns, data }: { columns: any; data: any; statePerformance: a
key={column.id}
{...column.getHeaderProps(column.getSortByToggleProps())}
{...column.getHeaderProps({
style: { paddingLeft: column.paddingLeft, paddingRight: column.paddingRight }
style: {
paddingLeft: column.paddingLeft,
paddingRight: column.paddingRight
}
})}
>
<Box sx={{ display: "flex", flexDirection: "horizontal", alignItems: "center" }}>
<Box
sx={{
display: "flex",
flexDirection: "horizontal",
alignItems: "center"
}}
>
{column.render("Header")}
<div>
{(() => {
Expand Down Expand Up @@ -180,7 +189,12 @@ function App({ category, statePerformance }: { category: string; statePerformanc
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 12, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 12,
display: "flex",
justifyContent: "center"
}}
>
STATES
</Box>
Expand All @@ -191,7 +205,14 @@ function App({ category, statePerformance }: { category: string; statePerformanc
}) {
return (
<div style={{ textAlign: "left" }}>
<Box sx={{ py: 2, pl: 6, display: "flex", justifyContent: "flex-start" }}>
<Box
sx={{
py: 2,
pl: 6,
display: "flex",
justifyContent: "flex-start"
}}
>
{props.value}
</Box>
</div>
Expand All @@ -202,7 +223,12 @@ function App({ category, statePerformance }: { category: string; statePerformanc
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 6, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 6,
display: "flex",
justifyContent: "center"
}}
>
{`${category} Benefit`.toUpperCase()}
</Box>
Expand Down Expand Up @@ -233,7 +259,12 @@ function App({ category, statePerformance }: { category: string; statePerformanc
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 6, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 6,
display: "flex",
justifyContent: "center"
}}
>
{`${category} Percentage Within State`.toUpperCase()}
</Box>
Expand Down Expand Up @@ -264,7 +295,12 @@ function App({ category, statePerformance }: { category: string; statePerformanc
Header: (
<Box
className="tableHeader"
sx={{ maxWidth: 240, pl: 7, display: "flex", justifyContent: "center" }}
sx={{
maxWidth: 240,
pl: 7,
display: "flex",
justifyContent: "center"
}}
>
CSP BENEFITS
</Box>
Expand Down
Loading

0 comments on commit 69e8bc8

Please sign in to comment.