From bd5cab09fef7dfe75898e47117e91708ab8b91ca Mon Sep 17 00:00:00 2001 From: ruchimotwaniBC Date: Wed, 24 Apr 2024 18:21:24 +0200 Subject: [PATCH 1/6] removed deprecated adaptV4theme from mui/material --- CHANGES.md | 4 ++-- src/connected/App.tsx | 25 +++++++++++-------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9ce4f8ab..2c9349f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,12 +32,12 @@ - Project CI now also runs [ESlint](https://eslint.org/). - Updated copyright headers of source files. - Removed all usages of explicit `any` type in TypeScript files. + - Removed `adaptV4Theme` from `@mui/material` as its deprecated. + TODO: * Allow running `run: npm run coverage` in `.github/workflows/ci.yaml`: -* No longer use deprecated `adaptV4Theme` from `@mui/material`; use MUI v5 - styling alternatives. ## Changes in version 1.1.1 diff --git a/src/connected/App.tsx b/src/connected/App.tsx index 0d83d1de..4ebf27ad 100644 --- a/src/connected/App.tsx +++ b/src/connected/App.tsx @@ -25,7 +25,6 @@ import * as React from "react"; import { connect } from "react-redux"; import { - adaptV4Theme, createTheme, CssBaseline, StyledEngineProvider, @@ -60,19 +59,17 @@ const mapStateToProps = (_state: AppState) => { const mapDispatchToProps = {}; const newTheme = () => - createTheme( - adaptV4Theme({ - typography: { - fontSize: 12, - htmlFontSize: 14, - }, - palette: { - mode: Config.instance.branding.themeName, - primary: Config.instance.branding.primaryColor, - secondary: Config.instance.branding.secondaryColor, - }, - }), - ); + createTheme({ + typography: { + fontSize: 12, + htmlFontSize: 14, + }, + palette: { + mode: Config.instance.branding.themeName, + primary: Config.instance.branding.primaryColor, + secondary: Config.instance.branding.secondaryColor, + }, + }); const _App: React.FC = ({ compact }) => { return ( From fbee5e860505376eed98254b5f4d60e23fe96b06 Mon Sep 17 00:00:00 2001 From: Ruchi Motwani <144326622+ruchimotwaniBC@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:32:27 +0200 Subject: [PATCH 2/6] Update CHANGES.md Co-authored-by: Norman Fomferra --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2c9349f6..3a46fb94 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,7 +32,8 @@ - Project CI now also runs [ESlint](https://eslint.org/). - Updated copyright headers of source files. - Removed all usages of explicit `any` type in TypeScript files. - - Removed `adaptV4Theme` from `@mui/material` as its deprecated. + - No longer using deprecated `adaptV4Theme()` function from `@mui/material`. + TODO: From 16ac8b8be40055c1dd793b823ca2900b285e4e02 Mon Sep 17 00:00:00 2001 From: ruchimotwaniBC Date: Wed, 24 Apr 2024 18:33:25 +0200 Subject: [PATCH 3/6] added todo task --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3a46fb94..f7d11788 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -38,7 +38,8 @@ TODO: -* Allow running `run: npm run coverage` in `.github/workflows/ci.yaml`: +* Allow running `run: npm run coverage` in `.github/workflows/ci.yaml`: +* Use MUI v5 styling alternatives. ## Changes in version 1.1.1 From 13cb449305d03bcf9ea47d6c5bde335af0d8d095 Mon Sep 17 00:00:00 2001 From: ruchimotwaniBC Date: Thu, 25 Apr 2024 10:22:00 +0200 Subject: [PATCH 4/6] changeColorBar error resolved --- src/components/ColorBarLegend/ColorBarColorEditor.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ColorBarLegend/ColorBarColorEditor.tsx b/src/components/ColorBarLegend/ColorBarColorEditor.tsx index f93951d9..64dbde6a 100644 --- a/src/components/ColorBarLegend/ColorBarColorEditor.tsx +++ b/src/components/ColorBarLegend/ColorBarColorEditor.tsx @@ -55,15 +55,19 @@ interface ColorBarColorEditorProps { opacity: number, ) => void; colorBars: ColorBars; + changeColorBars: (colorBars: ColorBars) => void; } export default function ColorBarColorEditor(props: ColorBarColorEditorProps) { const classes = useStyles(); const { colorBars, ...baseProps } = props; + const changeColorBars = (colorBars:ColorBars) => { + colorBars = colorBars + } return ( - + ); } From 5af90dfecfc936313c1ef4992a411d67d63cd3fd Mon Sep 17 00:00:00 2001 From: Ruchi Motwani <144326622+ruchimotwaniBC@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:20:12 +0200 Subject: [PATCH 5/6] Update ColorBarColorEditor.tsx --- src/components/ColorBarLegend/ColorBarColorEditor.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/ColorBarLegend/ColorBarColorEditor.tsx b/src/components/ColorBarLegend/ColorBarColorEditor.tsx index 64dbde6a..87252171 100644 --- a/src/components/ColorBarLegend/ColorBarColorEditor.tsx +++ b/src/components/ColorBarLegend/ColorBarColorEditor.tsx @@ -55,19 +55,15 @@ interface ColorBarColorEditorProps { opacity: number, ) => void; colorBars: ColorBars; - changeColorBars: (colorBars: ColorBars) => void; } export default function ColorBarColorEditor(props: ColorBarColorEditorProps) { const classes = useStyles(); const { colorBars, ...baseProps } = props; - const changeColorBars = (colorBars:ColorBars) => { - colorBars = colorBars - } return ( - + ); } From 93e5325b7a01873df34a5cbd06cc2f20b4baba97 Mon Sep 17 00:00:00 2001 From: Ruchi Motwani <144326622+ruchimotwaniBC@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:21:17 +0200 Subject: [PATCH 6/6] Update ColorBarColorEditor.tsx --- src/components/ColorBarLegend/ColorBarColorEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ColorBarLegend/ColorBarColorEditor.tsx b/src/components/ColorBarLegend/ColorBarColorEditor.tsx index 87252171..f93951d9 100644 --- a/src/components/ColorBarLegend/ColorBarColorEditor.tsx +++ b/src/components/ColorBarLegend/ColorBarColorEditor.tsx @@ -63,7 +63,7 @@ export default function ColorBarColorEditor(props: ColorBarColorEditorProps) { return ( - + ); }