Skip to content

Commit

Permalink
Fixed deletion error and added tool tip
Browse files Browse the repository at this point in the history
  • Loading branch information
ShireenKumar committed Nov 3, 2024
1 parent 6f19897 commit 54f0a83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/frontend/components/Sidebar/GenericSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Box, Flex, Spinner, Stack, Text } from "@chakra-ui/react";
import { useState } from "react";
import { ScheduleCourse2 } from "@graduate/common";
import { DraggableScheduleCourse } from "../ScheduleCourse";
import { SIDEBAR_DND_ID_PREFIX } from "../../utils";
import { SIDEBAR_DND_ID_PREFIX, GEN_PLACEHOLDER_MSG } from "../../utils";
import { HelperToolTip } from "../Help";

// Define the props interface for GenericSection
interface GenericSectionProps {
Expand All @@ -14,7 +15,7 @@ interface GenericSectionProps {

export const GENERIC_ELECTIVE: ScheduleCourse2<string> = {
name: "Elective",
classId: "Generic Class",
classId: "Generic Class ",
subject: "",
numCreditsMax: 0,
numCreditsMin: 0,
Expand Down Expand Up @@ -88,9 +89,12 @@ const GenericSection: React.FC<GenericSectionProps> = ({
position="relative"
opacity="0"
></Box>
<Text color="primary.blue.dark.main" mt="0" fontSize="sm">
General Placeholders
</Text>
<Flex direction="row" height="100%" alignItems="center" gap="1">
<Text color="primary.blue.dark.main" mt="0" fontSize="sm">
General Placeholders
</Text>
<HelperToolTip label={GEN_PLACEHOLDER_MSG} />
</Flex>
</Flex>
<Flex ml="xs" alignItems="center">
{opened ? (
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
getSectionError,
getAllCoursesInMajor,
BETA_MAJOR_TOOLTIP_MSG,
GEN_PLACEHOLDER_MSG,

Check failure on line 16 in packages/frontend/components/Sidebar/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Run linting for all packages

'GEN_PLACEHOLDER_MSG' is defined but never used. Allowed unused vars must match /^_/u
} from "../../utils";
import {
handleApiClientError,
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const SEARCH_NEU_FETCH_COURSE_ERROR_MSG =
"Sorry, we can't load details for this course right now 😞. We rely on SearchNEU for our course details, and there may be an ongoing issue on their end. We recommend refreshing the page and trying again soon.";
export const BETA_MAJOR_TOOLTIP_MSG =
"Requirements for beta majors have not been validated and therefore may be inconsistent with your degree audit.";
export const GEN_PLACEHOLDER_MSG =
"General Placeholderse are generic courses that you can place in your plan if you do not know yet what to take but want the requirements to be fulfilled";

export const defaultGuestStudent: GetStudentResponse = {
uuid: undefined,
Expand Down

0 comments on commit 54f0a83

Please sign in to comment.