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

UI updates #636

Merged
merged 32 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
02107ef
decrease font size
AngelaZQ1 Oct 15, 2023
bb3a351
italicize directions, add colon
AngelaZQ1 Oct 17, 2023
d4efaa8
modify neutral.300 to be the "gray" color style in figma
AngelaZQ1 Oct 18, 2023
b205207
sidebar color updates, remove some colors that arent used
AngelaZQ1 Oct 18, 2023
8b620ba
lighten sidebar hover bg color
AngelaZQ1 Oct 18, 2023
9f9802c
remove background color from error icon when clicking
AngelaZQ1 Oct 18, 2023
df22442
remove background color variable, only use blue.light
AngelaZQ1 Oct 18, 2023
d799fa0
update year hover and active colors
AngelaZQ1 Oct 18, 2023
65e3096
update button colors
AngelaZQ1 Oct 18, 2023
b983118
change transfer courses bg + hover
AngelaZQ1 Oct 19, 2023
5ebcbc7
neutral.200 -> gray2
AngelaZQ1 Oct 19, 2023
551ec13
remove border from transfer courses button
AngelaZQ1 Oct 19, 2023
d2845b4
add + icon to add year button
AngelaZQ1 Oct 19, 2023
93051d9
move checkbox to left
AngelaZQ1 Oct 19, 2023
ee85a02
move checkbox edit plan modal
AngelaZQ1 Oct 19, 2023
d7537f4
change name input fields to md
AngelaZQ1 Oct 19, 2023
735599d
decrease spacing between label and input
AngelaZQ1 Oct 19, 2023
3e03cbd
remove extra "
AngelaZQ1 Oct 20, 2023
01dc4fb
add back open year color
AngelaZQ1 Oct 20, 2023
8d4cbbc
delete plan border width
AngelaZQ1 Oct 20, 2023
c608ebf
update year active color
AngelaZQ1 Oct 22, 2023
6eb83c0
Merge remote-tracking branch 'origin' into ui-updates
AngelaZQ1 Oct 22, 2023
9469039
decrease spacing between home page title
AngelaZQ1 Oct 22, 2023
cc8ec18
neutral.main -> neutral.gray
AngelaZQ1 Oct 25, 2023
0108355
remove neutral.main
AngelaZQ1 Oct 25, 2023
56178ea
use neutral.gray
AngelaZQ1 Oct 25, 2023
ca874a0
Merge remote-tracking branch 'origin' into ui-updates
AngelaZQ1 Oct 25, 2023
2caf0a9
fix color
AngelaZQ1 Oct 25, 2023
bb6cfca
Merge remote-tracking branch 'origin' into ui-updates
AngelaZQ1 Oct 25, 2023
baf22c0
Merge remote-tracking branch 'origin' into ui-updates
AngelaZQ1 Nov 2, 2023
fefc581
more styling changes, remove GrayButton
AngelaZQ1 Nov 3, 2023
3cd027a
fix neutral gray color styles
AngelaZQ1 Nov 6, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ export class EmailConfirmationController {
if (email instanceof Error) {
throw new BadRequestException();
}
const updateResult =
await this.emailConfirmationService.confirmEmail(email);
const updateResult = await this.emailConfirmationService.confirmEmail(
email
);
if (updateResult instanceof EmailAlreadyConfirmed) {
throw new BadRequestException("Email is already confirmed");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ export const AddCourseButton: React.FC<AddCourseButtonProps & ButtonProps> = ({
...buttonProps
}) => {
const hoverStyle = {
backgroundColor: "neutral.700",
borderColor: "primary.blue.dark.300",
borderColor: "neutral.300",
};

const activeStyle = {
backgroundColor: "neutral.900",
borderColor: "primary.blue.dark.300",
transform: "scale(0.96)",
backgroundColor: "neutral.200",
borderColor: "neutral.200",
};

return (
Expand All @@ -27,8 +25,10 @@ export const AddCourseButton: React.FC<AddCourseButtonProps & ButtonProps> = ({
size="md"
margin="0"
borderRadius="10px"
borderColor="neutral.main"
backgroundColor="neutral.main"
border="1px"
borderColor="neutral.50"
backgroundColor="neutral.50"
boxShadow="sm"
_hover={hoverStyle}
_active={activeStyle}
color="primary.blue.light.main"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const SearchCoursesInput: React.FC<SearchCoursesInputProps> = ({
borderRadius={10}
fontSize="sm"
color="primary.blue.light.main"
backgroundColor="neutral.main"
backgroundColor="neutral.100"
placeholder="SEARCH BY NAME, CRN, ETC."
/>
</InputGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const SearchResult: React.FC<SearchResultProps> = ({
<Heading size="sm" fontWeight="normal">
{searchResult.name}
</Heading>
<Text fontSize="12px" color="neutral.main.900" fontStyle="italics">
<Text fontSize="12px" fontStyle="italics">
{getCourseDisplayString(searchResult)}
</Text>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const SelectedCourse: React.FC<SelectedCourseProps> = ({
<Flex
borderRadius="md"
boxShadow="md"
backgroundColor="neutral.main"
backgroundColor="neutral.100"
alignItems="center"
>
<Text pl="sm" pr="2xs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export const AuthenticationPageLayout: React.FC<
<GraduatePreAuthHeader />
<Grid templateColumns="repeat(8, 1fr)" templateRows="1fr" flexGrow={1}>
<GridItem colSpan={3}>{form}</GridItem>
<GridItem
colSpan={5}
backgroundColor="neutral.main"
position="relative"
>
<GridItem colSpan={5} backgroundColor="neutral.100" position="relative">
<Image
src="/app_snippet.png"
alt="GraduateNU app snippet"
Expand Down
1 change: 1 addition & 0 deletions packages/frontend-v2/components/Button/BlueButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const BlueButton: ComponentWithAs<"button", ButtonProps> = ({
}) => {
return (
<Button
border="1px"
variant="outline"
borderColor="primary.blue.light.main"
colorScheme="primary.blue.light"
Expand Down
18 changes: 0 additions & 18 deletions packages/frontend-v2/components/Button/GrayButton.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/frontend-v2/components/Button/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./BlueButton";
export * from "./GrayButton";
8 changes: 4 additions & 4 deletions packages/frontend-v2/components/Form/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export const GraduateInput = forwardRef<HTMLInputElement, InputProps>(
({ error, helpMessage, formLabel, ...rest }, ref) => (
<FormControl isInvalid={error != undefined}>
{formLabel && (
<FormLabel>
<FormLabel mb="1px">
<Text color="primary.blue.dark.main">{formLabel}</Text>
</FormLabel>
)}
<Input
{...rest}
ref={ref}
size="lg"
size="md"
variant="outline"
borderColor="neutral.main"
borderColor="neutral.100"
borderWidth="2px"
borderRadius="lg"
errorBorderColor="red.300"
Expand All @@ -57,7 +57,7 @@ export const PlanInput = forwardRef<HTMLInputElement, PlanInputProps>(
color="primary.blue.dark.main"
size="md"
fontWeight="medium"
mb="2xs"
mb="1px"
>
{label}
</FormLabel>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-v2/components/Form/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const PlanSelect: React.FC<PlanSelectProps> = ({
color="primary.blue.dark.main"
size="md"
fontWeight="medium"
mb="2xs"
mb="4xs"
>
{label}
</FormLabel>
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend-v2/components/Header/AccountOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const AccountOverview: React.FC<AccountOverviewProps> = ({
/>
</Flex>
<FormControl>
<FormLabel>
<FormLabel mb="4xs">
<Text>Email</Text>
</FormLabel>
<Input
Expand All @@ -139,7 +139,7 @@ export const AccountOverview: React.FC<AccountOverviewProps> = ({
type="email"
size="md"
variant="outline"
borderColor="neutral.main"
borderColor="neutral.100"
borderWidth="2px"
borderRadius="md"
/>
Expand Down
14 changes: 7 additions & 7 deletions packages/frontend-v2/components/Plan/AddPlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ export const AddPlanModal: React.FC<AddPlanModalProps> = ({
})}
/>
<Flex alignItems="center">
<Checkbox
mb="0"
mr="xs"
borderColor="primary.blue.dark.main"
isChecked={isNoMajorSelected}
onChange={() => setIsNoMajorSelected(!isNoMajorSelected)}
/>
<Text
color="primary.blue.dark.main"
size="md"
Expand All @@ -153,13 +160,6 @@ export const AddPlanModal: React.FC<AddPlanModalProps> = ({
>
No Major
</Text>
<Checkbox
mb="0"
mr="xs"
borderColor="primary.blue.dark.main"
isChecked={isNoMajorSelected}
onChange={() => setIsNoMajorSelected(!isNoMajorSelected)}
/>
<HelperToolTip label={noMajorHelperLabel} />
</Flex>
{!isNoMajorSelected && (
Expand Down
7 changes: 6 additions & 1 deletion packages/frontend-v2/components/Plan/AddYearButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PlanModel } from "@graduate/common";
import { addEmptyDndYearToPlan } from "../../utils";
import { BlueButton } from "../Button";
import { AddIcon } from "@chakra-ui/icons";

interface AddYearButton {
plan: PlanModel<string>;
Expand All @@ -15,5 +16,9 @@ export const AddYearButton: React.FC<AddYearButton> = ({
const updatedPlan = addEmptyDndYearToPlan(plan);
mutateStudentWithUpdatedPlan(updatedPlan);
};
return <BlueButton onClick={addYear}>Add Year</BlueButton>;
return (
<BlueButton onClick={addYear} leftIcon={<AddIcon />}>
Add Year
</BlueButton>
);
};
1 change: 1 addition & 0 deletions packages/frontend-v2/components/Plan/DeletePlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const DeletePlanModal: React.FC<DeletePlanModalProps> = ({
icon={<DeleteIcon />}
aria-label="Delete plan"
variant="outline"
border="1px"
borderColor="primary.red.main"
colorScheme="primary.red"
color="primary.red.main"
Expand Down
14 changes: 7 additions & 7 deletions packages/frontend-v2/components/Plan/EditPlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ export const EditPlanModal: React.FC<EditPlanModalProps> = ({ plan }) => {
})}
/>
<Flex alignItems="center">
<Checkbox
mb="0"
mr="xs"
borderColor="primary.blue.dark.main"
isChecked={isNoMajorSelected}
onChange={() => setIsNoMajorSelected(!isNoMajorSelected)}
/>
<Text
color="primary.blue.dark.main"
size="md"
Expand All @@ -187,13 +194,6 @@ export const EditPlanModal: React.FC<EditPlanModalProps> = ({ plan }) => {
>
No Major
</Text>
<Checkbox
mb="0"
mr="xs"
borderColor="primary.blue.dark.main"
isChecked={isNoMajorSelected}
onChange={() => setIsNoMajorSelected(!isNoMajorSelected)}
/>
<HelperToolTip label={noMajorHelperLabel} />
</Flex>
{!isNoMajorSelected && (
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend-v2/components/Plan/ReqErrorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ReqErrorModal: React.FC<ReqErrorModalProps> = ({
}}
_active={{ background: "primary.red.900" }}
onClick={() => {
setHovered(false)
setHovered(false);
onOpen();
}}
>
Expand All @@ -70,7 +70,7 @@ export const ReqErrorModal: React.FC<ReqErrorModalProps> = ({
<ModalHeader
textAlign="center"
borderBottomWidth="1px"
borderBottomColor="neutral.main"
borderBottomColor="neutral.100"
>
<ModalCloseButton />
<Flex
Expand Down Expand Up @@ -101,7 +101,7 @@ export const ReqErrorModal: React.FC<ReqErrorModalProps> = ({
<HelperToolTip
label={`You will need to statisfy the following requirement(s) along with ${getCourseDisplayString(
course
)}."`}
)}.`}
/>
</Flex>
<ParseCourse course={coReqErr} parent={true} />
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-v2/components/Plan/ScheduleTerm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ScheduleTerm: React.FC<ScheduleTermProps> = ({
<GridItem
ref={setNodeRef}
transition="background-color 0.1s ease"
backgroundColor={isOver ? "neutral.main" : "#D2D8E2"}
backgroundColor={isOver ? "neutral.200" : "neutral.100"}
display="flex"
flexDirection="column"
px="sm"
Expand Down
10 changes: 6 additions & 4 deletions packages/frontend-v2/components/Plan/ScheduleYear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const YearHeader: React.FC<YearHeaderProps> = ({
const backgroundColor = isExpanded
? "primary.blue.dark"
: "primary.blue.light";

return (
<Flex
alignItems="center"
Expand All @@ -156,6 +155,9 @@ const YearHeader: React.FC<YearHeaderProps> = ({
_hover={{
backgroundColor: "primary.blue.light.600",
}}
_active={{
bg: "primary.blue.dark.700",
}}
transition="background-color 0.15s ease"
paddingTop="sm"
paddingBottom="sm"
Expand All @@ -180,8 +182,8 @@ const YearHeader: React.FC<YearHeaderProps> = ({
variant="ghost"
color="primary.red.main"
icon={<WarningIcon />}
_hover={{ bg: 'none', cursor: 'auto' }}
_active={{ bg: `${backgroundColor}.900` }}
_hover={{ bg: "none", cursor: "auto" }}
_active={{ bg: "none" }}
onClick={(e) => {
if (isExpanded) {
e.stopPropagation();
Expand All @@ -199,7 +201,7 @@ const YearHeader: React.FC<YearHeaderProps> = ({
marginLeft="auto"
marginRight="sm"
_hover={{ bg: "white", color: "primary.red.main" }}
_active={{ bg: `${backgroundColor}.900` }}
_active={{ bg: "primary.blue.light.900" }}
onClick={(e) => {
// important to prevent the click from propogating upwards and triggering the toggle
e.stopPropagation();
Expand Down
16 changes: 8 additions & 8 deletions packages/frontend-v2/components/Plan/TransferCourses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const TransferCourses: React.FC<TransferCoursesToggleProps> = ({
};

return (
<Flex direction="column" backgroundColor={"neutral.main"}>
<Flex direction="column" backgroundColor={"neutral.100"}>
<TransferCoursesHeader
isExpanded={isExpanded}
toggleExpanded={toggleExpanded}
Expand Down Expand Up @@ -133,11 +133,7 @@ const TransferCoursesBody: React.FC<TransferCoursesBodyProps> = ({
removeCourse={() => removeTransferCourse(course)}
/>
))}
<AddCourseButton
onOpen={onOpen}
borderColor="#C1CAD9"
borderWidth="1px"
/>
<AddCourseButton onOpen={onOpen} />
<AddCourseModal
isOpen={isOpen}
closeModalDisplay={onClose}
Expand Down Expand Up @@ -174,8 +170,12 @@ const TransferCoursesHeader: React.FC<TransferCoursesHeaderProps> = ({
<Flex
alignItems="center"
justifyContent="space-between"
backgroundColor="neutral.50"
_hover={{
backgroundColor: "neutral.900",
backgroundColor: "neutral.100",
}}
_active={{
backgroundColor: "neutral.200",
}}
transition="background-color 0.15s ease"
paddingTop="xs"
Expand All @@ -184,7 +184,7 @@ const TransferCoursesHeader: React.FC<TransferCoursesHeaderProps> = ({
cursor="pointer"
userSelect="none"
borderBottomWidth={isExpanded ? "2px" : "0px"}
borderBottomColor="neutral.900"
borderBottomColor="neutral.200"
paddingX="md"
>
<Flex flexDirection="column">
Expand Down
Loading