diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac7025..22cc062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v0.18.0 (2024-03-06) + +* Prevent sub-region collection selector options from line breaking. +* Display uniform titles for maps and plots. +* Update citation text for maps and plots. + + # v0.17.0 (2024-03-06) * Display sensor/platform/algorithm in variable selectors. diff --git a/src/components/ControlPanel/RegionSelector/SubRegionExplorer/SubRegionCollectionSelector/index.tsx b/src/components/ControlPanel/RegionSelector/SubRegionExplorer/SubRegionCollectionSelector/index.tsx index 1b63d69..6452f74 100644 --- a/src/components/ControlPanel/RegionSelector/SubRegionExplorer/SubRegionCollectionSelector/index.tsx +++ b/src/components/ControlPanel/RegionSelector/SubRegionExplorer/SubRegionCollectionSelector/index.tsx @@ -69,7 +69,7 @@ const SubRegionCollectionSelector: React.FC = (pro return ( <> -
+
{subRegionCollectionOptions}
{ diff --git a/src/components/MainWindow/LinePlot.tsx b/src/components/MainWindow/LinePlot.tsx index fb418bf..249809b 100644 --- a/src/components/MainWindow/LinePlot.tsx +++ b/src/components/MainWindow/LinePlot.tsx @@ -52,7 +52,6 @@ const LinePlot: React.FC = (props) => { ); } - const chartTitle = `${regionLongname} - ${varLongname}`; const yAxisTitle = props.selectedSatelliteVariable.labelPlotYaxis; // WARNING: It is _critical_ that the data is copied before passing to @@ -137,11 +136,9 @@ const LinePlot: React.FC = (props) => { }, ]; - const ytdSeriesLastNonNullPoint = ytdSeries.filter(p => p[1] !== null).slice(-1)[0]; - const ytdSeriesLastDate = new Date(ytdSeriesLastNonNullPoint[0]); const chartOptions: Highcharts.Options = { chart: { - height: '95%', + height: '88%', type: 'line', }, accessibility: { @@ -149,12 +146,7 @@ const LinePlot: React.FC = (props) => { description: `${varLongname} plotted over the current water year.`, }, title: { - text: chartTitle, - style: {fontSize: '20px'}, - }, - subtitle: { - text: `As of ${ytdSeriesLastDate.toISOString().split('T')[0]}`, - style: {fontSize: '16px'}, + text: undefined, }, tooltip: { shared: true, diff --git a/src/components/MainWindow/Tile.tsx b/src/components/MainWindow/Tile.tsx index aa84296..878f5ac 100644 --- a/src/components/MainWindow/Tile.tsx +++ b/src/components/MainWindow/Tile.tsx @@ -68,11 +68,25 @@ const Tile: React.FC = (props) => { FallbackComponent={ErrorFallbackTileComponent} resetKeys={[selectedTileType, selectedRegion, selectedSatelliteVariableId]} > +
+

{selectedTileType === "map" ? selectedSatelliteVariable.longName : selectedSatelliteVariable.longNamePlot}

+

{selectedRegion.longName} as of {selectedSatelliteVariable.lastDateWithData}

+

+ Climatology calculated over{' '} + {selectedSatelliteVariable.historicWaterYearRange[0]} + {' '}to{' '} + {selectedSatelliteVariable.historicWaterYearRange[1]} +

+
+ }> {content} +
{CITATION} +
+ {`Data source: ${selectedSatelliteVariable.sensor}/${selectedSatelliteVariable.platform}/${selectedSatelliteVariable.algorithm}`}
diff --git a/src/constants/citation.ts b/src/constants/citation.ts index afaef21..5e778f4 100644 --- a/src/constants/citation.ts +++ b/src/constants/citation.ts @@ -1,5 +1,7 @@ -export const CITATION = ( - 'Rittger, K., Brodzik, M.J., & Raleigh, M. (2022).' - + ' Snow Today. Boulder, Colorado USA.' - + ' National Snow and Ice Data Center.' -); +const authors = "Rittger, K., Lenard, S.J.P., Palomaki, R.T."; +const year = (new Date()).getFullYear(); +const projectText = "Snow Today" +const locationText = "Boulder, Colorado USA"; +const orgText = "National Snow and Ice Data Center"; + +export const CITATION = `${authors} (${year}). ${projectText}. ${locationText}. ${orgText}.`; diff --git a/src/style/SubRegionCollectionSelector.css b/src/style/SubRegionCollectionSelector.css index e2313ca..8930002 100644 --- a/src/style/SubRegionCollectionSelector.css +++ b/src/style/SubRegionCollectionSelector.css @@ -1,5 +1,6 @@ #SubRegionCollectionSelector { white-space: nowrap; + width: min-content; } .sub-region-collection-option { display: inline-block; diff --git a/src/style/Tile.css b/src/style/Tile.css index 8e76445..b70f039 100644 --- a/src/style/Tile.css +++ b/src/style/Tile.css @@ -10,11 +10,28 @@ flex-direction: column; } +.tile-title h1, .tile-title h2, .tile-title h3 { + text-align: center; + line-height: 1em; + margin: 0; +} +.tile-title h1 { + font-size: 1.5em; +} +.tile-title h2 { + font-size: 1.3em; +} +.tile-title h3 { + font-size: 1em; +} + .tile-citation { font-size: 14px; - background: white; + line-height: 1em; + text-align: center; } +/* TODO: Remove? */ .tile-message { margin: 20px; }