diff --git a/client/src/components/DayPanels/DayPanels.less b/client/src/components/DayPanels/DayPanels.less index 8b5a36e8..1566935a 100644 --- a/client/src/components/DayPanels/DayPanels.less +++ b/client/src/components/DayPanels/DayPanels.less @@ -191,7 +191,7 @@ p { #blockly-canvas { margin: auto; width: 95%; - height: 72vh; + height: 74vh; } #console-container { diff --git a/client/src/components/MentorSubHeader/MentorSubHeader.less b/client/src/components/MentorSubHeader/MentorSubHeader.less index 45d1424d..9a42baae 100644 --- a/client/src/components/MentorSubHeader/MentorSubHeader.less +++ b/client/src/components/MentorSubHeader/MentorSubHeader.less @@ -54,3 +54,12 @@ } } } + +@media only screen and (max-width: 915px) { + + #page-header { + h1 { + width: fit-content; + } + } +} \ No newline at end of file diff --git a/client/src/views/ContentCreator/DayEditor/DayEditor.less b/client/src/views/ContentCreator/DayEditor/DayEditor.less index 04b5c4b2..b25fe8da 100644 --- a/client/src/views/ContentCreator/DayEditor/DayEditor.less +++ b/client/src/views/ContentCreator/DayEditor/DayEditor.less @@ -20,18 +20,6 @@ width: '160px'; } -// #display-code-modal { -// #display-code-btn { -// width: 15vw; -// min-height: 10vh; -// font-size: 1em; - -// &:hover { -// width: 18vw; -// } -// } -// } - .border-card-info { width: 50px; } diff --git a/client/src/views/ContentCreator/UnitEditor/UnitEditor.less b/client/src/views/ContentCreator/UnitEditor/UnitEditor.less index dbac376a..d95075e9 100644 --- a/client/src/views/ContentCreator/UnitEditor/UnitEditor.less +++ b/client/src/views/ContentCreator/UnitEditor/UnitEditor.less @@ -21,16 +21,16 @@ width: '160px'; } -#display-code-modal { +// #display-code-modal { - #display-code-btn { - width: 18vw; - min-height: 4vh; - font-size: 1em; +// #display-code-btn { +// width: 18vw; +// min-height: 4vh; +// font-size: 1em; - &:hover { - width: 20vw; - } - } - } \ No newline at end of file +// &:hover { +// width: 20vw; +// } +// } +// } \ No newline at end of file diff --git a/client/src/views/Mentor/Classroom/Classroom.less b/client/src/views/Mentor/Classroom/Classroom.less index 8972f151..4a77ea97 100644 --- a/client/src/views/Mentor/Classroom/Classroom.less +++ b/client/src/views/Mentor/Classroom/Classroom.less @@ -43,3 +43,10 @@ .ant-tabs-ink-bar { background: #colors[secondary] !important; } + +@media only screen and (max-width: 915px) { + .ant-tabs-nav-wrap, + .ant-tabs-nav { + margin: auto 10vw; + } +} diff --git a/client/src/views/Mentor/Classroom/Home/Home.js b/client/src/views/Mentor/Classroom/Home/Home.js index 5522d962..79279f55 100644 --- a/client/src/views/Mentor/Classroom/Home/Home.js +++ b/client/src/views/Mentor/Classroom/Home/Home.js @@ -126,27 +126,9 @@ export default function Home({ classroomId, viewing }) { {days.map((day) => (
- - {day.activity_template && ( - - )} +
+ Day {day.number} +

@@ -221,6 +203,29 @@ export default function Home({ classroomId, viewing }) {

) : null}
+
+ + {day.activity_template && ( + + )} +
))} diff --git a/client/src/views/Mentor/Classroom/Home/Home.less b/client/src/views/Mentor/Classroom/Home/Home.less index 716b17c9..3b2b25c1 100644 --- a/client/src/views/Mentor/Classroom/Home/Home.less +++ b/client/src/views/Mentor/Classroom/Home/Home.less @@ -30,37 +30,26 @@ #view-day-card { width: 30vw; - min-height: 30vh; + height: auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.377); border-radius: 10px; margin: 20px; + overflow: auto; #view-day-heading { background-color: #colors[quaternary]; display: flex; align-items: center; - height: 6vh; + justify-content: center; + height: 8vh; border-top-left-radius: 10px; border-top-right-radius: 10px; #view-day-title { display: inline; - font-size: 1.1em; - } - - #view-day-button { - height: 6vh; - width: 30%; - font-size: 1.2em; + font-size: 1.6em; + margin-left: 12px; font-weight: 600; - background-color: transparent; - border: none; - border-top-left-radius: 10px; - - &:hover { - cursor: pointer; - background-color: #colors[quinary]; - } } } @@ -72,12 +61,58 @@ font-size: 1.1em; line-height: 1em; word-wrap: break-word; + min-height: 30vh; strong { font-weight: 500; font-size: 1.2; } } + + #view-day-btn-container { + display: flex; + justify-content: center; + height: 6vh; + #day-template-btn { + position: relative; + bottom: 0; + margin-right: 10px; + width: 12vw; + height: 4vh; + font-size: 1em; + font-weight: 500; + border-radius: 30px; + border: none; + background: #colors[quaternary]; + color: #colors[text-primary]; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.377); + transition: 0.25s; + cursor: pointer; + + &:hover { + background-color: #colors[quinary]; + } + } + + #activity-template-btn { + width: 12vw; + height: 4vh; + font-size: 1em; + font-weight: 500; + border-radius: 30px; + border: none; + background: #colors[quaternary]; + color: #colors[text-primary]; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.377); + transition: 0.25s; + cursor: pointer; + + &:hover { + background-color: #colors[quinary]; + } + } + } + } } @@ -89,10 +124,14 @@ margin-left: 10px; #change-lesson-btn { - width: auto; + display: flex; + justify-content: center; + align-items: center; + width: fit-content; height: 2.5vh; font-size: 0.8em; font-weight: 600; + line-height: 0; border: none; color: #colors[text-primary]; background: #colors[quaternary]; @@ -103,10 +142,6 @@ &:hover { background: #colors[quinary]; } - #test { - display: flex; - justify-content: right; - } } } } @@ -117,8 +152,8 @@ right: 10vw; #display-code-btn { - width: 18vw; - min-height: 3.5vw; + width: 16vw; + min-height: 2.5vw; font-size: 1em; font-weight: 500; border-radius: 30px; @@ -130,7 +165,7 @@ cursor: pointer; &:hover { - width: 20vw; + width: 18vw; background-color: #colors[quinary]; } } @@ -151,7 +186,7 @@ float: left; margin-left: 12px; position: relative; - top: -60px; + top: -50px; &:focus { outline: none; @@ -167,3 +202,31 @@ } } } + +@media only screen and (max-width: 915px) { + + #active-learning-standard-title-container { + line-height: 20px; + padding-top: 2vh; + } + + #home-content-container { + #card-btn-container { + grid-template-columns: auto; + #view-day-card { + width: 90%; + #view-day-heading { + #view-day-button { + width: fit-content; + } + } + } + } + } + + #display-code-modal { + #display-code-btn { + width: 40vw; + } + } +} diff --git a/client/src/views/Mentor/Classroom/Home/LearningStandardSelect/LearningStandardModal.js b/client/src/views/Mentor/Classroom/Home/LearningStandardSelect/LearningStandardModal.js index 862197d0..4c390c1c 100644 --- a/client/src/views/Mentor/Classroom/Home/LearningStandardSelect/LearningStandardModal.js +++ b/client/src/views/Mentor/Classroom/Home/LearningStandardSelect/LearningStandardModal.js @@ -74,7 +74,7 @@ export default function LearningStandardModal({ return (
{ const { saveID } = useParams(); @@ -22,6 +22,11 @@ const Replay = () => { const [playSpeed, setPlaySpeed] = useState(500); const navigate = useNavigate(); const [action, setAction] = useState(''); + const [student, setStudent] = useState(''); + const [className, setClassName] = useState(''); + const [lesson, setLesson] = useState(''); + const [session, setSession] = useState(''); + const [isToggle, setIsToggle] = useState(true); const reducer = (state, action) => { switch (action.type) { @@ -50,12 +55,36 @@ const Replay = () => { }; useEffect(() => { - const getReplay = async () => { - const save = await getSave(saveID); - console.log(save.data.replay); - setReplay(save.data.replay); + // const getReplay = async () => { + // const save = await getSave(saveID); + // console.log(save.data.replay); + // setReplay(save.data.replay); + // }; + // getReplay(); + + + const getData = async () => { + const session = await getSession(saveID); + setSession(session.data); + console.log(session.data); + + const fetchedStudents = session.data.students[0].name; + setStudent(fetchedStudents); + + const fetchedClassroomNames = session.data.classroom.name; + setClassName(fetchedClassroomNames); + + const fetchedLesson = session.data.learning_standard.name; + setLesson(fetchedLesson); + + if (session.data.saves?.length) { + const latestSave = session.data.saves[session.data.saves.length - 1]; + const save = await getSave(latestSave.id); + // console.log(save.data.replay); + setReplay(save.data.replay); + } }; - getReplay(); + getData(); }, []); // const dataSource = [ @@ -123,6 +152,11 @@ const Replay = () => { setIsPlaying(false); }, [playbackRef]); + function onChange(checked) { + console.log(`switch to ${checked}`); + setIsToggle(checked); + } + //handle dynamic playback changes useEffect(() => { if (replay.length) { @@ -148,6 +182,14 @@ const Replay = () => {
+
+ +
+
+

{className}

+

{lesson}

+

{student}

+
{
-
+
🐢 {
-

{`Action: ${action}`}

{ className='flex flex-column vertical-container overflow-visible' >

Code Replay

-
+
+

{`Action: ${action}`}

+
{/*
{ replay.map((item, index) =>
{timeConverter(item.timestamp)}
)}
*/} diff --git a/client/src/views/Replay/Replay.less b/client/src/views/Replay/Replay.less index 9c54d86c..6fb66333 100644 --- a/client/src/views/Replay/Replay.less +++ b/client/src/views/Replay/Replay.less @@ -1,5 +1,21 @@ @import '../../assets/style.less'; +#replay-heading { + margin-bottom: 10px; + + h1, h2 { + margin: 0; + color: white; + } + + .hide-name { + display: none; + } + + .show-name { + } +} + #timeline-container { display: flex; justify-content: center; @@ -39,6 +55,8 @@ } #description-container { + display: flex; + align-items: center; border-radius: 10px; top: 10px; } @@ -47,6 +65,28 @@ font-size: 18px; } +#toggle { + width: 100%; + margin-bottom: 20px; + justify-content: flex-end; + .ant-switch { + border: solid 1px; + border-color: white; + } +} + + +#action { + position: absolute; + top: 14px; + right: 50px; + font-size: 1.2em; +} + +#slider { + margin-right: 10px; +} + .playspeed-slider { width: 100px; .ant-slider-rail, diff --git a/client/src/views/Researcher/DayLevelReport.js b/client/src/views/Researcher/DayLevelReport.js index 5f46b0db..d3cd6664 100644 --- a/client/src/views/Researcher/DayLevelReport.js +++ b/client/src/views/Researcher/DayLevelReport.js @@ -237,13 +237,13 @@ const DayLevelReport = () => {
) : ( -
+
)}
-

Current Filter:

+

Current Filter:

{Object.keys(paramObj).map((key) => ( {key === 'grade' ? `${key}(id)` : key}: {paramObj[key]} @@ -412,7 +412,7 @@ const Filter = ({ setSearchParam }) => { ))} -

Or

+

Or