Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update react-science and resolve React warnings #3369

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
832 changes: 433 additions & 399 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"multiplet-analysis": "^2.1.5",
"nmr-correlation": "2.3.3",
"nmr-load-save": "^3.0.2",
"nmr-processing": "^16.0.0",
"nmr-processing": "^16.0.1",
"nmredata": "^0.9.11",
"numeral": "^2.0.6",
"openchemlib": "^8.18.1",
Expand All @@ -103,14 +103,14 @@
"react-dropzone": "14.2.3",
"react-error-boundary": "^5.0.0",
"react-hook-form": "^7.54.2",
"react-icons": "^5.4.0",
"react-icons": "^5.5.0",
"react-inspector": "^6.0.2",
"react-mf": "^3.0.0",
"react-ocl": "^7.0.2",
"react-ocl-nmr": "^3.1.0",
"react-plot": "^3.0.0",
"react-rnd": "^10.4.14",
"react-science": "^12.1.0",
"react-science": "^13.0.1",
"react-table": "^7.8.0",
"react-transition-group": "^4.4.5",
"smart-array-filter": "^4.0.2",
Expand All @@ -132,27 +132,27 @@
"@types/react-dom": "^18.3.1",
"@types/react-table": "^7.7.20",
"@vitejs/plugin-react-swc": "^3.8.0",
"@vitest/coverage-v8": "^3.0.5",
"@vitest/coverage-v8": "^3.0.6",
"cross-env": "^7.0.3",
"cspell": "^8.17.3",
"cspell": "^8.17.4",
"eslint": "^9.20.1",
"eslint-config-cheminfo-react": "^15.0.0",
"eslint-config-cheminfo-typescript": "^17.0.0",
"eslint-plugin-react-hooks": "5.0.0",
"modern-normalize": "^3.0.1",
"postcss-styled-syntax": "^0.7.1",
"prettier": "^3.5.1",
"rc-menu": "^9.16.0",
"rc-menu": "^9.16.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.1.5",
"react-router-dom": "^7.2.0",
"rimraf": "^6.0.1",
"rollup-plugin-analyzer": "^4.0.0",
"serve": "^14.2.4",
"stylelint": "^16.14.1",
"stylelint-config-standard": "^37.0.0",
"typescript": "^5.7.3",
"vite": "^6.1.0",
"vitest": "^3.0.5"
"vite": "^6.1.1",
"vitest": "^3.0.6"
}
}
3 changes: 1 addition & 2 deletions src/component/elements/export/ExportOptionsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
name="layout"
control={control}
render={({ field }) => {
const { value, onChange, ...otherFieldProps } = field;
const { value, ref, ...otherFieldProps } = field;
return (
<RadioGroup
inline
onChange={onChange}
selectedValue={value}
{...otherFieldProps}
>
Expand Down
9 changes: 2 additions & 7 deletions src/component/elements/print/PrintContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,9 @@ function InnerPrintOptionsModal(props: InnerPrintOptionsModalProps) {
name="layout"
control={control}
render={({ field }) => {
const { value, onChange, ...otherFieldProps } = field;
const { value, ref, ...otherFieldProps } = field;
return (
<RadioGroup
inline
onChange={onChange}
selectedValue={value}
{...otherFieldProps}
>
<RadioGroup inline selectedValue={value} {...otherFieldProps}>
<Radio label="Portrait" value="portrait" />
<Radio label="Landscape" value="landscape" />
</RadioGroup>
Expand Down
9 changes: 3 additions & 6 deletions src/component/main/NMRiumViewerWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,14 @@ export function NMRiumViewerWrapper(props: NMRiumViewerWrapperProps) {
return <NMRiumViewer emptyText={emptyText} viewerRef={viewerRef} />;
}

const closed: number | boolean = general?.hidePanelOnLoad
? true
: verticalSplitterCloseThreshold;

return (
<SplitPane
size={verticalSplitterPosition}
direction="horizontal"
controlledSide="end"
closed={closed}
onResize={resizeHandler}
defaultOpen={!general?.hidePanelOnLoad}
closeThreshold={verticalSplitterCloseThreshold}
onSizeChange={resizeHandler}
>
<NMRiumViewer emptyText={emptyText} viewerRef={viewerRef} />
<Panels />
Expand Down
9 changes: 2 additions & 7 deletions src/component/modal/SaveAsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,9 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
name="include.dataType"
control={control}
render={({ field }) => {
const { value, onChange, ...otherFieldProps } = field;
const { value, ref, ...otherFieldProps } = field;
return (
<RadioGroup
inline
onChange={onChange}
selectedValue={value}
{...otherFieldProps}
>
<RadioGroup inline selectedValue={value} {...otherFieldProps}>
<Radio label="Raw data" value={DataExportOptions.ROW_DATA} />
<Radio
label="Data source"
Expand Down
6 changes: 5 additions & 1 deletion src/component/modal/setting/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ const StyledTabs = styled(Tabs)`
}
`;

const StyledButton = styled(Button)<{ marginHorizontal: number }>`
const StyledButton = styled(Button, {
shouldForwardProp(propName) {
return propName !== 'marginHorizontal';
},
})<{ marginHorizontal: number }>`
margin: 0 ${(props) => props.marginHorizontal}px;
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { getPreferencesByWorkspace } from '../../../reducer/preferences/utilitie
import { isGoogleDocument } from '../../../utility/isGoogleDocument.js';
import { Section } from '../GeneralSettings.js';

const StyledButton = styled(Button)<{ marginHorizontal: number }>`
const StyledButton = styled(Button, {
shouldForwardProp(propName) {
return propName !== 'marginHorizontal';
},
})<{ marginHorizontal: number }>`
margin: 0 ${({ marginHorizontal }) => marginHorizontal}px;
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,9 @@ export function ExportOptions(props: ExportOptionsProps) {
name={`${path}.layout`}
control={control}
render={({ field }) => {
const { value, onChange, ...otherFieldProps } = field;
const { value, ref, ...otherFieldProps } = field;
return (
<RadioGroup
inline
onChange={onChange}
selectedValue={value}
{...otherFieldProps}
>
<RadioGroup inline selectedValue={value} {...otherFieldProps}>
<Radio label="Portrait" value="portrait" />
<Radio label="Landscape" value="landscape" />
</RadioGroup>
Expand Down
Loading