From 40a5eb5aeeae81efcfe9313870f7e5ebe8d37daa Mon Sep 17 00:00:00 2001 From: Zohar Manor-Abel Date: Fri, 9 Oct 2026 16:32:31 +0100 Subject: [PATCH 1/2] Default LinearProgress and CircularProgress to info - Set `defaultProps.color` to `info` for both in `DiamondDSTheme` - Default the Storybook args to `info` --- changelog.md | 1 + .../MUI/Feedback/CircularProgress.stories.tsx | 2 +- .../MUI/Feedback/LinearProgress.stories.tsx | 2 +- src/themes/DiamondDSTheme.test.ts | 13 +++++++++++++ src/themes/DiamondDSTheme.ts | 6 ++++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 7113fe93..206ef85a 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ ### Changed +- _LinearProgress_ and _CircularProgress_ now default to `color="info"`. Set `color="primary"` to keep the previous look. - _Dialog_ now defaults to elevation 16 (`surface.strong`'s tone) instead of MUI's 24, and temporary _Drawer_ to elevation 4 instead of 16, so floating surfaces order Drawer < Menu < Dialog and dialog text keeps more contrast. - **Breaking** _Dialog_'s deprecated `PaperProps` is now ignored. Move it to `slotProps.paper`, e.g. with `npx @mui/codemod@latest deprecations/dialog-props `. If you use MRT, also check `muiEditRowDialogProps` and `muiCreateRowModalProps` by hand, as the codemod won't reach them. diff --git a/src/components/MUI/Feedback/CircularProgress.stories.tsx b/src/components/MUI/Feedback/CircularProgress.stories.tsx index 370c3555..944e84dd 100644 --- a/src/components/MUI/Feedback/CircularProgress.stories.tsx +++ b/src/components/MUI/Feedback/CircularProgress.stories.tsx @@ -26,7 +26,7 @@ const meta: Meta = { thickness: { control: { type: "number", min: 1, max: 10, step: 0.5 } }, }, args: { - color: "primary", + color: "info", variant: "indeterminate", value: 75, size: 40, diff --git a/src/components/MUI/Feedback/LinearProgress.stories.tsx b/src/components/MUI/Feedback/LinearProgress.stories.tsx index 237fd44c..e29d2ca9 100644 --- a/src/components/MUI/Feedback/LinearProgress.stories.tsx +++ b/src/components/MUI/Feedback/LinearProgress.stories.tsx @@ -28,7 +28,7 @@ const meta: Meta = { valueBuffer: { control: { type: "number", min: 0, max: 100, step: 1 } }, }, args: { - color: "primary", + color: "info", variant: "indeterminate", value: 40, valueBuffer: 60, diff --git a/src/themes/DiamondDSTheme.test.ts b/src/themes/DiamondDSTheme.test.ts index 26610117..c6c3e76a 100644 --- a/src/themes/DiamondDSTheme.test.ts +++ b/src/themes/DiamondDSTheme.test.ts @@ -1255,7 +1255,20 @@ describe("DiamondDS component overrides", () => { }); expectTokenFallback(linearStyles.backgroundColor, "--ds-success"); + expect( + DiamondDSTheme.components?.MuiLinearProgress?.defaultProps?.color, + ).toBe("info"); + expectTokenFallback( + getStyleOverride(linearBar, { + ownerState: { color: "info" }, + theme: DiamondDSTheme, + }).backgroundColor, + "--ds-info", + ); expectTokenFallback(circularStyles.color, "--ds-warning"); + expect( + DiamondDSTheme.components?.MuiCircularProgress?.defaultProps?.color, + ).toBe("info"); }); it("uses semantic loading surface roles for skeletons", () => { diff --git a/src/themes/DiamondDSTheme.ts b/src/themes/DiamondDSTheme.ts index c367f79c..24845957 100644 --- a/src/themes/DiamondDSTheme.ts +++ b/src/themes/DiamondDSTheme.ts @@ -1801,6 +1801,9 @@ const DiamondDSTheme = extendTheme({ * surface. This keeps them visually lighter than buttons or alerts. */ MuiLinearProgress: { + defaultProps: { + color: "info", + }, styleOverrides: { root: { height: 6, @@ -1821,6 +1824,9 @@ const DiamondDSTheme = extendTheme({ }, MuiCircularProgress: { + defaultProps: { + color: "info", + }, styleOverrides: { root: ({ ownerState, From 11dfb2c8f87b75453c309dfb8365e628b2274cec Mon Sep 17 00:00:00 2001 From: Zohar Manor-Abel Date: Mon, 9 Nov 2026 11:06:08 +0000 Subject: [PATCH 2/2] Split progress default colour assertions into their own test - Restore the progress main roles test to its original assertions - Add a separate test for the info default on linear and circular progress --- src/themes/DiamondDSTheme.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/themes/DiamondDSTheme.test.ts b/src/themes/DiamondDSTheme.test.ts index 080ee37c..3aad80e9 100644 --- a/src/themes/DiamondDSTheme.test.ts +++ b/src/themes/DiamondDSTheme.test.ts @@ -1261,9 +1261,19 @@ describe("DiamondDS component overrides", () => { }); expectTokenFallback(linearStyles.backgroundColor, "--ds-success"); + expectTokenFallback(circularStyles.color, "--ds-warning"); + }); + + it("defaults progress indicators to the info colour", () => { + const linearBar = + DiamondDSTheme.components?.MuiLinearProgress?.styleOverrides?.bar; + expect( DiamondDSTheme.components?.MuiLinearProgress?.defaultProps?.color, ).toBe("info"); + expect( + DiamondDSTheme.components?.MuiCircularProgress?.defaultProps?.color, + ).toBe("info"); expectTokenFallback( getStyleOverride(linearBar, { ownerState: { color: "info" }, @@ -1271,10 +1281,6 @@ describe("DiamondDS component overrides", () => { }).backgroundColor, "--ds-info", ); - expectTokenFallback(circularStyles.color, "--ds-warning"); - expect( - DiamondDSTheme.components?.MuiCircularProgress?.defaultProps?.color, - ).toBe("info"); }); it("uses semantic loading surface roles for skeletons", () => {