-
Notifications
You must be signed in to change notification settings - Fork 5
Teacher onboarding overview #1559
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
843100f
Implement basic overview page
mwtrew ce9fd54
Add fingerprint background
mwtrew 61300d3
Adjust title padding on Overview
mwtrew 51497c1
Resize icon for consistency
mwtrew ea70f2f
Use wide margin on larger displays
mwtrew 3cd3319
Replace homepage with Overview for logged-in teachers
mwtrew 6255cad
Merge branch 'redesign-2024' of github.com:isaacphysics/isaac-react-a…
mwtrew 97892e6
Revert "Replace homepage with Overview for logged-in teachers"
mwtrew dfeefda
Redirect teachers to dashboard on login
mwtrew c5f7b71
Add nav item for overview
mwtrew 4804b08
Add VRT, make route teacher or above
mwtrew e5b2704
Update VRT
mwtrew e1e7e3f
Update VRT baselines
actions-user 188b20f
Merge pull request #1578 from isaacphysics/vrt/teacher-onboarding-ove…
mwtrew d5a4ea0
Move getAfterAuthPath()
mwtrew 174cf85
Merge branch 'teacher-onboarding-overview' of github.com:isaacphysics…
mwtrew 60b4a97
Also use redirect logic for MFA and signup
mwtrew File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import React from "react"; | ||
import {PageTitle} from "../elements/PageTitle"; | ||
import {Button, Container, Row} from "reactstrap"; | ||
import {ColumnSlice} from "../elements/layout/ColumnSlice"; | ||
import {IconCard} from "../elements/cards/IconCard"; | ||
import {useDeviceSize} from "../../services"; | ||
import {selectors, useAppSelector, useGetNewsPodListQuery} from "../../state"; | ||
import {useLinkableSetting} from "../../services/linkableSetting"; | ||
import {NewsCard} from "../elements/cards/NewsCard"; | ||
|
||
export const Overview = () => { | ||
const {data: news} = useGetNewsPodListQuery({subject: "news"}); | ||
const deviceSize = useDeviceSize(); | ||
const userPreferences = useAppSelector(selectors.user.preferences); | ||
const showNewsletterPrompts = !userPreferences?.EMAIL_PREFERENCE?.NEWS_AND_UPDATES; | ||
const {setLinkedSetting} = useLinkableSetting(); | ||
return <div id={"overview"}> | ||
<section id="browse"> | ||
<Container className="overview-padding mw-1600"> | ||
<div id={"page-title"} className={"py-3"}> | ||
<PageTitle currentPageTitle={"Overview"} /> | ||
</div> | ||
<h2>Browse Ada CS</h2> | ||
<ColumnSlice className={"row-cols-lg-4 row-cols-md-2"}> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Student groups", | ||
icon: {src: "/assets/cs/icons/group-cyan.svg"}, | ||
bodyText: "Organise your students into groups so you can set appropriate work.", | ||
clickUrl: "/groups", | ||
buttonText: "Manage groups", | ||
buttonStyle: "link", | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Quizzes", | ||
icon: {src: "/assets/cs/icons/file-cyan.svg"}, | ||
bodyText: "Create self-marking quizzes and assign them to your students.", | ||
clickUrl: "/quizzes/set", | ||
buttonText: "Assign a quiz", | ||
buttonStyle: "link", | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Tests", | ||
icon: {src: "/assets/cs/icons/school.svg"}, | ||
bodyText: "Set a test curated by the Ada Computer Science team.", | ||
clickUrl: "/set_tests/", | ||
buttonText: "Set a test", | ||
buttonStyle: "link", | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Review your markbook", | ||
icon: {src: "/assets/cs/icons/done_all.svg"}, | ||
bodyText: "Track student progress and pinpoint areas to work on.", | ||
clickUrl: "/my_markbook", | ||
buttonText: "View markbook", | ||
buttonStyle: "link", | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Assigned to me", | ||
icon: {src: "/assets/cs/icons/person_check.svg"}, | ||
bodyText: "If you join a group for your development, this is where you’ll find quizzes assigned to you.", | ||
clickUrl: "/assignments", | ||
buttonText: "Work for you", | ||
buttonStyle: "link", | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Account", | ||
icon: {src: "/assets/cs/icons/settings.svg"}, | ||
bodyText: "Manage all aspects of your account, from content settings to notification preferences.", | ||
clickUrl: "/account", | ||
buttonText: "Account settings", | ||
buttonStyle: "link" | ||
}}/> | ||
<IconCard className={"without-margin"} card={{ | ||
title: "Need help?", | ||
icon: {src: "/assets/cs/icons/help-cyan.svg"}, | ||
bodyText: "Our teacher support page has useful information for common questions and issues.", | ||
clickUrl: "/support/teacher/general", | ||
buttonText: "Teacher support", | ||
buttonStyle: "link", | ||
}}/> | ||
</ColumnSlice> | ||
</Container> | ||
</section> | ||
|
||
<section id="news"> | ||
<Container className="overview-padding mw-1600"> | ||
{news && news.length > 0 && <> | ||
<h2>News</h2> | ||
<Row xs={12} | ||
className="d-flex flex-row row-cols-1 row-cols-sm-2 row-cols-lg-3 row-cols-xl-4 isaac-cards-body justify-content-around my-3"> | ||
{news.slice(0, deviceSize === "lg" ? 3 : 4).map((n, i) => <NewsCard key={i} newsItem={n} | ||
showTitle | ||
cardClassName="bg-cultured-grey"/>)} | ||
</Row> | ||
<div className={"mt-4 mt-lg-7 w-100 text-center"}> | ||
<Button href={"/news"} color={"link"}><h4 className={"mb-0"}>See more news</h4></Button> | ||
</div> | ||
</>} | ||
</Container> | ||
</section> | ||
|
||
<section id="newsletter"> | ||
<Container className="overview-padding mw-1600"> | ||
{showNewsletterPrompts && | ||
<Row xs={12} className="mt-3"> | ||
<IconCard | ||
card={{ | ||
title: "Stay updated", | ||
icon: {src: "/assets/cs/icons/mail.svg"}, | ||
bodyText: "Update your preferences and be the first to hear about new features, challenges, topics, and improvements on the platform.", | ||
clickUrl: "/account#notifications", | ||
buttonText: "Join our newsletter", | ||
onButtonClick: () => { | ||
setLinkedSetting("news-preference"); | ||
} | ||
}} | ||
/> | ||
</Row> | ||
} | ||
</Container> | ||
</section> | ||
</div>; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.