From 6e87d1c14f0da98336d8435a94c000ecb1726cdb Mon Sep 17 00:00:00 2001 From: nofurtherinformation Date: Mon, 22 Jul 2024 10:06:07 -0500 Subject: [PATCH] Various fixes --- app/resources/page.tsx | 2 +- components/Map/Map.tsx | 1 + components/MapInfoSection/MapInfoSection.tsx | 3 ++- components/MapTooltip/MapTooltip.tsx | 2 ++ components/MapTooltip/MapTooltipSections.tsx | 2 +- components/Pages/Home/Renderer.tsx | 3 ++- components/Tooltip/Tooltip.tsx | 2 +- content/page/changelog.mdx | 5 +++++ 8 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/resources/page.tsx b/app/resources/page.tsx index 92fd428..d7dc5bf 100644 --- a/app/resources/page.tsx +++ b/app/resources/page.tsx @@ -2,7 +2,7 @@ import SectionRenderer from "components/SectionRenderer"; import { getMdxContent } from "hooks/useMdxContent"; export const metadata = { - title: "Resources :: Feeding Fairness" + title: "Resources :: Grocery Gap Atlas" } export default async function ResourcesPage() { diff --git a/components/Map/Map.tsx b/components/Map/Map.tsx index aa36499..10e28a0 100644 --- a/components/Map/Map.tsx +++ b/components/Map/Map.tsx @@ -109,6 +109,7 @@ export const Map: React.FC = ({ initialFilter, simpleMap = false, onCl } handleResize() return () => { + dispatch(setTooltipInfo(null)) if (typeof window !== "undefined") { window?.removeEventListener("resize", handleResize) } diff --git a/components/MapInfoSection/MapInfoSection.tsx b/components/MapInfoSection/MapInfoSection.tsx index f802490..6c5f90d 100644 --- a/components/MapInfoSection/MapInfoSection.tsx +++ b/components/MapInfoSection/MapInfoSection.tsx @@ -70,6 +70,7 @@ export const MapInfoSection: React.FC = () => { const getData = async () => { if (clicked?.id && data?.id !== clicked.id) { const res = await globals.ds.runQuery(`SELECT * FROM ${dataTableName} WHERE ${idColumn} = ${clicked.id}`) + console.log(JSON.parse(globals.ds.stringifyJsonWithBigInts(res[0]))) const tooltipData = globals.ds.formatTooltipData(res[0]) const parentCompanyData = formatParentCompanyData(res[0]) const race = cleanRaceData(res[0]) @@ -101,7 +102,7 @@ export const MapInfoSection: React.FC = () => {

{data?.data?.NAME || clicked.id}

-

Open Report:

+

Open the report for this area

{ const colName = state.map.currentColumn const colConfig = columnsDict[colName] @@ -22,6 +23,7 @@ export const MapTooltipInner: React.FC< colConfig, } }) + if (!data) { return ( diff --git a/components/MapTooltip/MapTooltipSections.tsx b/components/MapTooltip/MapTooltipSections.tsx index 0e9af78..013e367 100644 --- a/components/MapTooltip/MapTooltipSections.tsx +++ b/components/MapTooltip/MapTooltipSections.tsx @@ -37,7 +37,7 @@ export const TooltipSectionsRenderer: React.FC<{ sections: any[], children?:Reac {/* flex non lead sections in each row */} {children}

- Click for more info + Click for more info in the sidebar

) diff --git a/components/Pages/Home/Renderer.tsx b/components/Pages/Home/Renderer.tsx index 34b77e0..01da48b 100644 --- a/components/Pages/Home/Renderer.tsx +++ b/components/Pages/Home/Renderer.tsx @@ -73,9 +73,10 @@ export const Renderer: React.FC = ({ pageInfo }) => { {title.split(" ")[1]} + {title.split(" ")[2]}
-
+

{getFirstTextElement(sections, "Subtitle")}

diff --git a/components/Tooltip/Tooltip.tsx b/components/Tooltip/Tooltip.tsx index e0961f2..a1f6a37 100644 --- a/components/Tooltip/Tooltip.tsx +++ b/components/Tooltip/Tooltip.tsx @@ -25,7 +25,7 @@ export function Tooltip({ {explainer} {withArrow ? : null} diff --git a/content/page/changelog.mdx b/content/page/changelog.mdx index 3958ddc..cc6cb19 100644 --- a/content/page/changelog.mdx +++ b/content/page/changelog.mdx @@ -1,4 +1,9 @@ +* 7/3 + * The map sidebar now displays richer information, and the layout with the variable selector/filters is more intuitive + * The map tooltip now shows 4 key scores and the current selected variable + * Added data note to clarify the color scale when the color scale is filtered to a particular state or county + * Fixed a few rendering bugs with filtering and monovariate data options * 6/12 * Added a more detail pane when you click on an area. From this details pane you can open neighborhood, county, and state level reports for the corresponding areas and view the available data (WIP to be refined) * Added filters/highlights based on market dominance percentage. These appear in the legend when active