refactor(client): centralise monospace font through the theme

Add a fontFamilyMonospace token to theme.typography (ui-monospace stack with sensible fallbacks) and route the four ad-hoc fontFamily="monospace" call sites through it so the project has one source of truth.
This commit is contained in:
gorkem-bwl authored and Alex Holliday committed 2026-04-27 10:52:23 -07:00
1 parent 1dff917027
commit 7a0da57663
4 files changed
+12 -6

No files matched your search

@@ -34,7 +34,7 @@ export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
<Typography <Typography
fontSize={typographyLevels.l} fontSize={typographyLevels.l}
fontWeight={"bolder"} fontWeight={"bolder"}
fontFamily={"monospace"} fontFamily={theme.typography.fontFamilyMonospace}
overflow={"hidden"} overflow={"hidden"}
textOverflow={"ellipsis"} textOverflow={"ellipsis"}
whiteSpace={"nowrap"} whiteSpace={"nowrap"}
@@ -35,7 +35,7 @@ export const TableJobs = ({ jobs }: TableJobsProps) => {
content: t("common.table.headers.monitorId"), content: t("common.table.headers.monitorId"),
render: (row) => ( render: (row) => (
<Typography <Typography
fontFamily="monospace" fontFamily={theme.typography.fontFamilyMonospace}
title={String(row.monitorId)} title={String(row.monitorId)}
sx={cellSx} sx={cellSx}
> >
@@ -137,7 +137,11 @@ export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => {
id: "monitorId", id: "monitorId",
content: t("common.table.headers.monitorId"), content: t("common.table.headers.monitorId"),
render: (row) => { render: (row) => {
return <Typography fontFamily={"monospace"}>{row.monitorId}</Typography>; return (
<Typography fontFamily={theme.typography.fontFamilyMonospace}>
{row.monitorId}
</Typography>
);
}, },
}, },
{ {
@@ -55,7 +55,7 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) =>
id: "timestamp", id: "timestamp",
content: t("pages.logs.table.headers.timestamp"), content: t("pages.logs.table.headers.timestamp"),
render: (row) => ( render: (row) => (
<Typography sx={{ fontFamily: "monospace" }}> <Typography sx={{ fontFamily: theme.typography.fontFamilyMonospace }}>
{formatTimestamp(row.timestamp)} {formatTimestamp(row.timestamp)}
</Typography> </Typography>
), ),
@@ -74,7 +74,9 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) =>
id: "method", id: "method",
content: t("pages.logs.table.headers.method"), content: t("pages.logs.table.headers.method"),
render: (row) => ( render: (row) => (
<Typography fontFamily={"monospace"}>{row.method || "-"}</Typography> <Typography fontFamily={theme.typography.fontFamilyMonospace}>
{row.method || "-"}
</Typography>
), ),
}, },
{ {
+1 -1
View File
@@ -579,7 +579,7 @@ export const SettingsPage = () => {
<Box <Box
component="pre" component="pre"
sx={{ sx={{
fontFamily: "monospace", fontFamily: theme.typography.fontFamilyMonospace,
p: 2, p: 2,
borderRadius: 1, borderRadius: 1,
overflow: "auto", overflow: "auto",