Skip to content

Commit 7550d01

Browse files
committed
Merge branch 'v4.0-react-typescript' into improve/piechart-toolitp
2 parents 076e439 + c53662c commit 7550d01

File tree

75 files changed

+4342
-2999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+4342
-2999
lines changed

.eslintrc.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
"es6": true,
55
"node": true
66
},
7+
"plugins": ["css-import-order"],
78
"extends": [
89
"eslint:recommended",
910
"plugin:@typescript-eslint/eslint-recommended",
1011
"plugin:@typescript-eslint/recommended",
1112
"plugin:import/recommended",
1213
"plugin:import/electron",
13-
"plugin:import/typescript"
14+
"plugin:import/typescript",
15+
"plugin:css-import-order/recommended"
1416
],
1517
"parser": "@typescript-eslint/parser",
1618
"settings": {
1719
"import/resolver": {
1820
"node": {
19-
"extensions": [".js", ".jsx", ".ts", ".tsx"]
21+
"extensions": [".js", ".jsx", ".ts", ".tsx", "json"]
2022
}
2123
}
22-
},
24+
}
2325
}

Release.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
- Support for Drag & drop JSON/SQLite files
1212
- Github actions to create automated releases
1313
Exception: macos arm64 is not yet support by Github actions yet, needs manual build & upload
14+
- Retain column order & states https://github.com/nexB/scancode-workbench/pull/568
1415

1516
## Bug fixes
1617
- Prevent crashes on unsupported scans
1718
- Provision for header-less scans (Test scans)
1819
- Table column fixes
1920
- Fixed UI anomalies
20-
- Invalid path query fix (Data for files with similar prefix were colliding)
21+
- Invalid path query fix (Data for files with similar prefix were colliding)
22+
- window title update & occasional sqlite error for packages https://github.com/nexB/scancode-workbench/pull/560
23+
- license detection parser issues, trimmed filter options, hide empty 'other dependencies' https://github.com/nexB/scancode-workbench/pull/569

package-lock.json

Lines changed: 41 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "scancode-workbench",
33
"productName": "scancode-workbench",
4-
"version": "4.0.0rc2",
4+
"version": "4.0.0rc3",
55
"description": "An application for viewing ScanCode results and concluding component origin and license",
66
"repository": {
77
"type": "git",
@@ -42,6 +42,7 @@
4242
"@types/node": "^18.8.0",
4343
"@types/react": "^18.0.21",
4444
"@types/react-dom": "^18.0.6",
45+
"@types/react-scroll": "^1.8.7",
4546
"@types/react-toastify": "^4.1.0",
4647
"@types/sequelize": "^4.28.14",
4748
"@types/sqlite3": "^3.1.8",
@@ -57,6 +58,7 @@
5758
"electron-packager": "^16.0.0",
5859
"electron-rebuild": "^3.2.9",
5960
"eslint": "^8.24.0",
61+
"eslint-plugin-css-import-order": "^1.1.0",
6062
"eslint-plugin-import": "^2.26.0",
6163
"fork-ts-checker-webpack-plugin": "^7.2.13",
6264
"json-loader": "^0.5.7",
@@ -103,6 +105,7 @@
103105
"react-loader-spinner": "^5.3.4",
104106
"react-pro-sidebar": "^0.7.1",
105107
"react-router-dom": "^6.4.1",
108+
"react-scroll": "^1.8.9",
106109
"react-toastify": "^9.0.8",
107110
"react-tooltip": "^5.10.4",
108111
"sequelize": "^6.23.2",

src/App.tsx

Lines changed: 76 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,85 @@
1-
import React from 'react'
2-
import {
3-
HashRouter,
4-
Routes,
5-
Route,
6-
} from "react-router-dom";
7-
import { ToastContainer } from 'react-toastify';
1+
import React from "react";
2+
import { HashRouter, Route,Routes } from "react-router-dom";
3+
import { ToastContainer } from "react-toastify";
84

9-
import { ROUTES } from './constants/routes';
10-
import { WorkbenchDBProvider } from './contexts/workbenchContext';
5+
import DropZone from "./components/DropZone/DropZone";
6+
import Layout from "./components/Layout/Layout";
7+
import { ROUTES } from "./constants/routes";
8+
import { WorkbenchDBProvider } from "./contexts/dbContext";
9+
import { WorkbenchStateProvider } from "./contexts/stateContext";
10+
import About from "./pages/About/About";
11+
import ChartView from "./pages/ChartView/ChartView";
12+
import FileInfoDash from "./pages/FileInfoDash/FileInfoDash";
13+
import Home from "./pages/Home/Home";
14+
import Licenses from "./pages/Licenses/Licenses";
15+
import LicenseInfoDash from "./pages/LicenseInfoDash/LicenseInfoDash";
16+
import PackageInfoDash from "./pages/PackageInfoDash/PackageInfoDash";
17+
import Packages from "./pages/Packages/Packages";
18+
import PageNotFound from "./pages/PageNotFound";
19+
import ScanInfo from "./pages/ScanInfo/ScanInfo";
20+
import TableView from "./pages/TableView/TableView";
1121

12-
import Layout from './components/Layout/Layout';
13-
import DropZone from './components/DropZone/DropZone';
22+
import "./utils/ensureRendererDeps";
23+
import "./fontawesome";
1424

15-
import Home from './pages/Home/Home'
16-
import TableView from './pages/TableView/TableView';
17-
import FileInfoDash from './pages/FileInfoDash/FileInfoDash';
18-
import LicenseInfoDash from './pages/LicenseInfoDash/LicenseInfoDash';
19-
import PackageInfoDash from './pages/PackageInfoDash/PackageInfoDash';
20-
import Packages from './pages/Packages/Packages';
21-
import LicenseDetections from './pages/LicenseDetections/LicenseDetections';
22-
import ChartView from './pages/ChartView/ChartView';
23-
import ScanInfo from './pages/ScanInfo/ScanInfo';
24-
import About from './pages/About/About';
25-
import PageNotFound from './pages/PageNotFound';
26-
27-
import './utils/ensureRendererDeps';
28-
29-
import './fontawesome';
30-
import 'rc-tree/assets/index.css';
31-
import 'react-toastify/dist/ReactToastify.css';
32-
import 'bootstrap/dist/css/bootstrap.min.css';
33-
import 'react-tooltip/dist/react-tooltip.css'
34-
35-
import './app.css';
36-
import './dashStyles.css';
37-
import './customFaColors.css';
25+
import "rc-tree/assets/index.css";
26+
import "react-toastify/dist/ReactToastify.css";
27+
import "bootstrap/dist/css/bootstrap.min.css";
28+
import "react-tooltip/dist/react-tooltip.css";
29+
import "./app.css";
30+
import "./dashStyles.css";
31+
import "./customFaColors.css";
3832

3933
const App = () => {
4034
return (
41-
<HashRouter>
42-
<WorkbenchDBProvider>
43-
<DropZone>
44-
<Layout>
45-
<Routes>
46-
<Route path={ROUTES.HOME}>
47-
<Route index element={<Home />} />
48-
<Route path={ROUTES.ABOUT} element={<About />} />
49-
<Route path={ROUTES.TABLE_VIEW} element={<TableView />} />
50-
<Route path={ROUTES.FILE_DASHBOARD} element={<FileInfoDash />} />
51-
<Route path={ROUTES.LICENSE_DASHBOARD} element={<LicenseInfoDash />} />
52-
<Route path={ROUTES.PACKAGE_DASHBOARD} element={<PackageInfoDash />} />
53-
<Route path={ROUTES.LICENSE_DETECTIONS} element={<LicenseDetections />} />
54-
<Route path={ROUTES.PACKAGES} element={<Packages />} />
55-
<Route path={ROUTES.CHART_SUMMARY} element={<ChartView />} />
56-
<Route path={ROUTES.SCAN_INFO} element={<ScanInfo />} />
57-
</Route>
58-
<Route path="*" element={<PageNotFound />} />
59-
</Routes>
60-
</Layout>
35+
<HashRouter basename="/">
36+
<WorkbenchStateProvider>
37+
<WorkbenchDBProvider>
38+
<DropZone>
39+
<Layout>
40+
<Routes>
41+
<Route path={ROUTES.HOME}>
42+
<Route index element={<Home />} />
43+
<Route path={ROUTES.ABOUT} element={<About />} />
44+
<Route path={ROUTES.TABLE_VIEW} element={<TableView />} />
45+
<Route
46+
path={ROUTES.FILE_DASHBOARD}
47+
element={<FileInfoDash />}
48+
/>
49+
<Route
50+
path={ROUTES.LICENSE_DASHBOARD}
51+
element={<LicenseInfoDash />}
52+
/>
53+
<Route
54+
path={ROUTES.PACKAGE_DASHBOARD}
55+
element={<PackageInfoDash />}
56+
/>
57+
<Route
58+
path={ROUTES.LICENSES}
59+
element={<Licenses />}
60+
/>
61+
<Route path={ROUTES.PACKAGES} element={<Packages />} />
62+
<Route path={ROUTES.CHART_SUMMARY} element={<ChartView />} />
63+
<Route path={ROUTES.SCAN_INFO} element={<ScanInfo />} />
64+
</Route>
65+
<Route path="*" element={<PageNotFound />} />
66+
</Routes>
67+
</Layout>
6168

62-
{/* Provider for toasts */}
63-
<ToastContainer
64-
limit={1}
65-
draggable
66-
closeOnClick
67-
hideProgressBar={false}
68-
autoClose={2000}
69-
position='bottom-center'
70-
/>
71-
</DropZone>
72-
</WorkbenchDBProvider>
69+
{/* Provider for toasts */}
70+
<ToastContainer
71+
limit={1}
72+
draggable
73+
closeOnClick
74+
hideProgressBar={false}
75+
autoClose={2000}
76+
position="bottom-center"
77+
/>
78+
</DropZone>
79+
</WorkbenchDBProvider>
80+
</WorkbenchStateProvider>
7381
</HashRouter>
74-
)
75-
}
82+
);
83+
};
7684

77-
export default App
85+
export default App;
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import React from 'react';
2-
import { Button, ButtonProps } from 'react-bootstrap';
1+
import React from "react";
2+
import { Button, ButtonProps } from "react-bootstrap";
33

4-
import './coreButton.css';
4+
import "./coreButton.css";
55

66
interface CoreButtonProps extends ButtonProps {
7-
small?: boolean
8-
large?: boolean
7+
small?: boolean;
8+
large?: boolean;
99
}
1010

1111
const CoreButton = (props: CoreButtonProps) => {
1212
const { large, small, className, variant, ...otherProps } = props;
1313
return (
1414
<Button
1515
{...otherProps}
16-
size={large ? 'lg' : small ? 'sm' : null}
17-
variant={variant || 'light'}
18-
className={(className || '') + ' core-button'}
16+
size={large ? "lg" : small ? "sm" : null}
17+
variant={variant || "light"}
18+
className={(className || "") + " core-button"}
1919
>
20-
{ props.children }
20+
{props.children}
2121
</Button>
22-
)
23-
}
22+
);
23+
};
2424

25-
export default CoreButton
25+
export default CoreButton;

src/components/CoreButton/coreButton.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
background-color: transparent !important;
44
border: 2px solid var(--accentColor) !important;
55
}
6+
67
.core-button svg {
78
margin-left: 10px;
89
color: rgb(9 64 126);
910
}
11+
1012
.core-button:hover {
1113
background-color: #f3f9ff !important;
1214
}

0 commit comments

Comments
 (0)