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

Diagnosis interface 2024 w #7

Open
wants to merge 79 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
12442c5
new page
gragragrace Oct 24, 2023
e01ca7c
add hypo
gragragrace Oct 24, 2023
5f9f8e4
context space
gragragrace Oct 24, 2023
db6d9af
RC list
gragragrace Oct 24, 2023
520885e
fixed hypo list
gragragrace Oct 24, 2023
a1ae121
updated context-space
gragragrace Oct 24, 2023
8b7a6fa
create and read
gragragrace Oct 24, 2023
ea855ad
Create orchestration-scripting-interfaces.code-workspace
gragragrace Oct 26, 2023
ddad9cc
minor edits
gragragrace Oct 26, 2023
9204169
minor
gragragrace Oct 26, 2023
096cadf
ostest context
gragragrace Oct 29, 2023
b89b72c
need fix edge case
gragragrace Oct 29, 2023
eecdce2
fixed DTR edge case
gragragrace Oct 29, 2023
646984e
fixed json PRC
gragragrace Oct 29, 2023
dc81c44
my-stuff
NoodleSoup0 Oct 29, 2023
3c18123
add PRC
NoodleSoup0 Oct 29, 2023
4033bdd
add PRC URL
NoodleSoup0 Oct 29, 2023
c18d2ee
fixes
gragragrace Oct 29, 2023
deb95ca
Merge branch 'diagnosis-interface' of https://github.com/NUDelta/orch…
gragragrace Oct 29, 2023
77ec30a
minor naming fix
gragragrace Oct 29, 2023
4c89990
Get project object from OS, populate context space, and update response
gragragrace Nov 5, 2023
565616b
update context, context_lib
gragragrace Nov 5, 2023
0ca3a9f
summary of stories and task
gragragrace Nov 5, 2023
4582c35
save response setup
gragragrace Nov 5, 2023
a522357
update hypothesis list
gragragrace Nov 5, 2023
c713e66
update description
gragragrace Nov 5, 2023
99d5853
delete hypo
gragragrace Nov 5, 2023
d44242d
retrieve slide obj
NoodleSoup0 Nov 6, 2023
086352a
object done, need to see how to add more than one slide for user_stud…
NoodleSoup0 Nov 6, 2023
384bf9d
object done, need to see how to add more than one slide for user_stud…
NoodleSoup0 Nov 6, 2023
1917b55
object done, need to see how to add more than one slide for user_stud…
NoodleSoup0 Nov 6, 2023
c090825
object done, need to see how to add more than one slide for user_stud…
NoodleSoup0 Nov 6, 2023
67de856
fetchactiveissue and createresponse
gragragrace Nov 7, 2023
47ba731
minor fixed for index.tsx
gragragrace Nov 7, 2023
fef2774
comments for linh
gragragrace Nov 8, 2023
9c2d7b5
stuff
NoodleSoup0 Nov 8, 2023
43de298
merge
NoodleSoup0 Nov 8, 2023
976bba3
added PRC-link and DTR Breakdown
NoodleSoup0 Nov 8, 2023
1128d9f
Remove Button
NoodleSoup0 Nov 8, 2023
59509b5
needs formatting for stories and tasks
NoodleSoup0 Nov 8, 2023
3693260
fixed fetch os object error
gragragrace Nov 8, 2023
4bb1b0e
user study
gragragrace Nov 8, 2023
200932c
delete diag.tsx
gragragrace Nov 9, 2023
94f091c
canvas space
gragragrace Nov 12, 2023
5ee54c4
add rc
NoodleSoup0 Nov 12, 2023
248e1d3
Merge branch 'diagnosis-interface' of https://github.com/NUDelta/orch…
NoodleSoup0 Nov 12, 2023
d1f8d1c
minor fix
gragragrace Nov 12, 2023
c76a982
merge
NoodleSoup0 Nov 13, 2023
4936bfb
Merge branch 'diagnosis-interface' of https://github.com/NUDelta/orch…
NoodleSoup0 Nov 13, 2023
682264a
1
gragragrace Nov 13, 2023
d9a8b65
Merge branch 'diagnosis-interface' of https://github.com/NUDelta/orch…
gragragrace Nov 13, 2023
92ae1ff
working merge
gragragrace Nov 13, 2023
928129c
update RC Lib
gragragrace Nov 13, 2023
859b748
P5 setup
gragragrace Nov 13, 2023
2c97623
user study withJonah edits
gragragrace Nov 14, 2023
691fc16
deployment fix
gragragrace Nov 15, 2023
e68c1d7
deployment fix
gragragrace Nov 15, 2023
221c20f
minor fixes
gragragrace Nov 15, 2023
61cc5cb
p5js elements' features
NoodleSoup0 Nov 28, 2023
b5a8fa7
individual points spent & committed
NoodleSoup0 Nov 28, 2023
9ab64cf
usability fixes
gragragrace Nov 28, 2023
d1771f4
updates
gragragrace Nov 29, 2023
ea4f14a
new page view
gragragrace Feb 14, 2024
e1a0a27
added components + clean up files
gragragrace Feb 14, 2024
f19ad50
strategy button + update save functions for initial hunch and game plan
gragragrace Feb 14, 2024
e27eb5b
deployment fix
gragragrace Feb 14, 2024
cdc05c6
package fixes
gragragrace Feb 14, 2024
a72e501
specifying engine for digital ocean; updating packages
kapil1garg Feb 14, 2024
ee74b64
trying again with node engine
kapil1garg Feb 14, 2024
b004ce7
fml its ENGINES not ENGINE
kapil1garg Feb 14, 2024
00cff8b
add context for useability test
NoodleSoup0 Feb 15, 2024
d8d7d93
context space prompt
gragragrace Feb 19, 2024
3303e2a
Revert "context space prompt"
gragragrace Feb 25, 2024
2a508d6
Revert "add context for useability test"
gragragrace Feb 25, 2024
298bc84
weird bug about node version
gragragrace Feb 25, 2024
9a95cb8
deployment fix
gragragrace Feb 26, 2024
405a032
deployment fixes
gragragrace Mar 12, 2024
ebc6847
SRS gap interface structure
gragragrace Apr 24, 2024
3905e21
new SRS model
gragragrace Apr 24, 2024
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
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
MONGO_URI=mongodb+srv://JordanCheckoff:[email protected]/?retryWrites=true&w=majority;
MONGO_URI=mongodb+srv://JordanCheckoff:[email protected]/?retryWrites=true&w=majority;
API_URL=https://orchestration-engine-qjfcs.ondigitalocean.app
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Install packages using `yarn install`.

## Development

Start a development server using `yarn dev` and navigate to `localhost:3000`. Changes in code will automatically cause the website to be re-built and update the browser.
Start a development server using `yarn dev` and navigate to `localhost:8080`. Changes in code will automatically cause the website to be re-built and update the browser.
8 changes: 8 additions & 0 deletions components/DiagSidebar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.problem_textbox {
width: 100%;
height: 100%;
margin: 10px 0;
padding: 10px;
box-sizing: border-box;
}

32 changes: 32 additions & 0 deletions components/DiagSidebar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { useState, useEffect } from 'react';
import styles from './DiagSidebar.module.css';

interface SidebarProps {
content: string;
setContent: (content: string) => void;
title: string;
project: string;
}

const Sidebar: React.FC<SidebarProps> = ({ content, setContent, title, project}) => {
useEffect(() => {
}, []);

const handleContentChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
setContent(event.target.value);
};

return (
<div>
<h1 className="text-xl font-bold mb-2">Your detector for {title} has been triggered for {project}.</h1>
<h2 className="text-lg font-semibold mb-2">Detector Debrief</h2>
<textarea
className={styles.problem_textbox}
value={content}
onChange={handleContentChange}
/>
</div>
);
};

export default Sidebar;
16 changes: 13 additions & 3 deletions components/dashboard/Sig.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
import Link from 'next/link';

import React from 'react';

export const Sig = ({name, responses}) => {

let sig_responses = responses.filter((x) => x.sigName === name)

const getAbbreviation = (inputString: string): string => {
const words = inputString.split(/[\s-]+/);
let abbreviation = '';
for (const word of words) {
if (word.length > 0) {
abbreviation += word[0].toUpperCase();
}
}
return abbreviation;
};

return (
<div className="border-2 p-3 rounded-lg mt-3">
<h3 className="text-xl">{name}</h3>
{sig_responses.length > 0 ? sig_responses.map((res, i) => <><Link key={i} href={"/response?response=" + res._id}><u>Diagnosis Page for {res.title}-{res.sigName}</u></Link><br /></>)
{sig_responses.length > 0 ? sig_responses.map((res, i) => <><Link key={i} href={"/response?response=" + res._id}><u>{res.title}-Accounting for Difference-{getAbbreviation(res.sigName)}</u></Link><br /></>)
: <p>No active issues</p>}
</div>

)
}
34 changes: 34 additions & 0 deletions components/diagnosis/DiagContext.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.container{
width: 100%;
height: 100%;
}

.context_space {
padding: 20px;
background-color: white;
width: 100%;
height: 90%;
box-sizing: border-box;
position: relative;
}

.context_scrollable {
background-color: white;
width: 100%;
height: 100%;
box-sizing: border-box;
position: relative;
}

.headerTitle {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}

.contextDiv {
background-color: white;
padding: 15px;
margin: 8px;
height: 60%;
}
105 changes: 105 additions & 0 deletions components/diagnosis/DiagContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import React, { useState, useCallback} from 'react';
import styles from './DiagContext.module.css';
import { options } from '../../lib/context/options';
import P5Canvas from './P5Canvas';

const Context: React.FC = ({ items, setItems, context_lib, canvas, setCanvas}) => {
const [popupOptions, setPopupOptions] = useState(
options.filter((option) => !items.some((item) => item.title === option))
);

const [isPopupOpen, setPopupOpen] = useState(false);

const openPopup = () => {
setPopupOpen(true);
};

const closePopup = () => {
setPopupOpen(false);
};

const addOptionToContext = (option: any) => {
const newItem = { title: option, data: context_lib[option] };
setItems([...items, newItem]);
setPopupOptions(popupOptions.filter((popOption) => popOption !== option));
setCanvas([...canvas, { type: newItem.title, xPos: 50, yPos: 50 }]);
};

const removeItem = (index) => {
const removedItem = items[index];
const updatedItems = [...items];
updatedItems.splice(index, 1);
setItems(updatedItems);
setPopupOptions([...popupOptions, removedItem.title]); // Add the removed item back to popupOptions
};

const test = ['Sprint log-Total Points Commited This Sprint', 'PRC-link to PRC']

return (
<div className={styles.contextDiv}>
<h2 className={styles.headerTitle}>Context</h2>
<div className={styles.container}>
<div className={styles.context_space} style={{ whiteSpace: 'pre-line'}}>
< div className={styles.context_scrollable} style={{whiteSpace: 'pre-line', overflowY: 'auto'}}>
{items.map((option, index) => (
<div
key={index}
className="bg-blue-200 p-4 rounded-md mb-2"
style={{ display: 'flex', justifyContent: 'space-between', paddingLeft: '1em'}}
>
{(option.title === 'PRC-link to PRC' || option.title === 'Link to Sprint Log') ? (
<a href={option.data} target="_blank" rel="noopener noreferrer">
{option.title}: {option.data}
</a>
) : (
`${option.title}: ${option.data}`
)}
<button
className="bg-red-500 text-white p-2 rounded-md ml-2"
onClick={() => removeItem(index)}
>
X
</button>
</div>
))}
</div>
<button
className="bg-blue-500 text-white p-2 rounded-md absolute bottom-4 right-4"
onClick={openPopup}
>
Add Context
</button>
</div>
{isPopupOpen && (
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-[2]">
<div className="bg-white p-4 rounded-md">
<h3 className="text-lg font-semibold mb-2">
Select an option to add
</h3>
<ul>
{popupOptions.map((option, index) => (
<li key={index} className="mb-2">
<button
className="bg-blue-500 text-white p-2 rounded-md"
onClick={() => addOptionToContext(option)}
>
{option}
</button>
</li>
))}
</ul>
<button
className="bg-red-500 text-white p-2 rounded-md mt-4"
onClick={closePopup}
>
Close
</button>
</div>
</div>
)}
</div>
</div>
);
};

export default Context;
24 changes: 24 additions & 0 deletions components/diagnosis/GamePlan.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.sideBySideItem2 {
width: 60%;
background-color: white;
padding: 8px;
}

.sideBySideItem2 textarea {
width: 100%;
background-color: #e5e7eb;;
height: 200px;
padding: 10px;
box-sizing: border-box;
}

.sideBySideItem2 p {
font-size: 0.8rem;
margin-bottom: 10px;
}

.headerTitle {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
30 changes: 30 additions & 0 deletions components/diagnosis/GamePlan.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { useState, useEffect, ChangeEvent } from 'react';
import styles from './GamePlan.module.css';

interface Props {
plan: string;
setPlan: (content: string) => void;
}


const GamePlan: React.FC<Props> = ({plan, setPlan}) => {
const handleInputChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
setPlan(event.target.value);
};

return (
<div className={styles.sideBySideItem2}>
<h2 className={styles.headerTitle}>Game Plan</h2>
<p>Before going into your SIG meeting, write down some questions you plan to ask your students.
We have some suggested questions in the root cause list to help you both ask broadly and ask about specific root causes.</p>
<textarea
className={styles.textArea}
value={plan}
onChange={handleInputChange}
placeholder="Enter your questions here...">
</textarea>
</div>
);
};

export default GamePlan;
18 changes: 18 additions & 0 deletions components/diagnosis/Guidelines.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.header {
background-color: white;
padding: 15px;
margin: 8px;
}

.headerTitle {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}


.list {
font-size: 14px;
margin-left: 30px;
list-style-type: disc;
}
30 changes: 30 additions & 0 deletions components/diagnosis/Guidelines.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import styles from './Guidelines.module.css';

const Guidelines: React.FC = () => {

return (
<div className={styles.header}>
<h2 className={styles.headerTitle}>Guidelines for Asking Questions During SIG</h2>
<p>Here are some guidelines to help you formulate questions to ask during SIG: </p>
<ul>
<li className={styles.list}>Try to scaffold as much as you can by keep asking &apos;why&apos; to get to the bottom of the issue.
For example, if a student said they didn&apos;t reach out for help, ask “why was that? Did you feel a lack of support,
or you didn&apos;t know any help-seeking channels?”</li>
<li className={styles.list}>Ask metacognitive questions! For the cognitive issues we see, there is usually a metacognitive
cause. Try asking questions like:
<ul>
<li className={styles.list}>Why did you decide to [action]?</li>
<li className={styles.list}>How did you feel when …?</li>
<li className={styles.list}>Why did you do one thing over another?</li>
<li className={styles.list}>Do you feel like your decision was a mature decision?</li>
<li className={styles.list}>Why did you feel compelled to…?</li>
<li className={styles.list}>Why is it hard for you to…?</li>
</ul>
</li>
</ul>
</div>
);
};

export default Guidelines;
14 changes: 14 additions & 0 deletions components/diagnosis/Hypothesis.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.hypo_textbox {
width: 100%;
height: 75%;
margin: 10px 0;
padding: 10px;
box-sizing: border-box;
}

.hypo_container{
margin: 10px;
padding: 20px;
background: lightgray;
height: 35vh;
}
34 changes: 34 additions & 0 deletions components/diagnosis/Hypothesis.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React, { useState } from 'react';
import styles from './Hypothesis.module.css';

interface HypothesisProps {
hypoData: { title: string; content: string };
setHypoContent: (content: string) => void;
onDelete: () => void;
}

const Hypothesis: React.FC<HypothesisProps> = ({ hypoData, setHypoContent, onDelete}) => {

const handleHypoChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
setHypoContent(event.target.value);
};

return (
<div className={styles.hypo_container} style={{ position: 'relative' }}>
<h2 className="text-lg font-semibold mb-2">{hypoData.title}</h2>
<button
onClick={onDelete}
className="absolute top-4 right-4 text-black bg-transparent border-none cursor-pointer"
>
</button>
<textarea
className={styles.hypo_textbox}
value={hypoData.content}
onChange={handleHypoChange}
/>
</div>
);
};

export default Hypothesis;
11 changes: 11 additions & 0 deletions components/diagnosis/HypothesisList.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.header {
background-color: white;
padding: 15px;
margin: 8px;
}

.headerTitle {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
Loading