Skip to content

Commit 0f208d6

Browse files
authored
chore: Sync main to production (#298)
2 parents fb9d2d3 + 2ce1c1d commit 0f208d6

File tree

6 files changed

+34
-23
lines changed

6 files changed

+34
-23
lines changed

.github/workflows/deploy-urban.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ jobs:
5555
5656
# Check for required variables
5757
[ -z "${{ secrets.REACT_APP_MAPBOX_ACCESS_TOKEN }}" ] && missing_vars+=("secrets.REACT_APP_MAPBOX_ACCESS_TOKEN")
58-
[ -z "${{ secrets.REACT_APP_MAPBOX_STYLE_URL }}" ] && missing_vars+=("secrets.REACT_APP_MAPBOX_STYLE_URL")
5958
[ -z "${{ vars.REACT_APP_BASE_PATH_URBAN }}" ] && missing_vars+=("vars.REACT_APP_BASE_PATH_URBAN")
6059
[ -z "${{ secrets.DEPLOYMENT_ROLE_ARN }}" ] && missing_vars+=("secrets.DEPLOYMENT_ROLE_ARN")
6160
[ -z "${{ secrets.CF_DISTRIBUTION_ID }}" ] && missing_vars+=("secrets.CF_DISTRIBUTION_ID")
61+
[ -z "${{ vars.REACT_APP_GRAPES_DATASET_PAGE_URL }}" ] && missing_vars+=("vars.REACT_APP_GRAPES_DATASET_PAGE_URL")
62+
[ -z "${{ vars.REACT_APP_VULCAN_DATASET_PAGE_URL }}" ] && missing_vars+=("vars.REACT_APP_VULCAN_DATASET_PAGE_URL")
6263
6364
# If any variables are missing, print them and exit with an error
6465
if [ ${#missing_vars[@]} -ne 0 ]; then
@@ -73,10 +74,10 @@ jobs:
7374
working-directory: ./urban-dashboard
7475
env:
7576
REACT_APP_MAPBOX_TOKEN: ${{ secrets.REACT_APP_MAPBOX_ACCESS_TOKEN }}
76-
REACT_APP_MAPBOX_STYLE_URL: ${{ secrets.REACT_APP_MAPBOX_STYLE_URL }}
7777
REACT_APP_BASE_PATH: ${{ vars.REACT_APP_BASE_PATH_URBAN }}
7878
PUBLIC_URL: ${{ vars.REACT_APP_BASE_PATH_URBAN }}
79-
REACT_APP_BASEMAP_STYLES_MAPBOX_ID: ${{ secrets.REACT_APP_BASEMAP_STYLES_MAPBOX_ID}}
79+
REACT_APP_GRAPES_DATASET_PAGE_URL: ${{ vars.REACT_APP_GRAPES_DATASET_PAGE_URL }}
80+
REACT_APP_VULCAN_DATASET_PAGE_URL: ${{ vars.REACT_APP_VULCAN_DATASET_PAGE_URL }}
8081
run: |
8182
yarn
8283
yarn build

.github/workflows/pr-preview.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ jobs:
136136
[ -z "${{ secrets.REACT_APP_MAPBOX_ACCESS_TOKEN }}" ] && missing_vars+=("secrets.REACT_APP_MAPBOX_TOKEN")
137137
[ -z "${{ secrets.REACT_APP_MAPBOX_STYLE_URL }}" ] && missing_vars+=("secrets.REACT_APP_MAPBOX_STYLE_URL")
138138
[ -z "${{ vars.REACT_APP_BASE_PATH_URBAN }}" ] && missing_vars+=("vars.REACT_APP_BASE_PATH_URBAN")
139+
[ -z "${{ vars.REACT_APP_GRAPES_DATASET_PAGE_URL }}" ] && missing_vars+=("vars.REACT_APP_GRAPES_DATASET_PAGE_URL")
140+
[ -z "${{ vars.REACT_APP_VULCAN_DATASET_PAGE_URL }}" ] && missing_vars+=("vars.REACT_APP_VULCAN_DATASET_PAGE_URL")
139141
# If any variables are missing, print them and exit with an error
140142
if [ ${#missing_vars[@]} -ne 0 ]; then
141143
echo "Error: The following required variables are missing:"
@@ -215,6 +217,8 @@ jobs:
215217
echo REACT_APP_BASEMAP_STYLES_MAPBOX_ID="${{ secrets.REACT_APP_BASEMAP_STYLES_MAPBOX_ID }}" >> ./urban-dashboard/.env
216218
echo REACT_APP_BASE_PATH="${{ vars.REACT_APP_BASE_PATH_URBAN }}/${{ env.PR_STRING }}" >> ./urban-dashboard/.env
217219
echo PUBLIC_URL="${{ vars.REACT_APP_BASE_PATH_URBAN }}/${{ env.PR_STRING }}" >> ./urban-dashboard/.env
220+
echo REACT_APP_GRAPES_DATASET_PAGE_URL="${{ vars.REACT_APP_GRAPES_DATASET_PAGE_URL }}" >> ./urban-dashboard/.env
221+
echo REACT_APP_VULCAN_DATASET_PAGE_URL="${{ vars.REACT_APP_VULCAN_DATASET_PAGE_URL }}" >> ./urban-dashboard/.env
218222
cd ./urban-dashboard
219223
set -a; source .env; set +a
220224
yarn
@@ -272,6 +276,7 @@ jobs:
272276
aws s3 rm s3://${{ env.S3_BUCKET }}${{ vars.PUBLIC_URL_NOAA }}/${{ env.PR_STRING }}/ --recursive
273277
aws s3 rm s3://${{ env.S3_BUCKET }}${{ vars.PUBLIC_URL_NIST }}/${{ env.PR_STRING }}/ --recursive
274278
aws s3 rm s3://${{ env.S3_BUCKET }}${{ vars.PUBLIC_URL_GOES }}/${{ env.PR_STRING }}/ --recursive
279+
aws s3 rm s3://${{ env.S3_BUCKET }}${{ vars.REACT_APP_BASE_PATH_URBAN }}/${{ env.PR_STRING }}/ --recursive
275280
276281
- name: Remove PR comment
277282
run: |

noaa-cpfp-point/script.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ document.addEventListener("DOMContentLoaded", () => {
1313
container: "map",
1414
style: "mapbox://styles/mapbox/satellite-v9",
1515
center: [-98.585522, 1.8333333], // Centered on the US
16-
zoom: 2,
17-
projection: 'equirectangular'
16+
zoom: 2
1817
});
1918

2019
// Parse query parameters from the URL

urban-dashboard/.env.local-sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
REACT_APP_MAPBOX_TOKEN='xxxxxxxxxx'
2-
REACT_APP_MAPBOX_STYLE_URL='mapbox://styles/xxxxxxxxx'
32
PUBLIC_URL='xxxxxxx'
43
REACT_APP_BASEMAP_STYLES_MAPBOX_ID='xxxxxxx'
54
REACT_APP_DATA_URL='xxxxxxx'

urban-dashboard/src/components/cards/dataset.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function Grap2pesDatasetCard() {
2222

2323
<p>
2424
{description}
25-
<a target="opener" href="https://earth.gov/ghgcenter/data-catalog/gra2pes-ghg-monthgrid-v1"> Click here for more details.</a>
25+
<a target="opener" href={process.env.REACT_APP_GRAPES_DATASET_PAGE_URL}> Click here for more details.</a>
2626
</p>
2727
</div>
2828
)
@@ -39,7 +39,7 @@ export function VulcanDatasetCard() {
3939
</Typography>
4040
<p>
4141
{description}
42-
<a target="opener" href="https://earth.gov/ghgcenter/data-catalog/vulcan-ffco2-yeargrid-v4"> Click here for more details.</a>
42+
<a target="opener" href={process.env.REACT_APP_VULCAN_DATASET_PAGE_URL}> Click here for more details.</a>
4343
</p>
4444
</div>
4545
)

urban-dashboard/src/components/dataInsights/index.jsx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "chart.js";
1313

1414
import { Line, Pie } from "react-chartjs-2";
15-
import { Typography, Grid, Box } from "@mui/material";
15+
import { Typography, Grid, Box, Tooltip as MuiTooltip } from "@mui/material";
1616
import "./index.css";
1717
import { getVulcanData, getGra2pesData } from './helper/index'
1818
import { useConfig } from "../../context/configContext";
@@ -312,36 +312,43 @@ const GasEmissionsBySectorCard = ({ selection }) => {
312312

313313
const Legend = () => {
314314
return (
315-
<Grid container spacing={0.3}>
315+
<Grid container spacing={0.5}>
316316
{LegendItems.map((item, index) => (
317317
<Grid
318318
item
319-
xs={4}
319+
xs={6}
320+
sm={4}
320321
key={index}
321322
container
322323
direction="row"
323324
alignItems="center"
325+
wrap="nowrap"
324326
>
325327
<Box
326328
sx={{
327329
width: 21,
328330
height: 21,
331+
minWidth: 21,
332+
minHeight: 21,
329333
backgroundColor: item.color,
330334
marginRight: 1,
331335
}}
332336
/>
333-
<Typography
334-
sx={{
335-
fontSize: "14px",
336-
color: "#3d4551",
337-
whiteSpace: "normal",
338-
overflowWrap: "break-word",
339-
maxWidth: "100px",
340-
wordBreak: "break-word",
341-
}}
342-
>
343-
{item.label}
344-
</Typography>
337+
<MuiTooltip title={item.label.length > 12 ? item.label : ""} arrow placement="top">
338+
<Typography
339+
sx={{
340+
fontSize: "11px",
341+
color: "#1B2631",
342+
whiteSpace: "nowrap",
343+
overflow: "hidden",
344+
textOverflow: "ellipsis",
345+
maxWidth: "88px",
346+
fontFamily: "Inter"
347+
}}
348+
>
349+
{item.label}
350+
</Typography>
351+
</MuiTooltip>
345352
</Grid>
346353
))}
347354
</Grid>

0 commit comments

Comments
 (0)