Skip to content

Commit 409a81c

Browse files
committed
Merge remote-tracking branch 'origin/Tali-Dev' into Tali-Dev
2 parents 3f50d2c + fa0d3f7 commit 409a81c

10 files changed

Lines changed: 26 additions & 34 deletions

File tree

.github/workflows/deployVercel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: '20'
19+
node-version: "20"
2020

2121
- name: Install dependencies
22-
run: npm install
22+
run: npm install --legacy-peer-deps
2323

2424
- name: Build the project
2525
run: npm run build
@@ -29,4 +29,4 @@ jobs:
2929
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
3030
run: |
3131
npm install -g vercel
32-
vercel --prod --confirm --token $VERCEL_TOKEN
32+
vercel --prod --confirm --token $VERCEL_TOKEN

bun.lockb

2.21 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@radix-ui/react-toggle-group": "^1.0.4",
2828
"@tanstack/react-query": "^5.62.2",
2929
"@tanstack/react-query-devtools": "^5.62.2",
30+
"@types/d3-graphviz": "^2.6.10",
3031
"@types/express": "^4.17.21",
3132
"@types/lodash": "^4.17.1",
3233
"@types/papaparse": "^5.3.14",

src/App.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ function App() {
2525
const [selfLoops, setSelfLoops] = useState<boolean>(true);
2626
// State to manage the minimum number of visits for displaying edges in the graph
2727
const [minVisits, setMinVisits] = useState<number>(0);
28-
const { resetData, loading, error, setError, top5Sequences, setSelectedSequence, selectedSequence, csvData, setCSVData } = useContext(Context);
28+
const { resetData, loading, error, top5Sequences, setSelectedSequence, selectedSequence, csvData, setCSVData } = useContext(Context);
2929
const showControls = useMemo(() => {
30-
if (loading == false && csvData.length > 0) {
31-
return true;
32-
}
33-
return false;
30+
return !loading && csvData.length > 0;
31+
3432
}, [loading, csvData]);
3533

3634

@@ -44,10 +42,10 @@ function App() {
4442
}
4543

4644
};
47-
48-
const handleError = (errorMessage: string) => {
49-
setError(errorMessage);
50-
}
45+
// TODO: Implement error handling
46+
// const handleError = (errorMessage: string) => {
47+
// setError(errorMessage);
48+
// }
5149

5250
/**
5351
* Toggles the self-loops inclusion in the graph by switching the state.

src/components/DropZone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {ParseResult} from '@/lib/types';
44
import {parseData} from '@/lib/utils';
55
import {Label} from "@/components/ui/label"
66
import {RadioGroup, RadioGroupItem} from "@/components/ui/radio-group"
7-
7+
type TODO = any;
88
interface DropZoneProps {
9-
afterDrop: (data:string) => void,
9+
afterDrop: (data:TODO) => void,
1010
onLoadingChange: (loading: boolean) => void,
1111
onError: (error: string) => void,
1212
}

src/components/FilterComponent.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
SelectContent,
55
SelectGroup,
66
SelectItem,
7-
SelectLabel,
87
SelectTrigger,
98
SelectValue,
109
} from "@/components/ui/select"
@@ -20,7 +19,7 @@ const FilterComponent: React.FC<FilterComponentProps> = ({ onFilterChange }) =>
2019
</SelectTrigger>
2120
<SelectContent>
2221
<SelectGroup>
23-
<SelectItem value="ALL STATUSES">All Statuses</SelectItem>
22+
<SelectItem value="ALL">All Statuses</SelectItem>
2423
<SelectItem value="GRADUATED">Graduated</SelectItem>
2524
<SelectItem value="PROMOTED">Promoted</SelectItem>
2625
</SelectGroup>

src/components/Upload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface UploadProps {
1010
// Functional component for file upload
1111
function Upload({ onDataProcessed }: UploadProps) {
1212
// Access loading state and setter from Context
13-
const { loading, setLoading } = useContext(Context);
13+
const { setLoading } = useContext(Context);
1414

1515
// Handle file upload event
1616
const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {

src/components/ui/switch.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
import React, {ChangeEventHandler} from 'react';
1+
import React, { ChangeEventHandler } from 'react';
22
import './../../Switch.css';
33

4-
54
interface SwitchProps {
65
isOn: boolean;
76
handleToggle: () => void;
8-
filter: string|null;
7+
filter: string | null;
98

109
isDisabled?: boolean;
11-
1210
onChange?: ChangeEventHandler | undefined;
13-
1411
}
1512
const Switch: React.FC<SwitchProps> = ({ isOn, handleToggle }) => {
1613
return (

src/first3Last3.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Papa from 'papaparse';
2-
3-
interface CSVRow {
1+
// import Papa from 'papaparse';
2+
//
3+
export interface CSVRow {
44
'Session Id': string;
55
'Time': string;
66
'Step Name': string;

src/lib/GradPromUtils.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import {GlobalDataType} from "./types";
1+
import { GlobalDataType } from "./types";
22

33

4-
export function filterPromGrad(data: GlobalDataType[], promOrGrad: "GRADUATED" | "PROMOTED" | null| string): GlobalDataType[] {
5-
// If no data has been imported into DropZone, do nothing
6-
// if (data == null) {
7-
// }
8-
if (promOrGrad !== null) {
9-
return data.filter(item => item["CF (Workspace Progress Status)"] === promOrGrad);
10-
} else {
11-
// Return the original data if promOrGrad is null
4+
export function filterPromGrad(data: GlobalDataType[], promOrGrad: "GRADUATED" | "PROMOTED" | "ALL" | null): GlobalDataType[] {
5+
// Return all data if promOrGrad is null or "ALL"
6+
if (promOrGrad === "ALL" || promOrGrad === null) {
127
return data;
138
}
9+
// Only filter for GRADUATED or PROMOTED
10+
return data.filter(item => item["CF (Workspace Progress Status)"] === promOrGrad);
1411
}

0 commit comments

Comments
 (0)