From d8e54c196d345758f1ffac77ebd9e58271f23080 Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold Date: Mon, 25 Nov 2024 16:06:49 -0500 Subject: [PATCH 1/7] HMW-854 Moved Extreme Weather text into configuration --- .../pages/Community.Tabs.ExtremeWeather.tsx | 386 ++++-------------- app/client/src/types/index.ts | 21 + .../data/community/extreme-weather.json | 117 +++++- app/server/app/public/data/dataPage.json | 4 +- 4 files changed, 211 insertions(+), 317 deletions(-) diff --git a/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx b/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx index 095ea44e3..0f735d644 100644 --- a/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx +++ b/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx @@ -1048,104 +1048,21 @@ function ExtremeWeather() { />
- - Read more about how the data was processed - {' '} - (see about "Climate Data Summaries" section).{' '} + {' '} -
  • - Climate summaries for the contiguous 48 states were derived - from data generated for the 4th National Climate Assessment. - These data were accessed from the{' '} - - Scenarios for the National Climate Assessment - {' '} - website. The 30-year mean values for 4 time periods - (historic, early-, mid-, and late-century) and two climate - scenarios (RCP 4.5 and 8.5) were derived from the{' '} - - Localized Constructed Analogs - {' '} - (LOCA) downscaled climate model ensembles, processed by the - Technical Support Unit at NOAA’s National Center for - Environmental Information. The netCDF data from the website - were summarized by county and census tract using the Zonal - Statistics as Table utility in ArcGIS Pro. The results were - joined into the corresponding geography polygons. A minimum, - maximum, and mean value for each variable was calculated. - This process was repeated for each time range and scenario. - In order to display the full range of projections from - individual climate models for each period, data originally - obtained from{' '} - - USGS THREDDS - {' '} - servers were accessed via the Regional Climate Center’s{' '} - - Applied Climate Information System - {' '} - (ACIS). This webservice facilitated processing of the raw - data values to obtain the climate hazard metrics available - in CMRA. -
  • -
  • - As LOCA was only generated for the contiguous 48 states (and - the District of Columbia), alternatives were used for Alaska - and Hawaii. In Alaska, the{' '} - - Bias Corrected Spatially Downscaled - {' '} - (BCSD) method was used. Data were accessed from{' '} - - USGS THREDDS servers - - . The same variables provided for LOCA were calculated from - BCSD ensemble means. However, only RCP 8.5 was available. - Minimum, maximum, and mean values for county and census - tracts were calculated in the same way as above. For Hawaii, - statistics for two summary geographies were accessed from - the U.S. Climate Resilience Toolkit’s{' '} - - Climate Explorer - - : Northern Islands (Honolulu County, Kauaʻi County) and - Southern Islands (Maui County, Hawai'i County). -
  • + {configFiles.data.extremeWeather.content.dataResources.items.map( + (item) => ( +
  • + ), + )} } /> @@ -1163,230 +1080,65 @@ function ExtremeWeather() { />
    - Read more about how waters, communities, and assets - are vulnerable to various extreme events, and how people are - learning to adapt and build resiliency. + {' '} - - Read more about how to adapt, mitigate, and build resiliency - to extreme events and climate change: - - - - Read more about how waters, infrastructure, and communities - are potentially vulnerable to extreme events and climate - change: - - + {configFiles.data.extremeWeather.content.vulnerabilityResources.sections.map( + (section) => ( + + + {section.description}: + +
      + {section.items.map((item) => ( +
    • + {item.link ? ( + + {item.label} + + ) : ( + item.label + )}{' '} + {item.extra ? ( + + ) : null} + {item.items && ( + + )} +
    • + ))} +
    +
    + ), + )} } /> @@ -2076,6 +1828,12 @@ const containerStyles = css` } `; +const contentStyles = css` + .paragraph-styles { + ${paragraphStyles} + } +`; + const countyLabelStyles = css` display: inline-block; font-size: 1rem; diff --git a/app/client/src/types/index.ts b/app/client/src/types/index.ts index cd17cb30f..9413c1205 100644 --- a/app/client/src/types/index.ts +++ b/app/client/src/types/index.ts @@ -244,6 +244,27 @@ export type ExtremeWeatherRow = { }; export type ExtremeWeatherConfig = { + content: { + dataResources: { + intro: string; + items: string[]; + }; + vulnerabilityResources: { + intro: string; + sections: Array<{ + description: string; + items: Array<{ + label: string; + link?: string; + extra?: string; + items?: Array<{ + label: string; + link: string; + }>; + }>; + }>; + }; + }; currentWeatherDefaults: ExtremeWeatherRow[]; echoLookups: { permitStatus: { [key: string]: string }; diff --git a/app/server/app/public/data/community/extreme-weather.json b/app/server/app/public/data/community/extreme-weather.json index 25e10f258..a99ab0323 100644 --- a/app/server/app/public/data/community/extreme-weather.json +++ b/app/server/app/public/data/community/extreme-weather.json @@ -871,5 +871,120 @@ "disabled": false, "layerId": "landCoverLayer" } - ] + ], + + "content": { + "dataResources": { + "intro": "Read more about how the data was processed (see about \"Climate Data Summaries\" section).", + "items": [ + "Climate summaries for the contiguous 48 states were derived from data generated for the 4th National Climate Assessment. These data were accessed from the Scenarios for the National Climate Assessment website. The 30-year mean values for 4 time periods (historic, early-, mid-, and late-century) and two climate scenarios (RCP 4.5 and 8.5) were derived from the Localized Constructed Analogs (LOCA) downscaled climate model ensembles, processed by the Technical Support Unit at NOAA’s National Center for Environmental Information. The netCDF data from the website were summarized by county and census tract using the Zonal Statistics as Table utility in ArcGIS Pro. The results were joined into the corresponding geography polygons. A minimum, maximum, and mean value for each variable was calculated. This process was repeated for each time range and scenario. In order to display the full range of projections from individual climate models for each period, data originally obtained from USGS THREDDS servers were accessed via the Regional Climate Center’s Applied Climate Information System (ACIS). This webservice facilitated processing of the raw data values to obtain the climate hazard metrics available in CMRA.", + "As LOCA was only generated for the contiguous 48 states (and the District of Columbia), alternatives were used for Alaska and Hawaii. In Alaska, the Bias Corrected Spatially Downscaled (BCSD) method was used. Data were accessed from USGS THREDDS servers. The same variables provided for LOCA were calculated from BCSD ensemble means. However, only RCP 8.5 was available. Minimum, maximum, and mean values for county and census tracts were calculated in the same way as above. For Hawaii, statistics for two summary geographies were accessed from the U.S. Climate Resilience Toolkit’s Climate Explorer: Northern Islands (Honolulu County, Kauaʻi County) and Southern Islands (Maui County, Hawai'i County)." + ] + }, + "vulnerabilityResources": { + "intro": "Read more about how waters, communities, and assets are vulnerable to various extreme events, and how people are learning to adapt and build resiliency.", + "sections": [ + { + "description": "Read more about how to adapt, mitigate, and build resiliency to extreme events and climate change", + "items": [ + { + "label": "Office of Water Climate Adaptation Implementation Plan", + "link": "https://www.epa.gov/climate-change-water-sector/office-water-climate-adaptation-implementation-plan", + "extra": "(see Climate Vulnerabilities of Water Resources, Communities, and Office of Water Programs section)" + }, + { + "label": "EPA Climate and Water Sector", + "link": "https://www.epa.gov/climate-change-water-sector" + }, + { + "label": "EPA funding for resiliency", + "link": "https://www.epa.gov/cwsrf/clean-water-state-revolving-fund-cwsrf-factsheets", + "items": [ + { + "label": "Funding Resilient Infrastructure and Communities with the Clean Water State Revolving Fund (PDF)", + "link": "https://www.epa.gov/sites/default/files/2021-01/documents/funding_resilient_infrastructure_and_communities_with_the_cwsrf.pdf" + }, + { + "label": "Funding Drought Resiliency Projects with the CWSRF (PDF)", + "link": "https://www.epa.gov/system/files/documents/2022-08/Funding Drought Resiliency Projects with the CWSRF.pdf" + }, + { + "label": "Funding Wildfire Resiliency, Mitigation, and Recovery Projects with the Clean Water and Drinking Water State Revolving Fund Programs (PDF)", + "link": "https://www.epa.gov/system/files/documents/2022-10/Funding Wildfire Resiliency, Mitigation, and Recovery Projects with the SRF.pdf" + }, + { + "label": "Increasing Climate Resilience and Mitigation with the Clean Water State Revolving Fund (CWSRF) and Water Infrastructure Finance and Innovation Act (WIFIA) Program (PDF)", + "link": "https://www.epa.gov/system/files/documents/2023-03/climate-resilience-and-mitigation-with-cwsrf-and-wifia.pdf" + } + ] + }, + { + "label": "Climate Adaptation and Drought", + "link": "https://www.epa.gov/arc-x/climate-adaptation-and-drought" + }, + { + "label": "Creating Resilient Water Utilities (CRWU)", + "link": "https://www.epa.gov/crwu" + } + ] + }, + { + "description": "Read more about how waters, infrastructure, and communities are potentially vulnerable to extreme events and climate change", + "items": [ + { + "label": "Water quality and quantity", + "items": [ + { + "label": "Climate Impacts on Water Quality", + "link": "https://www.epa.gov/arc-x/climate-impacts-water-quality#:~:text=Harmful%20Algal%20Blooms,-Develop%20models%20to&text=In%20many%20areas%2C%20increased%20water,due%20to%20extreme%20storm%20events" + }, + { + "label": "Water Quality & Climate Change Research", + "link": "https://www.epa.gov/climate-research/ecosystems-water-quality-climate-change-research#WaterQuality" + }, + { + "label": "Wildfires and Water Quality Research", + "link": "https://www.epa.gov/water-research/wildfires-and-water-quality-research" + }, + { + "label": "Understanding Climate Change Impacts on Water Resources", + "link": "https://www.epa.gov/watershedacademy/understanding-climate-change-impacts-water-resources-module" + } + ] + }, + { + "label": "Infrastructure", + "items": [ + { + "label": "Underground Storage Tanks and Flooding", + "link": "https://www.epa.gov/natural-disasters/flooding#:~:text=During%20a%20flood%2C%20underground%20storage,surface%20water%2C%20and%20groundwater%20contamination" + }, + { + "label": "Community Vulnerabilities to Contaminant Releases from Extreme Events", + "link": "https://www.epa.gov/eco-research/community-vulnerabilities-contaminant-releases-extreme-events" + }, + { + "label": "Wastewater systems, drinking water systems, and Combined Sewage Overflows (CSO's)", + "link": "https://www.epa.gov/arc-x/climate-impacts-water-utilities" + } + ] + }, + { + "label": "Communities", + "items": [ + { + "label": "Climate Equity", + "link": "https://www.epa.gov/climateimpacts/climate-equity#:~:text=Some%20communities%20experience%20disproportionate%20impacts,affected%20most%20by%20climate%20change" + }, + { + "label": "Water-Related Illnesses and Climate Change", + "link": "https://www.epa.gov/climateimpacts/climate-change-and-health-socially-vulnerable-people#water" + } + ] + } + ] + } + ] + } + } } diff --git a/app/server/app/public/data/dataPage.json b/app/server/app/public/data/dataPage.json index 59ef4ac5d..cd7acf1e2 100644 --- a/app/server/app/public/data/dataPage.json +++ b/app/server/app/public/data/dataPage.json @@ -144,14 +144,14 @@ "title": "Protected Areas" }, { - "description": "The Recovery Potential Screening (RPS) indicator library is a free, publicly available data library of watershed indicators to assist resource managers and other users with evaluating, comparing, and prioritizing watersheds for a user-defined purpose.", + "description": "The Restoration and Protection Screening (RPS) indicator library is a free, publicly available data library of watershed indicators to assist resource managers and other users with evaluating, comparing, and prioritizing watersheds for a user-defined purpose.", "extraContent": null, "id": "rps", "linkHref": "https://www.epa.gov/rps", "linkLabel": "RPS Data/System", "shortName": "RPS", "siteLocation": "Information from this database can be found on the Community page on the Protect tab under Watershed Health and Protection, Watershed Health Scores.", - "title": "Recovery Potential Screening (RPS)" + "title": "Restoration and Protection Screening (RPS)" }, { "description": "The Safe Drinking Water Information System (SDWIS) contains information on public water systems, including monitoring, enforcement, and violation data related to requirements established by the Safe Drinking Water Act (SDWA).", From bc21e5dbf430c0f0fbe16c775d9c7a565973ba82 Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold Date: Wed, 27 Nov 2024 16:30:45 -0500 Subject: [PATCH 2/7] HMW-854 Moved most upper content to config file --- .../pages/Community.Tabs.ExtremeWeather.tsx | 4 +- app/client/src/components/shared/Page.tsx | 38 +- app/client/src/config/communityConfig.tsx | 440 ++---------------- app/client/src/contexts/ConfigFiles.tsx | 3 + .../public/data/community/upper-content.json | 38 ++ app/server/app/server/routes/api.js | 26 +- 6 files changed, 128 insertions(+), 421 deletions(-) create mode 100644 app/server/app/public/data/community/upper-content.json diff --git a/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx b/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx index 0f735d644..59a8f12aa 100644 --- a/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx +++ b/app/client/src/components/pages/Community.Tabs.ExtremeWeather.tsx @@ -1059,8 +1059,8 @@ function ExtremeWeather() { text={
      {configFiles.data.extremeWeather.content.dataResources.items.map( - (item) => ( -
    • + (item, i) => ( +
    • ), )}
    diff --git a/app/client/src/components/shared/Page.tsx b/app/client/src/components/shared/Page.tsx index 3185f2e30..a9f26c70a 100644 --- a/app/client/src/components/shared/Page.tsx +++ b/app/client/src/components/shared/Page.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { createRoot } from 'react-dom/client'; -import type { Node } from 'react'; +import type { ReactNode } from 'react'; import { css } from '@emotion/react'; import { useNavigate } from 'react-router-dom'; import esriConfig from '@arcgis/core/config'; @@ -12,6 +12,7 @@ import DataContent from 'components/shared/DataContent'; import AboutContent from 'components/shared/AboutContent'; import EducatorsContent from 'components/shared/EducatorsContent'; import GlossaryPanel, { GlossaryTerm } from 'components/shared/GlossaryPanel'; +import ShowLessMore from 'components/shared/ShowLessMore'; // contexts import { useConfigFilesState } from 'contexts/ConfigFiles'; // utilities @@ -183,7 +184,7 @@ const subtitleStyles = css` `; type Props = { - children: Node; + children: ReactNode; }; function Page({ children }: Props) { @@ -315,15 +316,16 @@ function Page({ children }: Props) { useEffect(() => { if (pollInitialized) return; - // poll for rendering glossary terms from html + // poll for rendering glossary terms and collapsible text from html function poll() { const glossarySpans = document.querySelectorAll( 'span[data-glossary-term]', ); - glossarySpans.forEach((span) => { + (glossarySpans as NodeListOf).forEach((span) => { if ( !span.dataset.hasOwnProperty('glossaryTerm') || - !span.dataset.hasOwnProperty('term') + !span.dataset.hasOwnProperty('term') || + !span.dataset.term ) return; @@ -333,9 +335,33 @@ function Page({ children }: Props) { {span.innerText} , ); - span.parentNode.replaceChild(node, span); + span.parentNode?.replaceChild(node, span); }); + const showLessMores = document.querySelectorAll('[data-show-less-more]'); + (showLessMores as NodeListOf).forEach( + (el) => { + const node = document.createElement(el.localName); + const Container = el.localName; + createRoot(node).render( + + ) + } + />, + ); + el.parentNode?.replaceChild(node, el); + }, + ); + setTimeout(() => { poll(); }, 250); diff --git a/app/client/src/config/communityConfig.tsx b/app/client/src/config/communityConfig.tsx index 9675e2b89..1d9a354fb 100644 --- a/app/client/src/config/communityConfig.tsx +++ b/app/client/src/config/communityConfig.tsx @@ -1,5 +1,6 @@ /** @jsxImportSource @emotion/react */ +import { css } from '@emotion/react'; import React, { Fragment, useContext } from 'react'; // components import { GlossaryTerm } from 'components/shared/GlossaryPanel'; @@ -16,6 +17,7 @@ import ExtremeWeather from 'components/pages/Community.Tabs.ExtremeWeather'; import { DisclaimerModal } from 'components/shared/Modal'; import ShowLessMore from 'components/shared/ShowLessMore'; // contexts +import { useConfigFilesState } from 'contexts/ConfigFiles'; import { LocationSearchContext } from 'contexts/locationSearch'; // styles import { paragraphStyles } from 'styles'; @@ -31,73 +33,15 @@ import restoreIcon from 'images/restore.png'; import protectIcon from 'images/protect.png'; import extremeWeatherIcon from 'images/extreme-weather.png'; -function OverviewUpper() { - return ( - <> -

    Your Waters: What We Know

    - -

    - Waters in your community are connected within a local{' '} - watershed. The{' '} - dashed outline on the map shows your watershed. -

    - -

    - Water quality is monitored for physical, chemical and biological - factors. The monitoring results are assessed against EPA approved water - quality standards or thresholds. Water can be impaired, meaning it is - not able to be used for certain purposes. - -

    - - -

    - Users of this application should not rely on information relating to - environmental laws and regulations posted on this application. - Application users are solely responsible for ensuring that they are in - compliance with all relevant environmental laws and regulations. In - addition, EPA cannot attest to the accuracy of data provided by - organizations outside of the federal government. -

    -
    - - ); -} - -function SwimmingUpper() { - return ( - <> -

    - EPA, states, and tribes monitor and assess water quality to keep you - safe while swimming and playing in or on the water. - -

    +const upperContentStyles = css` + [data-show-less-more] { + display: none; + } - -

    - Users of this application should not rely on information relating to - environmental laws and regulations posted on this application. - Application users are solely responsible for ensuring that they are in - compliance with all relevant environmental laws and regulations. In - addition, EPA cannot attest to the accuracy of data provided by - organizations outside of the federal government. -

    -
    - - ); -} + .paragraph-styles { + ${paragraphStyles} + } +`; function EatingFishUpper() { const { watershed, fishingInfo, statesData } = useContext( @@ -173,335 +117,29 @@ function EatingFishUpper() { ); } -function AquaticLifeUpper() { - return ( - <> -

    - EPA, states, and tribes monitor and assess water quality to determine - the impact of impairments on plants and animals living in the water. -

    - -

    - Plants and animals depend on clean water. Impairments can affect the - quality of water, which can have adverse effects on plants and animals - living in the water. - -

    - - -

    - Users of this application should not rely on information relating to - environmental laws and regulations posted on this application. - Application users are solely responsible for ensuring that they are in - compliance with all relevant environmental laws and regulations. In - addition, EPA cannot attest to the accuracy of data provided by - organizations outside of the federal government. -

    -
    - - ); -} - -function DrinkingWaterUpper() { - return ( -

    - Drinking water comes from aquifers, streams, rivers, and lakes. - Approximately 150,000{' '} - - public water systems - {' '} - provide drinking water to most Americans. Under the Safe Drinking Water - Act, EPA sets standards for drinking water quality and with its partners - implements various technical and financial programs to ensure drinking - water safety. - -

    - ); -} - -function MonitoringUpper() { - return ( - <> -

    - Water is monitored by state, federal, tribal, and local agencies. - Universities, volunteers and others also help detect water quality - concerns. -

    - -

    - Explore the map and information below to find out about current and past - water conditions. - -

    - - -

    - The condition of a waterbody is dynamic and can change at any time, - and the information in How’s My Waterway should only be used for - general reference. This monitoring section only displays data that has - been shared with EPA and doesn’t represent all data collected on a - specific waterbody. For the most current data, refer to local or state - real-time water quality reports. -

    - -

    - Furthermore, users of this application should not rely on information - relating to environmental laws and regulations posted on this - application. Application users are solely responsible for ensuring - that they are in compliance with all relevant environmental laws and - regulations. In addition, EPA cannot attest to the accuracy of data - provided by organizations outside of the federal government. -

    -
    - - ); -} - -function ExtremeWeatherUpper() { - return ( - <> -
    - Explore potentially vulnerable waters, infrastructure, and communities - alongside information on current, historical, and potential future{' '} - extreme weather events (and associated events like - wildfires) and climate for the selected watershed and - county. Extreme events such as drought and flooding, caused by natural - phenomena or human activity, typically happen infrequently, vary from - normal conditions in severity or duration, and can have severe impacts - on natural and human systems. Changes in climate over many years may - impact the frequency, intensity, duration, and timing of extreme events - in certain areas. Explore the map and information below to learn more. - - - Extreme weather events impact both the quality and volume of - clean, safe water available for different uses such as drinking, - eating fish, recreation, and aquatic life. For example, intense - storms can increase pollution loads and accelerate erosion and - sedimentation, and drought dwindles water supplies, both of - which result in concentrated pollutant loads. Intense - rainstorms, flooding, drought, wildfire, and extreme - temperatures also stress and damage the operation of already - aging infrastructure and can disrupt or displace communities. - Here are examples of how extreme weather events and associated - environmental impacts can affect potentially vulnerable waters, - infrastructure, and communities:{' '} - - - Flooding: Heavy rainfall and intense storms can - cause flooding and damage critical infrastructure (e.g., sewer - systems and wastewater treatment facilities) and disrupt or - displace communities. During a flood, underground storage tank - (UST) systems may become displaced or damaged and release their - contents into the environment, causing soil, surface water, and - groundwater contamination. - - - - Drought: Climate change is projected to - intensify drought across much of the country. During a drought, - water utilities can face a loss of water supply and increased - demand from customers. Drought can reduce short term water - sources, such as reservoir or lake levels, or affect longer-term - storage, such as mountain snowpack. Drought can also increase - drinking water treatment costs by concentrating contaminates in - source waters and thereby diminishing source water quality (see:{' '} - - Climate Adaptation and Source Water Impacts - - ). - - - - Wildfire: Wildfire frequency, extent, and - intensity are projected to increase with higher temperatures and - drought conditions in parts of the United States. During active - burning, ash and contaminants associated with ash settle on - streams, lakes, and water reservoirs. Vegetation that holds soil - in place and retains water is burned away. In the aftermath of a - large wildfire, rainstorms flush vast quantities of ash, - sediment, nutrients and contaminants into streams, rivers, and - downstream reservoirs. The absence of vegetation in the - watershed can create conditions conducive to erosion and even - flooding, and naturally occurring and anthropogenic substances - can impact drinking water quality, discolor recreational waters, - and may potentially contribute to harmful algal blooms (see:{' '} - - Wildfires: How Do They Affect Our Water Supplies? - - ). - - - Extreme heat: In many areas, increased water - temperatures (linked to increasing air temperature) will cause - eutrophication and excess algal growth, which may reduce - drinking water quality (see:{' '} - - Climate Impacts on Water Quality - - ). - - - Extreme cold: Water and wastewater utilities - are vulnerable to extreme cold and winter storms. Freezing - temperatures and winter storms can damage pipes, restrict water - intakes, and disrupt water services to communities (see:{' '} - - Incident Action Checklist – Extreme Cold and Winter Storms - (PDF) - - ). - - - } - /> -
    - - -

    - The condition of a waterbody is dynamic and can change at any time, - and the information in How’s My Waterway should only be used for - general reference. This monitoring section only displays data that has - been shared with EPA and doesn’t represent all data collected on a - specific waterbody. For the most current data, refer to local or state - real-time water quality reports. -

    - -

    - Furthermore, users of this application should not rely on information - relating to environmental laws and regulations posted on this - application. Application users are solely responsible for ensuring - that they are in compliance with all relevant environmental laws and - regulations. In addition, EPA cannot attest to the accuracy of data - provided by organizations outside of the federal government. -

    -
    - - ); -} - -function IdentifiedIssuesUpper() { - return ( -

    - Waters can be impacted by a variety of impairments. Below you can see - impairments degrading certain uses of these waters and those dischargers - in{' '} - - significant violation - {' '} - of their permit. -

    - ); -} +function UpperContent({ tabKey }: { tabKey: string }) { + const { + data: { + upperContent: { + [tabKey]: { body, disclaimer }, + }, + }, + } = useConfigFilesState(); -function RestoreUpper() { return ( -

    - Efforts are underway to restore your community’s water through grants and - clean-up plans at the local, state, and federal level. View restoration - plans and EPA funded{' '} - - Nonpoint Source - {' '} - restoration projects. -

    - ); -} +
    +
    -function ProtectUpper() { - return ( -

    - You can help keep your water clean. Together we can protect water for - future generations. -

    + {disclaimer && ( + +
    + + )} +
    ); } @@ -510,7 +148,7 @@ const tabs = [ title: 'Overview', route: '/community/{urlSearch}/overview', icon: overviewIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -522,7 +160,7 @@ const tabs = [ title: 'Swimming', route: '/community/{urlSearch}/swimming', icon: swimmingIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -546,7 +184,7 @@ const tabs = [ title: 'Aquatic Life', route: '/community/{urlSearch}/aquatic-life', icon: aquaticLifeIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -558,7 +196,7 @@ const tabs = [ title: 'Drinking Water', route: '/community/{urlSearch}/drinking-water', icon: drinkingWaterIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: false, @@ -570,7 +208,7 @@ const tabs = [ title: 'Water Monitoring', route: '/community/{urlSearch}/monitoring', icon: monitoringIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -583,7 +221,7 @@ const tabs = [ title: 'Extreme Weather', route: '/community/{urlSearch}/extreme-weather', icon: extremeWeatherIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -596,7 +234,7 @@ const tabs = [ title: 'Identified Issues', route: '/community/{urlSearch}/identified-issues', icon: identifiedIssuesIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -608,7 +246,7 @@ const tabs = [ title: 'Restore', route: '/community/{urlSearch}/restore', icon: restoreIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, @@ -619,7 +257,7 @@ const tabs = [ title: 'Protect', route: '/community/{urlSearch}/protect', icon: protectIcon, - upper: , + upper: , lower: , layers: { boundariesLayer: true, diff --git a/app/client/src/contexts/ConfigFiles.tsx b/app/client/src/contexts/ConfigFiles.tsx index 2eaed8742..48ac1eca9 100644 --- a/app/client/src/contexts/ConfigFiles.tsx +++ b/app/client/src/contexts/ConfigFiles.tsx @@ -36,6 +36,9 @@ export type ConfigFiles = { services: ServicesData; stateNationalUses: any; surveyMapping: any; + upperContent: { + [key: string]: { body: string; disclaimer?: string }; + }; useFields: AttainsUseField[]; usgsStaParameters: any; waterTypeOptions: any; diff --git a/app/server/app/public/data/community/upper-content.json b/app/server/app/public/data/community/upper-content.json new file mode 100644 index 000000000..dfd7df448 --- /dev/null +++ b/app/server/app/public/data/community/upper-content.json @@ -0,0 +1,38 @@ +{ + "aquaticLife": { + "body": "

    EPA, states, and tribes monitor and assess water quality to determine the impact of impairments on plants and animals living in the water.

    Plants and animals depend on clean water. Impairments can affect the quality of water, which can have adverse effects on plants and animals living in the water. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + }, + "drinkingWater": { + "body": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety. Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " + }, + "eatingFish": { + "body": "", + "disclaimer": "" + }, + "extremeWeather": { + "body": "
    Explore potentially vulnerable waters, infrastructure, and communities alongside information on current, historical, and potential future extreme weather events (and associated events like wildfires) and climate for the selected watershed and county. Extreme events such as drought and flooding, caused by natural phenomena or human activity, typically happen infrequently, vary from normal conditions in severity or duration, and can have severe impacts on natural and human systems. Changes in climate over many years may impact the frequency, intensity, duration, and timing of extreme events in certain areas. Explore the map and information below to learn more.
    Extreme weather events impact both the quality and volume of clean, safe water available for different uses such as drinking, eating fish, recreation, and aquatic life. For example, intense storms can increase pollution loads and accelerate erosion and sedimentation, and drought dwindles water supplies, both of which result in concentrated pollutant loads. Intense rainstorms, flooding, drought, wildfire, and extreme temperatures also stress and damage the operation of already aging infrastructure and can disrupt or displace communities. Here are examples of how extreme weather events and associated environmental impacts can affect potentially vulnerable waters, infrastructure, and communities: Flooding: Heavy rainfall and intense storms can cause flooding and damage critical infrastructure (e.g., sewer systems and wastewater treatment facilities) and disrupt or displace communities. During a flood, underground storage tank (UST) systems may become displaced or damaged and release their contents into the environment, causing soil, surface water, and groundwater contamination. Drought: Climate change is projected to intensify drought across much of the country. During a drought, water utilities can face a loss of water supply and increased demand from customers. Drought can reduce short term water sources, such as reservoir or lake levels, or affect longer-term storage, such as mountain snowpack. Drought can also increase drinking water treatment costs by concentrating contaminates in source waters and thereby diminishing source water quality (see: Climate Adaptation and Source Water Impacts). Wildfire: Wildfire frequency, extent, and intensity are projected to increase with higher temperatures and drought conditions in parts of the United States. During active burning, ash and contaminants associated with ash settle on streams, lakes, and water reservoirs. Vegetation that holds soil in place and retains water is burned away. In the aftermath of a large wildfire, rainstorms flush vast quantities of ash, sediment, nutrients and contaminants into streams, rivers, and downstream reservoirs. The absence of vegetation in the watershed can create conditions conducive to erosion and even flooding, and naturally occurring and anthropogenic substances can impact drinking water quality, discolor recreational waters, and may potentially contribute to harmful algal blooms (see: Wildfires: How Do They Affect Our Water Supplies?). Extreme heat: In many areas, increased water temperatures (linked to increasing air temperature) will cause eutrophication and excess algal growth, which may reduce drinking water quality (see: Climate Impacts on Water Quality). Extreme cold: Water and wastewater utilities are vulnerable to extreme cold and winter storms. Freezing temperatures and winter storms can damage pipes, restrict water intakes, and disrupt water services to communities (see: Incident Action Checklist – Extreme Cold and Winter Storms (PDF)).
    ", + "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + }, + "identifiedIssues": { + "body": "

    Waters can be impacted by a variety of impairments. Below you can see impairments degrading certain uses of these waters and those dischargers in significant violation of their permit.

    " + }, + "monitoring": { + "body": "

    Water is monitored by state, federal, tribal, and local agencies. Universities, volunteers and others also help detect water quality concerns.

    Explore the map and information below to find out about current and past water conditions. We define current data as less than one week old, and everything else as past data. The water condition information shown here is estimated using satellite imagery, water quality sensors deployed in the waterbody, and many other diverse monitoring techniques including laboratory analyses.

    ", + "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + }, + "overview": { + "body": "

    Your Waters: What We Know

    Waters in your community are connected within a local watershed. The dashed outline on the map shows your watershed.

    Water quality is monitored for physical, chemical and biological factors. The monitoring results are assessed against EPA approved water quality standards or thresholds. Water can be impaired, meaning it is not able to be used for certain purposes. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + }, + "protect": { + "body": "

    You can help keep your water clean. Together we can protect water for future generations.

    " + }, + "restore": { + "body": "

    Efforts are underway to restore your community’s water through grants and clean-up plans at the local, state, and federal level. View restoration plans and EPA funded Nonpoint Source restoration projects.

    " + }, + "swimming": { + "body": "

    EPA, states, and tribes monitor and assess water quality to keep you safe while swimming and playing in or on the water. Water quality can change on very short notice. When deciding if it is safe to swim in a waterbody, refer to any local or state advisories. If available, refer to local or state real-time water quality reports.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + } +} diff --git a/app/server/app/server/routes/api.js b/app/server/app/server/routes/api.js index b5cfb97d4..bb0f13b1f 100644 --- a/app/server/app/server/routes/api.js +++ b/app/server/app/server/routes/api.js @@ -107,6 +107,7 @@ module.exports = function (app) { 'data/community/characteristicGroupMappings.json', 'data/community/cyan-metadata.json', 'data/community/extreme-weather.json', + 'data/community/upper-content.json', 'data/community/usgs-sta-parameters.json', 'data/config/layerProps.json', 'data/config/services.json', @@ -132,18 +133,19 @@ module.exports = function (app) { characteristicGroupMappings: data[7], cyanMetadata: data[8], extremeWeather: data[9], - usgsStaParameters: data[10], - layerProps: data[11], - services: data[12], - NARS: data[13], - notifications: data[14], - documentOrder: data[15], - reportStatusMapping: data[16], - stateNationalUses: data[17], - surveyMapping: data[18], - waterTypeOptions: data[19], - attainsTribeMapping: data[20], - wqxTribeMapping: data[21], + upperContent: data[10], + usgsStaParameters: data[11], + layerProps: data[12], + services: data[13], + NARS: data[14], + notifications: data[15], + documentOrder: data[16], + reportStatusMapping: data[17], + stateNationalUses: data[18], + surveyMapping: data[19], + waterTypeOptions: data[20], + attainsTribeMapping: data[21], + wqxTribeMapping: data[22], }; }, ); From 8ad3f99f6ab60de299563704b046d698cbf732a1 Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold Date: Mon, 2 Dec 2024 14:05:02 -0500 Subject: [PATCH 3/7] HMW-854 Moved Eating Fish tab to config --- app/client/index.html | 14 +- app/client/src/components/shared/Page.tsx | 27 +-- app/client/src/config/communityConfig.tsx | 171 ++++++++++-------- app/client/src/contexts/ConfigFiles.tsx | 2 +- .../public/data/community/upper-content.json | 31 ++-- 5 files changed, 123 insertions(+), 122 deletions(-) diff --git a/app/client/index.html b/app/client/index.html index 1ffda7844..c3d83d417 100644 --- a/app/client/index.html +++ b/app/client/index.html @@ -154,13 +154,15 @@ font-size: 0.91rem; } - .menu--main .menu__link, - .menu--main .menu__link:visited { - color: #fff; - } + @media all and (min-width: 55em) { + .menu--main .menu__link, + .menu--main .menu__link:visited { + color: #fff; + } - .menu--main .menu__link:hover:visited { - color: #005ea2; + .menu--main .menu__link:hover:visited { + color: #005ea2; + } } .site-logo__svg { diff --git a/app/client/src/components/shared/Page.tsx b/app/client/src/components/shared/Page.tsx index a9f26c70a..9c86046d6 100644 --- a/app/client/src/components/shared/Page.tsx +++ b/app/client/src/components/shared/Page.tsx @@ -12,7 +12,6 @@ import DataContent from 'components/shared/DataContent'; import AboutContent from 'components/shared/AboutContent'; import EducatorsContent from 'components/shared/EducatorsContent'; import GlossaryPanel, { GlossaryTerm } from 'components/shared/GlossaryPanel'; -import ShowLessMore from 'components/shared/ShowLessMore'; // contexts import { useConfigFilesState } from 'contexts/ConfigFiles'; // utilities @@ -316,7 +315,7 @@ function Page({ children }: Props) { useEffect(() => { if (pollInitialized) return; - // poll for rendering glossary terms and collapsible text from html + // poll for rendering glossary terms from html function poll() { const glossarySpans = document.querySelectorAll( 'span[data-glossary-term]', @@ -338,30 +337,6 @@ function Page({ children }: Props) { span.parentNode?.replaceChild(node, span); }); - const showLessMores = document.querySelectorAll('[data-show-less-more]'); - (showLessMores as NodeListOf).forEach( - (el) => { - const node = document.createElement(el.localName); - const Container = el.localName; - createRoot(node).render( - - ) - } - />, - ); - el.parentNode?.replaceChild(node, el); - }, - ); - setTimeout(() => { poll(); }, 250); diff --git a/app/client/src/config/communityConfig.tsx b/app/client/src/config/communityConfig.tsx index 1d9a354fb..2f62628b2 100644 --- a/app/client/src/config/communityConfig.tsx +++ b/app/client/src/config/communityConfig.tsx @@ -1,9 +1,9 @@ /** @jsxImportSource @emotion/react */ import { css } from '@emotion/react'; -import React, { Fragment, useContext } from 'react'; +import { Fragment, useContext, useRef } from 'react'; +import { createRoot, Root } from 'react-dom/client'; // components -import { GlossaryTerm } from 'components/shared/GlossaryPanel'; import Overview from 'components/pages/Community.Tabs.Overview'; import DrinkingWater from 'components/pages/Community.Tabs.DrinkingWater'; import Swimming from 'components/pages/Community.Tabs.Swimming'; @@ -19,8 +19,6 @@ import ShowLessMore from 'components/shared/ShowLessMore'; // contexts import { useConfigFilesState } from 'contexts/ConfigFiles'; import { LocationSearchContext } from 'contexts/locationSearch'; -// styles -import { paragraphStyles } from 'styles'; // images import overviewIcon from 'images/overview.png'; import drinkingWaterIcon from 'images/drinking-water.png'; @@ -32,103 +30,122 @@ import identifiedIssuesIcon from 'images/identified-issues.png'; import restoreIcon from 'images/restore.png'; import protectIcon from 'images/protect.png'; import extremeWeatherIcon from 'images/extreme-weather.png'; +// types +import type { MutableRefObject, RefCallback } from 'react'; + +const showLessMoreContainerStyles = css` + margin-bottom: 1.5em; + + &:last-child { + margin-bottom: 0; + } +`; const upperContentStyles = css` - [data-show-less-more] { - display: none; + & > * { + display: block; } - .paragraph-styles { - ${paragraphStyles} + .paragraph-list { + p { + padding-bottom: 0; + } + + ul { + padding-bottom: 1.5em; + } } `; function EatingFishUpper() { - const { watershed, fishingInfo, statesData } = useContext( - LocationSearchContext, - ); + const { fishingInfo, statesData } = useContext(LocationSearchContext); - return ( - <> -

    - EPA, states, and tribes monitor and assess water quality to determine if - fish and shellfish are safe to eat. -

    + const stateLinks = + fishingInfo.status === 'success' ? ( + <> + {fishingInfo.data.map((state, index) => { + let seperator = ', '; + if (index === 0) seperator = ''; + else if (index === fishingInfo.data.length - 1) seperator = ' and '; -

    - Eating fish and shellfish caught in impaired waters can pose health - risks. For the {watershed.name} watershed, be sure to look for - posted fish advisories or consult your local or state environmental - health department for{' '} - {fishingInfo.status === 'success' ? ( - <> - {fishingInfo.data.map((state, index) => { - let seperator = ', '; - if (index === 0) seperator = ''; - else if (index === fishingInfo.data.length - 1) - seperator = ' and '; + const matchedState = statesData.data.find((s) => { + return s.code === state.stateCode; + }); - const matchedState = statesData.data.find((s) => { - return s.code === state.stateCode; - }); + return ( + + {seperator} + + {matchedState ? matchedState.name : state.stateCode} + + + ); + })} + .{' '} + + EXIT + + + ) : ( + <>your state. + ); - return ( - - {seperator} - - {matchedState ? matchedState.name : state.stateCode} - - - ); - })} - .{' '} - - EXIT - - - ) : ( - <>your state. - )} - -

    + const stateLinksRoot = useRef(null); - -

    - Users of this application should not rely on information relating to - environmental laws and regulations posted on this application. - Application users are solely responsible for ensuring that they are in - compliance with all relevant environmental laws and regulations. In - addition, EPA cannot attest to the accuracy of data provided by - organizations outside of the federal government. -

    -
    - - ); + const introRef = (node: HTMLDivElement | null) => { + if (!node) return; + + const stateLinksSpan = node.querySelector('span#eating-fish-state-links'); + if (!stateLinksSpan) return; + + if (!stateLinksRoot.current) { + stateLinksRoot.current = createRoot(stateLinksSpan); + } + stateLinksRoot.current.render(stateLinks); + }; + + return ; } -function UpperContent({ tabKey }: { tabKey: string }) { +function UpperContent({ + introRef, + tabKey, +}: { + introRef?: + | RefCallback + | MutableRefObject; + tabKey: string; +}) { const { data: { upperContent: { - [tabKey]: { body, disclaimer }, + [tabKey]: { intro, disclaimer, more }, }, }, } = useConfigFilesState(); return (
    -
    +
    + + {more && ( +
    + + } + /> +
    + )} {disclaimer && ( diff --git a/app/client/src/contexts/ConfigFiles.tsx b/app/client/src/contexts/ConfigFiles.tsx index 48ac1eca9..46c94cb63 100644 --- a/app/client/src/contexts/ConfigFiles.tsx +++ b/app/client/src/contexts/ConfigFiles.tsx @@ -37,7 +37,7 @@ export type ConfigFiles = { stateNationalUses: any; surveyMapping: any; upperContent: { - [key: string]: { body: string; disclaimer?: string }; + [key: string]: { intro: string; disclaimer?: string; more?: string }; }; useFields: AttainsUseField[]; usgsStaParameters: any; diff --git a/app/server/app/public/data/community/upper-content.json b/app/server/app/public/data/community/upper-content.json index dfd7df448..b6267475e 100644 --- a/app/server/app/public/data/community/upper-content.json +++ b/app/server/app/public/data/community/upper-content.json @@ -1,38 +1,45 @@ { "aquaticLife": { - "body": "

    EPA, states, and tribes monitor and assess water quality to determine the impact of impairments on plants and animals living in the water.

    Plants and animals depend on clean water. Impairments can affect the quality of water, which can have adverse effects on plants and animals living in the water. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", - "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " + "intro": "

    EPA, states, and tribes monitor and assess water quality to determine the impact of impairments on plants and animals living in the water.

    Plants and animals depend on clean water. Impairments can affect the quality of water, which can have adverse effects on plants and animals living in the water.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    ", + "more": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    " }, "drinkingWater": { - "body": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety. Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " + "intro": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety.

    ", + "more": "

    Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " }, "eatingFish": { - "body": "", - "disclaimer": "" + "intro": "

    EPA, states, and tribes monitor and assess water quality to determine if fish and shellfish are safe to eat.

    Eating fish and shellfish caught in impaired waters can pose health risks. For this watershed, be sure to look for posted fish advisories or consult your local or state environmental health department for

    ", + "more": "

    The information in How’s My Waterway about the safety of eating fish caught recreationally should only be considered as general reference. Please consult with your state for local or state-wide fish advisories.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "extremeWeather": { - "body": "
    Explore potentially vulnerable waters, infrastructure, and communities alongside information on current, historical, and potential future extreme weather events (and associated events like wildfires) and climate for the selected watershed and county. Extreme events such as drought and flooding, caused by natural phenomena or human activity, typically happen infrequently, vary from normal conditions in severity or duration, and can have severe impacts on natural and human systems. Changes in climate over many years may impact the frequency, intensity, duration, and timing of extreme events in certain areas. Explore the map and information below to learn more.
    Extreme weather events impact both the quality and volume of clean, safe water available for different uses such as drinking, eating fish, recreation, and aquatic life. For example, intense storms can increase pollution loads and accelerate erosion and sedimentation, and drought dwindles water supplies, both of which result in concentrated pollutant loads. Intense rainstorms, flooding, drought, wildfire, and extreme temperatures also stress and damage the operation of already aging infrastructure and can disrupt or displace communities. Here are examples of how extreme weather events and associated environmental impacts can affect potentially vulnerable waters, infrastructure, and communities: Flooding: Heavy rainfall and intense storms can cause flooding and damage critical infrastructure (e.g., sewer systems and wastewater treatment facilities) and disrupt or displace communities. During a flood, underground storage tank (UST) systems may become displaced or damaged and release their contents into the environment, causing soil, surface water, and groundwater contamination. Drought: Climate change is projected to intensify drought across much of the country. During a drought, water utilities can face a loss of water supply and increased demand from customers. Drought can reduce short term water sources, such as reservoir or lake levels, or affect longer-term storage, such as mountain snowpack. Drought can also increase drinking water treatment costs by concentrating contaminates in source waters and thereby diminishing source water quality (see: Climate Adaptation and Source Water Impacts). Wildfire: Wildfire frequency, extent, and intensity are projected to increase with higher temperatures and drought conditions in parts of the United States. During active burning, ash and contaminants associated with ash settle on streams, lakes, and water reservoirs. Vegetation that holds soil in place and retains water is burned away. In the aftermath of a large wildfire, rainstorms flush vast quantities of ash, sediment, nutrients and contaminants into streams, rivers, and downstream reservoirs. The absence of vegetation in the watershed can create conditions conducive to erosion and even flooding, and naturally occurring and anthropogenic substances can impact drinking water quality, discolor recreational waters, and may potentially contribute to harmful algal blooms (see: Wildfires: How Do They Affect Our Water Supplies?). Extreme heat: In many areas, increased water temperatures (linked to increasing air temperature) will cause eutrophication and excess algal growth, which may reduce drinking water quality (see: Climate Impacts on Water Quality). Extreme cold: Water and wastewater utilities are vulnerable to extreme cold and winter storms. Freezing temperatures and winter storms can damage pipes, restrict water intakes, and disrupt water services to communities (see: Incident Action Checklist – Extreme Cold and Winter Storms (PDF)).
    ", + "intro": "

    Explore potentially vulnerable waters, infrastructure, and communities alongside information on current, historical, and potential future extreme weather events (and associated events like wildfires) and climate for the selected watershed and county. Extreme events such as drought and flooding, caused by natural phenomena or human activity, typically happen infrequently, vary from normal conditions in severity or duration, and can have severe impacts on natural and human systems. Changes in climate over many years may impact the frequency, intensity, duration, and timing of extreme events in certain areas. Explore the map and information below to learn more.

    ", + "more": "

    Extreme weather events impact both the quality and volume of clean, safe water available for different uses such as drinking, eating fish, recreation, and aquatic life. For example, intense storms can increase pollution loads and accelerate erosion and sedimentation, and drought dwindles water supplies, both of which result in concentrated pollutant loads. Intense rainstorms, flooding, drought, wildfire, and extreme temperatures also stress and damage the operation of already aging infrastructure and can disrupt or displace communities. Here are examples of how extreme weather events and associated environmental impacts can affect potentially vulnerable waters, infrastructure, and communities:

    Flooding: Heavy rainfall and intense storms can cause flooding and damage critical infrastructure (e.g., sewer systems and wastewater treatment facilities) and disrupt or displace communities. During a flood, underground storage tank (UST) systems may become displaced or damaged and release their contents into the environment, causing soil, surface water, and groundwater contamination.

    Drought: Climate change is projected to intensify drought across much of the country. During a drought, water utilities can face a loss of water supply and increased demand from customers. Drought can reduce short term water sources, such as reservoir or lake levels, or affect longer-term storage, such as mountain snowpack. Drought can also increase drinking water treatment costs by concentrating contaminates in source waters and thereby diminishing source water quality (see: Climate Adaptation and Source Water Impacts).

    Wildfire: Wildfire frequency, extent, and intensity are projected to increase with higher temperatures and drought conditions in parts of the United States. During active burning, ash and contaminants associated with ash settle on streams, lakes, and water reservoirs. Vegetation that holds soil in place and retains water is burned away. In the aftermath of a large wildfire, rainstorms flush vast quantities of ash, sediment, nutrients and contaminants into streams, rivers, and downstream reservoirs. The absence of vegetation in the watershed can create conditions conducive to erosion and even flooding, and naturally occurring and anthropogenic substances can impact drinking water quality, discolor recreational waters, and may potentially contribute to harmful algal blooms (see: Wildfires: How Do They Affect Our Water Supplies?).

    Extreme heat: In many areas, increased water temperatures (linked to increasing air temperature) will cause eutrophication and excess algal growth, which may reduce drinking water quality (see: Climate Impacts on Water Quality).

    Extreme cold: Water and wastewater utilities are vulnerable to extreme cold and winter storms. Freezing temperatures and winter storms can damage pipes, restrict water intakes, and disrupt water services to communities (see: Incident Action Checklist – Extreme Cold and Winter Storms (PDF)).

    ", "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "identifiedIssues": { - "body": "

    Waters can be impacted by a variety of impairments. Below you can see impairments degrading certain uses of these waters and those dischargers in significant violation of their permit.

    " + "intro": "

    Waters can be impacted by a variety of impairments. Below you can see impairments degrading certain uses of these waters and those dischargers in significant violation of their permit.

    " }, "monitoring": { - "body": "

    Water is monitored by state, federal, tribal, and local agencies. Universities, volunteers and others also help detect water quality concerns.

    Explore the map and information below to find out about current and past water conditions. We define current data as less than one week old, and everything else as past data. The water condition information shown here is estimated using satellite imagery, water quality sensors deployed in the waterbody, and many other diverse monitoring techniques including laboratory analyses.

    ", + "intro": "

    Water is monitored by state, federal, tribal, and local agencies. Universities, volunteers and others also help detect water quality concerns.

    Explore the map and information below to find out about current and past water conditions.

    ", + "more": "

    We define current data as less than one week old, and everything else as past data. The water condition information shown here is estimated using satellite imagery, water quality sensors deployed in the waterbody, and many other diverse monitoring techniques including laboratory analyses.

    ", "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "overview": { - "body": "

    Your Waters: What We Know

    Waters in your community are connected within a local watershed. The dashed outline on the map shows your watershed.

    Water quality is monitored for physical, chemical and biological factors. The monitoring results are assessed against EPA approved water quality standards or thresholds. Water can be impaired, meaning it is not able to be used for certain purposes. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", + "intro": "

    Your Waters: What We Know

    Waters in your community are connected within a local watershed. The dashed outline on the map shows your watershed.

    Water quality is monitored for physical, chemical and biological factors. The monitoring results are assessed against EPA approved water quality standards or thresholds. Water can be impaired, meaning it is not able to be used for certain purposes.

    ", + "more": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "protect": { - "body": "

    You can help keep your water clean. Together we can protect water for future generations.

    " + "intro": "

    You can help keep your water clean. Together we can protect water for future generations.

    " }, "restore": { - "body": "

    Efforts are underway to restore your community’s water through grants and clean-up plans at the local, state, and federal level. View restoration plans and EPA funded Nonpoint Source restoration projects.

    " + "intro": "

    Efforts are underway to restore your community’s water through grants and clean-up plans at the local, state, and federal level. View restoration plans and EPA funded Nonpoint Source restoration projects.

    " }, "swimming": { - "body": "

    EPA, states, and tribes monitor and assess water quality to keep you safe while swimming and playing in or on the water. Water quality can change on very short notice. When deciding if it is safe to swim in a waterbody, refer to any local or state advisories. If available, refer to local or state real-time water quality reports.

    ", + "intro": "

    EPA, states, and tribes monitor and assess water quality to keep you safe while swimming and playing in or on the water.

    ", + "more": "

    Water quality can change on very short notice. When deciding if it is safe to swim in a waterbody, refer to any local or state advisories. If available, refer to local or state real-time water quality reports.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " } } From 7ce88d3a30549218171983a5f7f6d1b52d9c9d7f Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold Date: Mon, 2 Dec 2024 15:54:54 -0500 Subject: [PATCH 4/7] HMW-854 Updated logic to allow for inline expandable text --- app/client/src/components/shared/Modal.tsx | 3 ++ app/client/src/components/shared/Page.tsx | 27 +++++++++- app/client/src/config/communityConfig.tsx | 49 ++++++++----------- app/client/src/contexts/ConfigFiles.tsx | 2 +- .../public/data/community/upper-content.json | 29 +++++------ 5 files changed, 61 insertions(+), 49 deletions(-) diff --git a/app/client/src/components/shared/Modal.tsx b/app/client/src/components/shared/Modal.tsx index 89d7de064..af2db7f4d 100644 --- a/app/client/src/components/shared/Modal.tsx +++ b/app/client/src/components/shared/Modal.tsx @@ -7,6 +7,8 @@ import * as Dialog from '@radix-ui/react-dialog'; import type { ReactNode } from 'react'; // styles import { colors, iconButtonStyles } from 'styles/index'; +// types +import type { SerializedStyles } from '@emotion/react'; const buttonContainerStyles = css` margin-top: 15px; @@ -233,6 +235,7 @@ export default function Modal({ type DisclaimerProps = { children: ReactNode; + css?: SerializedStyles; infoIcon?: boolean; }; diff --git a/app/client/src/components/shared/Page.tsx b/app/client/src/components/shared/Page.tsx index 9c86046d6..a9f26c70a 100644 --- a/app/client/src/components/shared/Page.tsx +++ b/app/client/src/components/shared/Page.tsx @@ -12,6 +12,7 @@ import DataContent from 'components/shared/DataContent'; import AboutContent from 'components/shared/AboutContent'; import EducatorsContent from 'components/shared/EducatorsContent'; import GlossaryPanel, { GlossaryTerm } from 'components/shared/GlossaryPanel'; +import ShowLessMore from 'components/shared/ShowLessMore'; // contexts import { useConfigFilesState } from 'contexts/ConfigFiles'; // utilities @@ -315,7 +316,7 @@ function Page({ children }: Props) { useEffect(() => { if (pollInitialized) return; - // poll for rendering glossary terms from html + // poll for rendering glossary terms and collapsible text from html function poll() { const glossarySpans = document.querySelectorAll( 'span[data-glossary-term]', @@ -337,6 +338,30 @@ function Page({ children }: Props) { span.parentNode?.replaceChild(node, span); }); + const showLessMores = document.querySelectorAll('[data-show-less-more]'); + (showLessMores as NodeListOf).forEach( + (el) => { + const node = document.createElement(el.localName); + const Container = el.localName; + createRoot(node).render( + + ) + } + />, + ); + el.parentNode?.replaceChild(node, el); + }, + ); + setTimeout(() => { poll(); }, 250); diff --git a/app/client/src/config/communityConfig.tsx b/app/client/src/config/communityConfig.tsx index 2f62628b2..ffde359b4 100644 --- a/app/client/src/config/communityConfig.tsx +++ b/app/client/src/config/communityConfig.tsx @@ -33,12 +33,8 @@ import extremeWeatherIcon from 'images/extreme-weather.png'; // types import type { MutableRefObject, RefCallback } from 'react'; -const showLessMoreContainerStyles = css` - margin-bottom: 1.5em; - - &:last-child { - margin-bottom: 0; - } +const disclaimerStyles = css` + margin-top: 1.5em; `; const upperContentStyles = css` @@ -46,13 +42,22 @@ const upperContentStyles = css` display: block; } + p { + padding-bottom: 0; + margin-bottom: 1.5em; + } + + [data-show-less-more] { + display: none; + } + .paragraph-list { p { - padding-bottom: 0; + margin-bottom: 0; } ul { - padding-bottom: 1.5em; + margin-bottom: 1.5em; } } `; @@ -97,7 +102,7 @@ function EatingFishUpper() { const stateLinksRoot = useRef(null); - const introRef = (node: HTMLDivElement | null) => { + const bodyRef = (node: HTMLDivElement | null) => { if (!node) return; const stateLinksSpan = node.querySelector('span#eating-fish-state-links'); @@ -109,14 +114,14 @@ function EatingFishUpper() { stateLinksRoot.current.render(stateLinks); }; - return ; + return ; } function UpperContent({ - introRef, + bodyRef, tabKey, }: { - introRef?: + bodyRef?: | RefCallback | MutableRefObject; tabKey: string; @@ -124,31 +129,17 @@ function UpperContent({ const { data: { upperContent: { - [tabKey]: { intro, disclaimer, more }, + [tabKey]: { body, disclaimer }, }, }, } = useConfigFilesState(); return (
    -
    - - {more && ( -
    - - } - /> -
    - )} +
    {disclaimer && ( - +
    EPA, states, and tribes monitor and assess water quality to determine the impact of impairments on plants and animals living in the water.

    Plants and animals depend on clean water. Impairments can affect the quality of water, which can have adverse effects on plants and animals living in the water.

    ", - "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    ", - "more": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    " + "body": "

    EPA, states, and tribes monitor and assess water quality to determine the impact of impairments on plants and animals living in the water.

    Plants and animals depend on clean water. Impairments can affect the quality of water, which can have adverse effects on plants and animals living in the water. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", + "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "drinkingWater": { - "intro": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety.

    ", - "more": "

    Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " + "body": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety. Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " }, "eatingFish": { - "intro": "

    EPA, states, and tribes monitor and assess water quality to determine if fish and shellfish are safe to eat.

    Eating fish and shellfish caught in impaired waters can pose health risks. For this watershed, be sure to look for posted fish advisories or consult your local or state environmental health department for

    ", - "more": "

    The information in How’s My Waterway about the safety of eating fish caught recreationally should only be considered as general reference. Please consult with your state for local or state-wide fish advisories.

    ", + "body": "

    EPA, states, and tribes monitor and assess water quality to determine if fish and shellfish are safe to eat.

    Eating fish and shellfish caught in impaired waters can pose health risks. For this watershed, be sure to look for posted fish advisories or consult your local or state environmental health department for The information in How’s My Waterway about the safety of eating fish caught recreationally should only be considered as general reference. Please consult with your state for local or state-wide fish advisories.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "extremeWeather": { - "intro": "

    Explore potentially vulnerable waters, infrastructure, and communities alongside information on current, historical, and potential future extreme weather events (and associated events like wildfires) and climate for the selected watershed and county. Extreme events such as drought and flooding, caused by natural phenomena or human activity, typically happen infrequently, vary from normal conditions in severity or duration, and can have severe impacts on natural and human systems. Changes in climate over many years may impact the frequency, intensity, duration, and timing of extreme events in certain areas. Explore the map and information below to learn more.

    ", - "more": "

    Extreme weather events impact both the quality and volume of clean, safe water available for different uses such as drinking, eating fish, recreation, and aquatic life. For example, intense storms can increase pollution loads and accelerate erosion and sedimentation, and drought dwindles water supplies, both of which result in concentrated pollutant loads. Intense rainstorms, flooding, drought, wildfire, and extreme temperatures also stress and damage the operation of already aging infrastructure and can disrupt or displace communities. Here are examples of how extreme weather events and associated environmental impacts can affect potentially vulnerable waters, infrastructure, and communities:

    Flooding: Heavy rainfall and intense storms can cause flooding and damage critical infrastructure (e.g., sewer systems and wastewater treatment facilities) and disrupt or displace communities. During a flood, underground storage tank (UST) systems may become displaced or damaged and release their contents into the environment, causing soil, surface water, and groundwater contamination.

    Drought: Climate change is projected to intensify drought across much of the country. During a drought, water utilities can face a loss of water supply and increased demand from customers. Drought can reduce short term water sources, such as reservoir or lake levels, or affect longer-term storage, such as mountain snowpack. Drought can also increase drinking water treatment costs by concentrating contaminates in source waters and thereby diminishing source water quality (see: Climate Adaptation and Source Water Impacts).

    Wildfire: Wildfire frequency, extent, and intensity are projected to increase with higher temperatures and drought conditions in parts of the United States. During active burning, ash and contaminants associated with ash settle on streams, lakes, and water reservoirs. Vegetation that holds soil in place and retains water is burned away. In the aftermath of a large wildfire, rainstorms flush vast quantities of ash, sediment, nutrients and contaminants into streams, rivers, and downstream reservoirs. The absence of vegetation in the watershed can create conditions conducive to erosion and even flooding, and naturally occurring and anthropogenic substances can impact drinking water quality, discolor recreational waters, and may potentially contribute to harmful algal blooms (see: Wildfires: How Do They Affect Our Water Supplies?).

    Extreme heat: In many areas, increased water temperatures (linked to increasing air temperature) will cause eutrophication and excess algal growth, which may reduce drinking water quality (see: Climate Impacts on Water Quality).

    Extreme cold: Water and wastewater utilities are vulnerable to extreme cold and winter storms. Freezing temperatures and winter storms can damage pipes, restrict water intakes, and disrupt water services to communities (see: Incident Action Checklist – Extreme Cold and Winter Storms (PDF)).

    ", + "body": "

    Explore potentially vulnerable waters, infrastructure, and communities alongside information on current, historical, and potential future extreme weather events (and associated events like wildfires) and climate for the selected watershed and county. Extreme events such as drought and flooding, caused by natural phenomena or human activity, typically happen infrequently, vary from normal conditions in severity or duration, and can have severe impacts on natural and human systems. Changes in climate over many years may impact the frequency, intensity, duration, and timing of extreme events in certain areas. Explore the map and information below to learn more.

    Extreme weather events impact both the quality and volume of clean, safe water available for different uses such as drinking, eating fish, recreation, and aquatic life. For example, intense storms can increase pollution loads and accelerate erosion and sedimentation, and drought dwindles water supplies, both of which result in concentrated pollutant loads. Intense rainstorms, flooding, drought, wildfire, and extreme temperatures also stress and damage the operation of already aging infrastructure and can disrupt or displace communities. Here are examples of how extreme weather events and associated environmental impacts can affect potentially vulnerable waters, infrastructure, and communities:

    Flooding: Heavy rainfall and intense storms can cause flooding and damage critical infrastructure (e.g., sewer systems and wastewater treatment facilities) and disrupt or displace communities. During a flood, underground storage tank (UST) systems may become displaced or damaged and release their contents into the environment, causing soil, surface water, and groundwater contamination.

    Drought: Climate change is projected to intensify drought across much of the country. During a drought, water utilities can face a loss of water supply and increased demand from customers. Drought can reduce short term water sources, such as reservoir or lake levels, or affect longer-term storage, such as mountain snowpack. Drought can also increase drinking water treatment costs by concentrating contaminates in source waters and thereby diminishing source water quality (see: Climate Adaptation and Source Water Impacts).

    Wildfire: Wildfire frequency, extent, and intensity are projected to increase with higher temperatures and drought conditions in parts of the United States. During active burning, ash and contaminants associated with ash settle on streams, lakes, and water reservoirs. Vegetation that holds soil in place and retains water is burned away. In the aftermath of a large wildfire, rainstorms flush vast quantities of ash, sediment, nutrients and contaminants into streams, rivers, and downstream reservoirs. The absence of vegetation in the watershed can create conditions conducive to erosion and even flooding, and naturally occurring and anthropogenic substances can impact drinking water quality, discolor recreational waters, and may potentially contribute to harmful algal blooms (see: Wildfires: How Do They Affect Our Water Supplies?).

    Extreme heat: In many areas, increased water temperatures (linked to increasing air temperature) will cause eutrophication and excess algal growth, which may reduce drinking water quality (see: Climate Impacts on Water Quality).

    Extreme cold: Water and wastewater utilities are vulnerable to extreme cold and winter storms. Freezing temperatures and winter storms can damage pipes, restrict water intakes, and disrupt water services to communities (see: Incident Action Checklist – Extreme Cold and Winter Storms (PDF)).

    ", "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "identifiedIssues": { - "intro": "

    Waters can be impacted by a variety of impairments. Below you can see impairments degrading certain uses of these waters and those dischargers in significant violation of their permit.

    " + "body": "

    Waters can be impacted by a variety of impairments. Below you can see impairments degrading certain uses of these waters and those dischargers in significant violation of their permit.

    " }, "monitoring": { - "intro": "

    Water is monitored by state, federal, tribal, and local agencies. Universities, volunteers and others also help detect water quality concerns.

    Explore the map and information below to find out about current and past water conditions.

    ", - "more": "

    We define current data as less than one week old, and everything else as past data. The water condition information shown here is estimated using satellite imagery, water quality sensors deployed in the waterbody, and many other diverse monitoring techniques including laboratory analyses.

    ", + "body": "

    Water is monitored by state, federal, tribal, and local agencies. Universities, volunteers and others also help detect water quality concerns.

    Explore the map and information below to find out about current and past water conditions. We define current data as less than one week old, and everything else as past data. The water condition information shown here is estimated using satellite imagery, water quality sensors deployed in the waterbody, and many other diverse monitoring techniques including laboratory analyses.

    ", "disclaimer": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. This monitoring section only displays data that has been shared with EPA and doesn’t represent all data collected on a specific waterbody. For the most current data, refer to local or state real-time water quality reports.

    Furthermore, users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "overview": { - "intro": "

    Your Waters: What We Know

    Waters in your community are connected within a local watershed. The dashed outline on the map shows your watershed.

    Water quality is monitored for physical, chemical and biological factors. The monitoring results are assessed against EPA approved water quality standards or thresholds. Water can be impaired, meaning it is not able to be used for certain purposes.

    ", - "more": "

    The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", + "body": "

    Your Waters: What We Know

    Waters in your community are connected within a local watershed. The dashed outline on the map shows your watershed.

    Water quality is monitored for physical, chemical and biological factors. The monitoring results are assessed against EPA approved water quality standards or thresholds. Water can be impaired, meaning it is not able to be used for certain purposes. The condition of a waterbody is dynamic and can change at any time, and the information in How’s My Waterway should only be used for general reference. If available, refer to local or state real-time water quality reports.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "protect": { - "intro": "

    You can help keep your water clean. Together we can protect water for future generations.

    " + "body": "

    You can help keep your water clean. Together we can protect water for future generations.

    " }, "restore": { - "intro": "

    Efforts are underway to restore your community’s water through grants and clean-up plans at the local, state, and federal level. View restoration plans and EPA funded Nonpoint Source restoration projects.

    " + "body": "

    Efforts are underway to restore your community’s water through grants and clean-up plans at the local, state, and federal level. View restoration plans and EPA funded Nonpoint Source restoration projects.

    " }, "swimming": { - "intro": "

    EPA, states, and tribes monitor and assess water quality to keep you safe while swimming and playing in or on the water.

    ", - "more": "

    Water quality can change on very short notice. When deciding if it is safe to swim in a waterbody, refer to any local or state advisories. If available, refer to local or state real-time water quality reports.

    ", + "body": "

    EPA, states, and tribes monitor and assess water quality to keep you safe while swimming and playing in or on the water. Water quality can change on very short notice. When deciding if it is safe to swim in a waterbody, refer to any local or state advisories. If available, refer to local or state real-time water quality reports.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " } } From 49085bf8d5319e847d1e59c925c35ef976988aee Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold Date: Mon, 2 Dec 2024 16:07:31 -0500 Subject: [PATCH 5/7] HMW-854 Adjusted some spacing --- app/client/src/config/communityConfig.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/client/src/config/communityConfig.tsx b/app/client/src/config/communityConfig.tsx index ffde359b4..b0cc6c1de 100644 --- a/app/client/src/config/communityConfig.tsx +++ b/app/client/src/config/communityConfig.tsx @@ -15,7 +15,6 @@ import Restore from 'components/pages/Community.Tabs.Restore'; import Protect from 'components/pages/Community.Tabs.Protect'; import ExtremeWeather from 'components/pages/Community.Tabs.ExtremeWeather'; import { DisclaimerModal } from 'components/shared/Modal'; -import ShowLessMore from 'components/shared/ShowLessMore'; // contexts import { useConfigFilesState } from 'contexts/ConfigFiles'; import { LocationSearchContext } from 'contexts/locationSearch'; @@ -33,13 +32,9 @@ import extremeWeatherIcon from 'images/extreme-weather.png'; // types import type { MutableRefObject, RefCallback } from 'react'; -const disclaimerStyles = css` - margin-top: 1.5em; -`; - const upperContentStyles = css` - & > * { - display: block; + div:first-of-type { + margin-bottom: 1.5em; } p { @@ -139,7 +134,7 @@ function UpperContent({
    {disclaimer && ( - +
    Date: Mon, 2 Dec 2024 22:33:50 -0500 Subject: [PATCH 6/7] Propagated EPA template fix to 404 & 500 pages --- app/server/app/public/404.html | 14 ++++++++------ app/server/app/public/500.html | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/server/app/public/404.html b/app/server/app/public/404.html index 801d2df1b..b67f81209 100644 --- a/app/server/app/public/404.html +++ b/app/server/app/public/404.html @@ -176,13 +176,15 @@ font-size: 0.91rem; } - .menu--main .menu__link, - .menu--main .menu__link:visited { - color: #fff; - } + @media all and (min-width: 55em) { + .menu--main .menu__link, + .menu--main .menu__link:visited { + color: #fff; + } - .menu--main .menu__link:hover:visited { - color: #005ea2; + .menu--main .menu__link:hover:visited { + color: #005ea2; + } } .site-logo__svg { diff --git a/app/server/app/public/500.html b/app/server/app/public/500.html index 39d9fd804..ea86da9e8 100644 --- a/app/server/app/public/500.html +++ b/app/server/app/public/500.html @@ -179,13 +179,15 @@ font-size: 0.91rem; } - .menu--main .menu__link, - .menu--main .menu__link:visited { - color: #fff; - } + @media all and (min-width: 55em) { + .menu--main .menu__link, + .menu--main .menu__link:visited { + color: #fff; + } - .menu--main .menu__link:hover:visited { - color: #005ea2; + .menu--main .menu__link:hover:visited { + color: #005ea2; + } } .site-logo__svg { From b6af1ee01beb3eb785f986d818197a1af661ee35 Mon Sep 17 00:00:00 2001 From: Jon Maxwell Diebold <104089016+maxdiebold-erg@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:38:04 -0500 Subject: [PATCH 7/7] HMW-854 Fixed issue in Eating Fish upper content Co-authored-by: Caleb Schwind <46329268+cschwinderg@users.noreply.github.com> --- app/server/app/public/data/community/upper-content.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/app/public/data/community/upper-content.json b/app/server/app/public/data/community/upper-content.json index 23a013c9c..70bbb21dd 100644 --- a/app/server/app/public/data/community/upper-content.json +++ b/app/server/app/public/data/community/upper-content.json @@ -7,7 +7,7 @@ "body": "

    Drinking water comes from aquifers, streams, rivers, and lakes. Approximately 150,000 public water systems provide drinking water to most Americans. Under the Safe Drinking Water Act, EPA sets standards for drinking water quality and with its partners implements various technical and financial programs to ensure drinking water safety. Drinking water quality is based on water that has been treated to ensure it is ready for human consumption which differs from raw water in streams and reservoirs.

    " }, "eatingFish": { - "body": "

    EPA, states, and tribes monitor and assess water quality to determine if fish and shellfish are safe to eat.

    Eating fish and shellfish caught in impaired waters can pose health risks. For this watershed, be sure to look for posted fish advisories or consult your local or state environmental health department for The information in How’s My Waterway about the safety of eating fish caught recreationally should only be considered as general reference. Please consult with your state for local or state-wide fish advisories.

    ", + "body": "

    EPA, states, and tribes monitor and assess water quality to determine if fish and shellfish are safe to eat.

    Eating fish and shellfish caught in impaired waters can pose health risks. For this watershed, be sure to look for posted fish advisories or consult your local or state environmental health department for The information in How’s My Waterway about the safety of eating fish caught recreationally should only be considered as general reference. Please consult with your state for local or state-wide fish advisories.

    ", "disclaimer": "

    Users of this application should not rely on information relating to environmental laws and regulations posted on this application. Application users are solely responsible for ensuring that they are in compliance with all relevant environmental laws and regulations. In addition, EPA cannot attest to the accuracy of data provided by organizations outside of the federal government.

    " }, "extremeWeather": {