Skip to content

Commit 0ff73bd

Browse files
Merge branch 'develop'
2 parents 8d43a13 + 0419f1d commit 0ff73bd

78 files changed

Lines changed: 3214 additions & 1709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
<script src="/matomo.js"></script>
4343
</head>
4444
<body>
45-
<noscript>You need to enable JavaScript to run this app.</noscript>
45+
<noscript aria-label="JavaScript disabled notification">
46+
<p>You need to enable JavaScript to use this application.</p>
47+
<p>If you cannot enable JavaScript, please contact support for assistance.</p>
48+
</noscript>
4649
<div id="root"></div>
4750
<script type="module" src="/src/main.tsx"></script>
4851
<!--

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@
1919
"@mui/material": "^5.15.19",
2020
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
2121
"@mui/styled-engine-sc": "^5.14.12",
22-
"@storybook/addon-themes": "^8.1.2",
2322
"@types/react-router-hash-link": "^2.4.9",
2423
"@types/tabulator-tables": "^5.7.0",
2524
"@vitejs/plugin-react": "^4.7.0",
26-
"axios": "^1.13.2",
25+
"axios": "^1.13.5",
2726
"detect-it": "^4.0.1",
2827
"dom-to-image": "^2.6.0",
2928
"dotenv": "^16.4.6",
3029
"easy-peasy": "^6.1.0",
3130
"echarts": "^5.5.0",
32-
"jspdf": "^4.0.0",
33-
"lodash": "^4.17.21",
31+
"jspdf": "^4.2.1",
32+
"lodash": "^4.17.23",
3433
"p-limit": "^6.2.0",
3534
"react": "^18.3.1",
3635
"react-csv": "^2.2.2",
@@ -51,6 +50,7 @@
5150
"@storybook/addon-interactions": "^8.1.2",
5251
"@storybook/addon-links": "^8.1.2",
5352
"@storybook/addon-onboarding": "^8.1.2",
53+
"@storybook/addon-themes": "^8.1.2",
5454
"@storybook/blocks": "^8.1.2",
5555
"@storybook/preset-create-react-app": "^8.1.2",
5656
"@storybook/react": "^8.1.2",
@@ -85,7 +85,7 @@
8585
"husky": "^9.0.11",
8686
"prettier": "^3.2.5",
8787
"prop-types": "^15.8.1",
88-
"storybook": "^8.6.15",
88+
"storybook": "^8.6.17",
8989
"storybook-addon-remix-react-router": "^3.1.0",
9090
"tsx": "^4.7.0",
9191
"typescript-eslint": "^8.38.0",
@@ -136,4 +136,4 @@
136136
"@semantic-release/github"
137137
]
138138
}
139-
}
139+
}
353 KB
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

src/app/components/chart-block/components/button-toolbar/data.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import Button from "@mui/material/Button";
44
import CloseIcon from "@mui/icons-material/Close";
55
import Typography from "@mui/material/Typography";
66
import IconButton from "@mui/material/IconButton";
7+
import { useCMSData } from "app/hooks/useCMSData";
78
import { exportChart } from "app/utils/exportChart";
9+
import { getCMSDataField } from "app/utils/getCMSDataField";
810

911
export type InfoPanelType =
1012
| "global"
@@ -95,6 +97,8 @@ export const DownloadPanel: React.FC<ChartBlockButtonToolbarProps> = (
9597
export const SharePanel: React.FC<ChartBlockButtonToolbarProps> = (
9698
props: ChartBlockButtonToolbarProps,
9799
) => {
100+
const cmsData = useCMSData({ returnData: true });
101+
98102
const [feedbackMessage, setFeedbackMessage] = React.useState<string | null>(
99103
null,
100104
);
@@ -155,7 +159,13 @@ export const SharePanel: React.FC<ChartBlockButtonToolbarProps> = (
155159
Embed code
156160
</Button>
157161
</Tooltip> */}
158-
<Button onClick={handleButtonClick("link")}>Share link</Button>
162+
<Button onClick={handleButtonClick("link")}>
163+
{getCMSDataField(
164+
cmsData,
165+
"general.chartSectionShareLinkButtonLabel",
166+
"Share link",
167+
)}
168+
</Button>
159169
</React.Fragment>
160170
)}
161171
</React.Fragment>

src/app/components/chart-block/components/button-toolbar/index.tsx

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { appColors } from "app/theme";
44
import Divider from "@mui/material/Divider";
55
import Tooltip from "@mui/material/Tooltip";
66
import IconButton from "@mui/material/IconButton";
7+
import { useCMSData } from "app/hooks/useCMSData";
8+
import { getCMSDataField } from "app/utils/getCMSDataField";
79
import ClickAwayListener from "@mui/material/ClickAwayListener";
810
import InfoIcon from "app/assets/vectors/Info_GreyBG.svg?react";
911
import ShareIcon from "app/assets/vectors/Share_GreyBG.svg?react";
@@ -19,6 +21,8 @@ import {
1921
export const ChartBlockButtonToolbar: React.FC<ChartBlockButtonToolbarProps> = (
2022
props: ChartBlockButtonToolbarProps,
2123
) => {
24+
const cmsData = useCMSData({ returnData: true });
25+
2226
const [active, setActive] = React.useState<
2327
"download" | "share" | "favorite" | "info" | null
2428
>(null);
@@ -79,21 +83,13 @@ export const ChartBlockButtonToolbar: React.FC<ChartBlockButtonToolbarProps> = (
7983
height: "35px",
8084
borderRadius: "4px",
8185
background: "transparent",
82-
border: "1px solid #DFE3E5",
86+
border: "1px solid #98A1AA",
8387
"&:hover": {
84-
background: "#000000",
85-
borderColor: "#000000",
86-
svg: {
87-
filter: "invert(1)",
88-
},
88+
background: "#F8F9FA",
8989
},
9090
},
9191
"#active": {
92-
background: "#000000",
93-
borderColor: "#000000",
94-
svg: {
95-
filter: "invert(1)",
96-
},
92+
background: "#F8F9FA",
9793
},
9894
}}
9995
>
@@ -144,9 +140,13 @@ export const ChartBlockButtonToolbar: React.FC<ChartBlockButtonToolbarProps> = (
144140
</React.Fragment>
145141
)}
146142
<Tooltip
147-
title="Info"
148143
data-cy="chart-info-button"
149144
onClick={handleButtonClick("info")}
145+
title={getCMSDataField(
146+
cmsData,
147+
"general.chartSectionInfoButtonTooltip",
148+
"Info",
149+
)}
150150
>
151151
<IconButton id={active === "info" ? "active" : ""}>
152152
<InfoIcon />
@@ -155,15 +155,27 @@ export const ChartBlockButtonToolbar: React.FC<ChartBlockButtonToolbarProps> = (
155155
{active === "info" && (
156156
<InfoPanel close={handleClose} type={props.infoType} />
157157
)}
158-
<Tooltip title="Share">
158+
<Tooltip
159+
title={getCMSDataField(
160+
cmsData,
161+
"general.chartSectionShareButtonTooltip",
162+
"Share",
163+
)}
164+
>
159165
<IconButton
160166
onClick={handleButtonClick("share")}
161167
id={active === "share" ? "active" : ""}
162168
>
163169
<ShareIcon />
164170
</IconButton>
165171
</Tooltip>
166-
<Tooltip title="Download">
172+
<Tooltip
173+
title={getCMSDataField(
174+
cmsData,
175+
"general.chartSectionDownloadButtonTooltip",
176+
"Download",
177+
)}
178+
>
167179
<IconButton
168180
onClick={handleButtonClick("download")}
169181
id={active === "info" ? "download" : ""}

src/app/components/chart-block/components/cycles/index.tsx

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ import find from "lodash/find";
33
import Box from "@mui/material/Box";
44
import { appColors } from "app/theme";
55
import Button from "@mui/material/Button";
6-
import { ChartBlockCyclesProps } from "app/components/chart-block/components/cycles/data";
76
import CheckboxIcon from "app/assets/vectors/Checkbox_notchecked.svg?react";
87
import CheckboxCheckedIcon from "app/assets/vectors/Checkbox_checked_2.svg?react";
8+
import { ChartBlockCyclesProps } from "app/components/chart-block/components/cycles/data";
9+
import { useCMSData } from "app/hooks/useCMSData";
10+
import { getCMSDataField } from "app/utils/getCMSDataField";
911

1012
export const ChartBlockCycles: React.FC<ChartBlockCyclesProps> = (
1113
props: ChartBlockCyclesProps,
1214
) => {
15+
const cmsData = useCMSData({ returnData: true });
16+
const allCycleOption = getCMSDataField(
17+
cmsData,
18+
"pagesHome.allCycleOption",
19+
"All",
20+
);
21+
1322
const handleCycleClick = (cycle: { name: string; value: string }) => () => {
1423
props.handleCycleChange(cycle);
1524
};
@@ -30,16 +39,14 @@ export const ChartBlockCycles: React.FC<ChartBlockCyclesProps> = (
3039
padding: "9px 12px",
3140
borderRadius: "4px",
3241
textTransform: "none",
33-
border: "1px solid #DFE3E5",
42+
border: `1px solid ${appColors.CHART_BLOCK_CYCLES.BUTTON_BORDER_COLOR}`,
3443
color: appColors.CHART_BLOCK_CYCLES.BUTTON_TEXT_COLOR,
3544
"&:hover": {
36-
borderColor:
37-
appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_BACKGROUND_COLOR,
3845
color: appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_TEXT_COLOR,
3946
background:
40-
appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_BACKGROUND_COLOR,
47+
appColors.CHART_BLOCK_CYCLES.BUTTON_HOVER_BACKGROUND_COLOR,
4148
path: {
42-
fill: appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_TEXT_COLOR,
49+
fill: "#3154F4",
4350
},
4451
},
4552
},
@@ -51,17 +58,14 @@ export const ChartBlockCycles: React.FC<ChartBlockCyclesProps> = (
5158
style={
5259
props.selectedCycles.length === 0
5360
? {
54-
fontWeight: "700",
55-
borderColor:
56-
appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_BACKGROUND_COLOR,
5761
color: appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_TEXT_COLOR,
5862
background:
5963
appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_BACKGROUND_COLOR,
6064
}
6165
: {}
6266
}
6367
>
64-
All
68+
{allCycleOption}
6569
</Button>
6670
)}
6771
{props.cycles.map((cycle) => {
@@ -80,10 +84,6 @@ export const ChartBlockCycles: React.FC<ChartBlockCyclesProps> = (
8084
style={
8185
selected
8286
? {
83-
fontWeight: "700",
84-
borderColor:
85-
appColors.CHART_BLOCK_CYCLES
86-
.BUTTON_ACTIVE_BACKGROUND_COLOR,
8787
color:
8888
appColors.CHART_BLOCK_CYCLES.BUTTON_ACTIVE_TEXT_COLOR,
8989
background:
@@ -92,6 +92,15 @@ export const ChartBlockCycles: React.FC<ChartBlockCyclesProps> = (
9292
}
9393
: {}
9494
}
95+
sx={
96+
selected
97+
? {
98+
path: {
99+
fill: "#3154F4",
100+
},
101+
}
102+
: {}
103+
}
95104
>
96105
{cycle.name.replace(" - ", "-")}
97106
</Button>

src/app/components/charts/heatmap/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export function Heatmap(props: HeatmapProps) {
345345
: `calc((100% - 112px) / ${flatVisibleColumns.length})`,
346346
minWidth: props.itemWidth
347347
? `${props.itemWidth}px`
348-
: "105px",
348+
: "135px",
349349
}}
350350
>
351351
{column.name}
@@ -380,6 +380,7 @@ export function Heatmap(props: HeatmapProps) {
380380
>
381381
{row.children ? (
382382
<IconButton
383+
aria-label={`${row.expanded ? "Collapse" : "Expand"} ${row.name} row`}
383384
sx={{
384385
padding: "4px",
385386
transform: `rotate(${row.expanded ? -90 : 90}deg)`,
@@ -448,7 +449,7 @@ export function Heatmap(props: HeatmapProps) {
448449
: `calc((100% - 112px) / ${flatVisibleColumns.length})`,
449450
minWidth: props.itemWidth
450451
? `${props.itemWidth}px`
451-
: "105px",
452+
: "135px",
452453
}}
453454
>
454455
{value}

0 commit comments

Comments
 (0)