diff --git a/components/BlocklyEditor.tsx b/components/BlocklyEditor.tsx
index 8b58fdf..0567bb8 100644
--- a/components/BlocklyEditor.tsx
+++ b/components/BlocklyEditor.tsx
@@ -1,14 +1,20 @@
-import React, { useState } from 'react';
+import React, { useEffect, useState } from 'react';
import { BlocklyWorkspace } from 'react-blockly';
import { toolboxCategories } from '../lib/blockly/customBlocks/customToolboxCategories';
import { javascriptGenerator } from 'blockly/javascript';
-export default function BlockEditor() {
- const [xml, setXml] = useState('');
+export default function BlockEditor({ workspaceId, RCs, setRCs, index } : any) {
+ // const [xml, setXml] = useState('');
const [javascriptCode, setJavascriptCode] = useState('');
+ const setXml = (e : any) => {
+ let copy = [...RCs]
+ copy[index].strategy = e
+ setRCs(copy)
+ }
+
const initialXml =
- '';
+ '';
function workspaceDidChange(workspace) {
// console.log(workspace);
@@ -19,7 +25,9 @@ export default function BlockEditor() {
return (
<>
+ {workspaceId === 'workspace1' && (
+ )}
+ {workspaceId === 'workspace2' && (
+ )}
+ {workspaceId === 'workspace3' && (
+ )}
+ {workspaceId === 'workspace4' && (
+ )}
+ {workspaceId === 'workspace5' && (
+ )}
+ {workspaceId === 'workspace6' && (
+ )}
+ {workspaceId === 'workspace7' && (
+ )}
+ {workspaceId === 'workspace8' && (
+ )}
+ {workspaceId === 'workspace9' && (
+ )}
+ {workspaceId === 'workspace10' && (
+ )}
>
);
-}
+}
\ No newline at end of file
diff --git a/components/Context.module.css b/components/Context.module.css
new file mode 100644
index 0000000..3ad1368
--- /dev/null
+++ b/components/Context.module.css
@@ -0,0 +1,18 @@
+
+.container {
+ background-color: #BBB;
+ height: 100%;
+ padding: 10px;
+}
+
+.container select {
+ width: 100%;
+ border-radius: 5px;
+ margin-bottom: 10px;
+}
+
+.contexts {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 10px 20px;
+}
\ No newline at end of file
diff --git a/components/Context.tsx b/components/Context.tsx
new file mode 100644
index 0000000..179f059
--- /dev/null
+++ b/components/Context.tsx
@@ -0,0 +1,35 @@
+import styles from "./Context.module.css"
+import { Tag } from "./Tag"
+
+const options = ["Sprint log-Total Points Spent this Sprint",
+ "Sprint log-Total Points Commited this Sprint",
+ "Sprint log-Summary of Stories",
+ "Sprint log-Summary of Tasks",
+ "Sprint log-Riskiest Risk specified in Planning View",
+ "PRC-Specific Slides (Under construction)",
+ "PRC-Time Last Edited",
+ "PRC-Slides Updated in this sprint",
+ "Github-Number of Lines Code Committed this sprint",
+ "Github-Number of Branches Created this sprint",
+ "Github-Summary of Commits made this sprint"]
+
+export const Context = ({index, RCs, setRCs} : any) => {
+
+ const addContext = (val : string) => {
+ let copy = [...RCs]
+ copy[index].context.add(val)
+ setRCs(copy)
+ }
+
+ return (
+
+
+
+ {[...RCs[index].context].map((x: any) => )}
+
+
+ )
+}
\ No newline at end of file
diff --git a/components/Detector.module.css b/components/Detector.module.css
new file mode 100644
index 0000000..c0a082c
--- /dev/null
+++ b/components/Detector.module.css
@@ -0,0 +1,14 @@
+.container {
+ margin-bottom: 40px;
+}
+
+.container .blockly {
+ width: '100%';
+ height: 300px;
+ border: 2px solid gray;
+}
+
+.container h2 {
+ font-size: 20px;
+ margin-bottom: 10px;
+}
\ No newline at end of file
diff --git a/components/Detector.tsx b/components/Detector.tsx
new file mode 100644
index 0000000..41ff111
--- /dev/null
+++ b/components/Detector.tsx
@@ -0,0 +1,17 @@
+import dynamic from 'next/dynamic';
+import styles from './Detector.module.css'
+
+const BlocklyEditor = dynamic(() => import('./BlocklyEditor'), { ssr: false });
+
+export const Detector = () => {
+
+ return (
+
+
Detector
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/components/MainBody.module.css b/components/MainBody.module.css
index 3ef3514..3e82992 100644
--- a/components/MainBody.module.css
+++ b/components/MainBody.module.css
@@ -1,108 +1,4 @@
-.carouselContainer {
- width: 100%;
- position: relative;
- display: flex;
- justify-content: start;
-}
-
-.guideStep {
- margin-top: 1rem;
- margin-left: 2rem;
- padding: 0;
- margin-bottom: 1rem;
-}
-
-.guideHeader {
- font-size: 1.5rem;
- font-weight: 600;
-}
-
-.guideDescription {
- font-size: 1rem;
- font-weight: 400;
-}
-
-.list {
- margin: 20px 0;
- padding: 0;
- list-style-type: none;
-}
-
-.listItem {
- display: flex;
- align-items: center;
- margin-right: 40px;
-}
-
-.itemNumber {
- margin-right: 10px;
- font-weight: bold;
- margin-left: 6px;
-}
-
-.addItem {
- margin-left: 10px;
- background-color: #4caf50;
- border: none;
- border-radius: 2px;
- color: white;
- padding: 5px 10px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 14px;
- cursor: pointer;
-}
-
-.addItem:hover {
- background-color: #3e8e41;
-}
-
-.causeInput {
- padding: 5px;
- border: 1px solid #ccc;
- display: block;
- width: 100%;
- overflow: hidden;
- resize: both;
- min-height: 40px;
- line-height: 20px;
-}
-
-.causeInput[contenteditable]:empty::before {
- content: 'Write your root cause here...';
- color: gray;
-}
-
-.strategyInput {
- padding: 5px;
- border: 1px solid #ccc;
- display: block;
- width: 100%;
- overflow: hidden;
- resize: both;
- min-height: 40px;
- line-height: 20px;
-}
-
-.strategyInput[contenteditable]:empty::before {
- content: 'Write your strategy here...';
- color: gray;
-}
-
-.scaffoldingHeader {
- margin-left: 6px;
- margin-top: 6px;
-}
-
-.textInput {
- margin: 6px;
- border: 1px solid #ccc;
- padding: 10px;
- width: 90%;
- height: auto;
- min-height: 150px;
- max-height: 250px;
+.container {
+ padding: 20px;
overflow-y: scroll;
- resize: vertical;
-}
+}
\ No newline at end of file
diff --git a/components/MainBody.tsx b/components/MainBody.tsx
index f6d715c..9d958c7 100644
--- a/components/MainBody.tsx
+++ b/components/MainBody.tsx
@@ -1,338 +1,13 @@
-import dynamic from 'next/dynamic';
import styles from './MainBody.module.css';
-import { Carousel } from '@mantine/carousel';
-import { rem } from '@mantine/core';
-import { BottomRow } from 'blockly/core/renderers/zelos/zelos';
-// import List from '../components/List.jsx';
-
-const BlocklyEditor = dynamic(() => import('./BlocklyEditor'), { ssr: false });
+import { Detector } from './Detector';
+import { RootCauses } from './RootCauses';
export const MainBody = () => {
- const scaffoldingSteps = [
- {
- step: 'Step 1: Describe the situation to script for',
- prompt: (
- <>
- Think back to a time when one of your students was not working or
- learning effectively this quarter. Describe what the student did and
- how you noticed it was happening.
- >
- ),
- example: (
- <>
-
- {' '}
- Example:
- Student was building prototype to polish, and not actively
- thinking about how what they were building would help them test. I
- noticed this during office hours when the student felt like
- they needed to build features but didn't have plans to test
- them.{' '}
-
- >
- ),
- },
- {
- step: 'Step 2: Based on your understanding of your students, what do you think is causing this situation? List several if you think there are multiple potential causes',
- prompt: (
- <>
- After you noticed the above situation, how did you support your
- student in practicing a more effective working or learning strategy?
- >
- ),
- example: (
- <>
-
- {' '}
- Example: I encouraged the student to
- test the prototype
- {' '}
- in its imperfect state so we could understand its implications.{' '}
-
- >
- ),
- },
- {
- step: 'Step 3: Formulate a help strategy for the potential cause(s) identified in step 2. If you identified multiple potential causes, strategize for each one.',
- prompt: (
- <>
- Based on your answers for Steps 1 and 2, write pseudocode for both the
- situation and the support strategy. There's no need to get all
- the details in the pseudocode here, please refer to the example below.
- >
- ),
- example: (
- <>
-
- Example:
-
-
-
- Situation: when student is building prototype but does not
- have a plan to test it
-
-
- Strategy: send Slack message: "Before you continue
- building tech, could you test the ARGUMENTS faster in a lower
- fidelity" at 1 hour before SIG
-
- The execution flow of a script is as such:
- -- Detector triggers
- -- send message to you that provide 1. suggestions for root
- causes 2. context information to help you diagnose the cause
- of the problem
- -- you select a root cause by replying to the
- message
- -- system execute strategy for the root cause
- selected
-
-
-
-
-
-
Step 2: Script Scope
-
- A general script consists of 4 parts:{' '}
- Scope, Detector, Message Constructor, and Strategies.{' '}
-
-
- Let's first define the scope of this script! Who do you want
- this script to apply for? Is it a specific SIG? Is it all
- projects?
- You will specify your scope by attaching a "Scope" block to
- the "I want this script to apply to" block.
-
- Take a look at the "Scope" blocks under Social Structures
-
-
-
-
-
-
-
- Step 3: Script Detector
-
-
-
- Now that we have a scope, let's define how we will detect
- the situation.
- {' '}
-
- You can build the detector by attaching different condition
- blocks to the blue "Detector (=if)" block.
- After the Don't worry about detecting any root causes in the
- detector.{' '}
- {/*
- Hint: you can combine different conditions using the
- "Logic" blocks.
- */}
- {/*
- Note: if your scope contains more than one object (1+
- projects, SIGs etc.), the detector and strategy will
- automatically run for each object. */}
-
-
-
-
-
-
- Step 4: Construct Message
-
-
-
- After the Detector triggers, the system will send a slack
- message to you to notify you of the situation.
- {' '}
-
- You can customize your own message under the yellow
- "Construct Message" block, adding situation name, root
- causes, context, memo to yourself etc..
- For each root causes, first enter a description, then some
- context information that you would like to know to help you
- diagnose the situation.
-
- e.g. you can use data from the tools (check under "Sprint"
- "Canvases") or use a text block to write a memo to
- yourself to remind you to ask further about the issue!
-
-
-
-
-
-
-
- Step 4: Script Strategies
-
-
-
- When this situation is detected, what do you want to do
- about it?
- {' '}
- You can use the blue "Strategy" block to include
- how you want to support your students. A situation
- can also have multiple strategies. Use the "Set of" green
- block to declare a set of strategies. Then, attach the
- strategies to a "Root Cause" block to specify which root
- cause it addresses.
-
- e.g. one strategy could be to send a slack message to
- yourself/your student when something comes up (look under
- "Communication")
-
-
+ )
+}
\ No newline at end of file
diff --git a/components/RootCauses.module.css b/components/RootCauses.module.css
new file mode 100644
index 0000000..c097a6b
--- /dev/null
+++ b/components/RootCauses.module.css
@@ -0,0 +1,10 @@
+
+.header {
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr 50px;
+ text-align: center;
+}
+
+.header > * {
+ padding: 0px;
+}
\ No newline at end of file
diff --git a/components/RootCauses.tsx b/components/RootCauses.tsx
new file mode 100644
index 0000000..4efaaf7
--- /dev/null
+++ b/components/RootCauses.tsx
@@ -0,0 +1,29 @@
+import { useState } from "react"
+import styles from "./RootCauses.module.css"
+import { RootCause } from "./RootCause"
+
+export const RootCauses = () => {
+
+ const [RCs, setRCs] = useState([{id: 1, rootCause: "", context: new Set(), strategy: ''}]);
+
+ const addRC = () => {
+ let copy = [...RCs];
+ copy.push({id: copy.length + 1, rootCause: "", context: new Set(), strategy: ''});
+ setRCs(copy);
+ };
+
+ return (
+
+
+
+
Potential Cause(s)
+
Context
+
Strategy
+
+
+
+ {RCs.map((x, i) => )}
+
+
+ )
+}
\ No newline at end of file
diff --git a/components/Sidebar.module.css b/components/Sidebar.module.css
new file mode 100644
index 0000000..9498d60
--- /dev/null
+++ b/components/Sidebar.module.css
@@ -0,0 +1,70 @@
+.container {
+ background-color: lightgray;
+ padding: 20px;
+ /* min-height: 100vh; */
+ border-right: 2px solid gray;
+}
+
+.container h1 {
+ font-size: 24px;
+ text-align: center;
+ font-weight: bold;
+ margin-bottom: 20px;
+}
+
+.step {
+ margin-bottom: 10px;
+}
+
+.step h2 {
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+.step p {
+ font-size: 12px;
+}
+
+.textareaContainer {
+ margin: 10px 0px;
+ }
+
+.textarea {
+ width: 100%;
+ padding: 2px;
+}
+
+.textarea::placeholder {
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+ color: gray;
+ }
+
+.carouselContainer{
+ width: 100%;
+ height: 100%;
+ }
+
+.mantine-3sllvz{
+ height: 100%;
+}
+
+/* .carousel {
+ width: 100%;
+ height: 100%;
+ border-color: black;
+ } */
+
+ .carouselControls {
+ margin-top: 37vh;
+ justify-content: center;
+ gap: 20px;
+ }
+
+ .carouselControl {
+ padding: 12px;
+ border-radius: 2px;
+ border-style: solid;
+ border-width: 1px;
+ border-color: black;
+ }
\ No newline at end of file
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
new file mode 100644
index 0000000..7d0650e
--- /dev/null
+++ b/components/Sidebar.tsx
@@ -0,0 +1,77 @@
+import styles from './Sidebar.module.css';
+import { Carousel } from '@mantine/carousel';
+
+const steps = [
+ [{ title: "Getting started", instructions: "A general script consists of 4 parts: Detector, Potential Causes, Context for Key Cause Diagnosis, and Strategies. "},
+ { title: "1. The Detector", instructions: "Describe the situation that you want to script for. "},
+ { title: "1.1 Scope", instructions: "First, specify who you want this script to apply for. Is it a specific SIG? Is it all projects? Take a look at the 'Scope' blocks under Social Structures."
+ + "Attach a 'Scope' block to the 'I want this script to apply to' block."},
+ { title: "1.2 Detecting the situation", instructions: "Think back to a time when this situation happened. What did the student do and how did you notice it was happening? Using the blocks on the right, build a detector that can help you know when the problem is happening."}],
+ [{ title: "2. Potential Causes", instructions: "Based on your understanding of your students, what do you think is causing this situation? Under Potential Causes, list the common reasons why your student might be struggling with the issue."},
+ {instructions: "Use the add button on the right to add more potential causes. Use the X button to delete causes."},
+ { title: "Example", instructions: "Potential reasons why a student marked the task for writing a research proposal as 'BACKLOGGED' might include lack of clarity for the project, lack of experience with writing research proposals, priority shifted to other tasks etc."}],
+ [{ title: "3. Context for Root Cause Diagnosis", instructions: "Using the dropdown, select some context information to help you diagnose the key root cause. When the detector triggers, the context information you selected will be sent to you to help you diagnose exactly which root cause is causing the struggling."},
+ { title: "Example", instructions: "Say that you selected 'Sprint Log-Summary of Stories' for your script that detects whether your student is overcommitted. When the detector triggers you will receive a summary of the stories in their sprint log, which you can read to help you understand why they're overcommiting."}],
+ [{ title: "4. Strategies", instructions: "Formulate a help strategy for the potential cause(s) identified in step 2. If you identified multiple potential causes, design a tailored strategy for each one."},
+ { title: "Tips", instructions: "1. Leverage context info. E.g. if you decide to address the issue during SIG, think about how you can use your knowledge of the situation and the key cause behind it to help students learn more effectively."},
+ { instructions: "2. If the student is a first-quarter DTR student, consider recommending them to meet with their onboarding mentors."}]
+]
+
+export const Sidebar = () => {
+
+ return (
+