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

Upgrade to react 18 #1991

Merged
merged 4 commits into from
Apr 3, 2023
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
572 changes: 347 additions & 225 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"compile_grammar": "npx lezer-generator --output src/Parser/doenet.js src/Parser/doenet.grammar"
},
"dependencies": {
"@blueprintjs/core": "^4.0.0-beta.0",
"@blueprintjs/datetime": "^4.0.0-beta.0",
"@codemirror/basic-setup": "^0.19.0",
"@codemirror/commands": "^0.19.5",
"@codemirror/gutter": "^0.19.9",
Expand All @@ -57,7 +55,6 @@
"crypto-js": "^3.3.0",
"cssesc": "^3.0.0",
"csv-parse": "^4.16.3",
"cypress-parallel": "^0.12.0",
"esm-seedrandom": "^3.0.5",
"handsontable": "^12.1.2",
"hi-base32": "^0.5.1",
Expand All @@ -70,17 +67,17 @@
"lorem-ipsum": "^2.0.4",
"math-expressions": "^2.0.0-alpha59",
"nanoid": "^3.1.31",
"react": "^17.0.2",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.0.3",
"react-datetime": "^3.1.1",
"react-dom": "^17.0.2",
"react-dom": "^18.2.0",
"react-dropzone": "^11.4.2",
"react-is": "^17.0.1",
"react-mathquill": "^1.0.1",
"react-mathquill": "^1.0.3",
"react-measure": "^2.5.2",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"react-select": "^4.3.1",
"react-select": "^5.7.0",
"react-table": "^7.7.0",
"react-use-measure": "^2.1.1",
"react-visibility-sensor-v2": "^1.0.0",
Expand All @@ -103,6 +100,7 @@
"@types/react": "^18.0.5",
"@web/test-runner": "^0.12.19",
"chai": "^4.2.0",
"cypress-parallel": "^0.12.0",
"esbuild": "^0.14.38",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.2.0",
Expand Down
1 change: 0 additions & 1 deletion src/Tools/_framework/Menus/AddDriveItems.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { ButtonGroup } from '@blueprintjs/core';
import React from 'react';
import { useRecoilValue } from 'recoil';
import Button from '../../../_reactComponents/PanelHeaderComponents/Button';
Expand Down
9 changes: 4 additions & 5 deletions src/Tools/chat/index.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Router, Switch } from 'react-router';
import { createRoot } from 'react-dom/client';
import { RecoilRoot } from 'recoil';
import ToolRoot from '@ToolRoot';

import Chat from './Chat';
import { MathJaxContext } from 'better-react-mathjax';
import { mathjaxConfig } from '../../Core/utils/math';

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<RecoilRoot>
<MathJaxContext
version={2}
Expand All @@ -17,6 +17,5 @@ ReactDOM.render(
>
<ToolRoot tool={<Chat key={'BaseTool'} />} />
</MathJaxContext>
</RecoilRoot>,
document.getElementById('root'),
</RecoilRoot>
);
8 changes: 4 additions & 4 deletions src/Tools/cypressTest/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import CypressTest from './CypressTest.jsx';
import axios from 'axios';
import { RecoilRoot } from 'recoil';
Expand All @@ -14,7 +14,8 @@ import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
// return <p>test</p>
// }

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<RecoilRoot>
<Router>
<Routes>
Expand All @@ -31,8 +32,7 @@ ReactDOM.render(
} />
</Routes>
</Router>
</RecoilRoot>,
document.getElementById('root'),
</RecoilRoot>
);

// Hot Module Replacement (HMR) - Remove this snippet to remove HMR.
Expand Down
8 changes: 4 additions & 4 deletions src/Tools/singlepage/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { RecoilRoot } from 'recoil';

Expand All @@ -8,7 +8,8 @@ import { MathJaxContext } from 'better-react-mathjax';
import { mathjaxConfig } from '../../Core/utils/math';
import DarkmodeController from '../_framework/DarkmodeController';

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<RecoilRoot>
<Router>
<Routes>
Expand All @@ -28,6 +29,5 @@ ReactDOM.render(
/>
</Routes>
</Router>
</RecoilRoot>,
document.getElementById('root'),
</RecoilRoot>
);
10 changes: 4 additions & 6 deletions src/Tools/temp/index.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';



ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<>
test here
</>,
document.getElementById('root'),
</>
);

9 changes: 5 additions & 4 deletions src/Tools/test/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import DoenetTest from './DoenetTest.jsx';
import { RecoilRoot } from 'recoil';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';

ReactDOM.render(

const root = createRoot(document.getElementById('root'));
root.render(
<RecoilRoot>
<Router>
<Routes>
Expand All @@ -15,6 +17,5 @@ ReactDOM.render(
} />
</Routes>
</Router>
</RecoilRoot>,
document.getElementById('root'),
</RecoilRoot>
);
7 changes: 4 additions & 3 deletions src/Tools/uiDocs/index.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { MathJaxContext } from 'better-react-mathjax';
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { mathjaxConfig } from '../../Core/utils/math.js';

import UIDocs from './uiDocs.jsx';

// import { initialize } from '../imports/courseInfo';
// initialize();

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<MathJaxContext
version={2}
config={mathjaxConfig}
onStartup={(mathJax) => (mathJax.Hub.processSectionDelay = 0)}
>
<UIDocs />
</MathJaxContext>
, document.getElementById('root'));
);
8 changes: 4 additions & 4 deletions src/Tools/umn/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { RecoilRoot } from 'recoil';

Expand All @@ -8,7 +8,8 @@ import { MathJaxContext } from 'better-react-mathjax';
import { mathjaxConfig } from '../../Core/utils/math';
import DarkmodeController from '../_framework/DarkmodeController';

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<RecoilRoot>
<Router>
<Routes>
Expand All @@ -28,6 +29,5 @@ ReactDOM.render(
/>
</Routes>
</Router>
</RecoilRoot>,
document.getElementById('root'),
</RecoilRoot>
);
150 changes: 0 additions & 150 deletions src/_reactComponents/PanelHeaderComponents/DateTime2.jsx

This file was deleted.