feat: add core curriculum chips to injected popup (#372)

* feat: add core curriculum chips to injected popup

* fix: add VP and MAcore indicators

* feat: core now defined in constructor

* fix: make core and flags closer together

* fix: stop empty core chip from showing when no core requirements

* fix: remove optional chaining for core chips

* feat: generalize Chip for both flags and core classes

* fix: change types for storybook and add new story for CoreChip

* fix: remove labelMap prop from Chip, chore: clean up imports

* feat: change tooltip for core curriculum requirement

---------

Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
suhas
2024-10-22 16:15:27 -05:00
committed by GitHub
parent 83d76f72da
commit 6f1afc5b25
10 changed files with 93 additions and 13 deletions

View File

@@ -16,8 +16,16 @@ export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
export const FlagChip: Story = {
args: {
label: 'QR',
variant: 'flag',
},
};
export const CoreChip: Story = {
args: {
label: 'SB',
variant: 'core',
},
};

View File

@@ -17,6 +17,7 @@ export const ExampleCourse: Course = new Course({
'Taught as a Web-based course.',
],
flags: ['Quantitative Reasoning'],
core: ['Natural Science and Technology, Part I'],
fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB',
instructionMode: 'Online',
instructors: [
@@ -60,6 +61,7 @@ export const ExampleCourse2: Course = new Course({
'May be counted toward the Independent Inquiry flag requirement.',
],
flags: ['Independent Inquiry'],
core: ['Natural Science and Technology, Part II'],
fullName: 'C S 439 PRINCIPLES OF COMPUTER SYSTEMS',
instructionMode: 'In Person',
instructors: [

View File

@@ -34,6 +34,7 @@ const generateCourses = (count: number): Course[] => {
'Taught as a Web-based course.',
],
flags: ['Quantitative Reasoning'],
core: ['Natural Science and Technology, Part I'],
fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB',
instructionMode: 'Online',
instructors: [

View File

@@ -26,6 +26,7 @@ export const ExampleCourse: Course = new Course({
'Taught as a Web-based course.',
],
flags: ['Quantitative Reasoning'],
core: ['Natural Science and Technology, Part I'],
fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB',
instructionMode: 'Online',
instructors: [

View File

@@ -11,6 +11,7 @@ const exampleGovCourse: Course = new Course({
department: 'GOV',
description: ['nah', 'aint typing this', 'corndog'],
flags: ['no flag for you >:)'],
core: ['American and Texas Government'],
fullName: 'GOV 312L Something something',
instructionMode: 'Online',
instructors: [
@@ -43,6 +44,7 @@ const examplePsyCourse: Course = new Course({
department: 'PSY',
description: ['nah', 'aint typing this', 'corndog'],
flags: ['no flag for you >:)'],
core: ['Social and Behavioral Sciences'],
fullName: 'PSY 317L Yada yada',
instructionMode: 'Online',
scrapedAt: Date.now(),

View File

@@ -16,6 +16,7 @@ export const exampleCourse: Course = new Course({
'Taught as a Web-based course.',
],
flags: ['Quantitative Reasoning'],
core: ['Natural Science and Technology, Part I'],
fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB',
instructionMode: 'Online',
scrapedAt: Date.now(),
@@ -99,6 +100,7 @@ export const bevoCourse: Course = new Course({
},
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/',
flags: ['Independent Inquiry', 'Writing'],
core: ['Humanities'],
instructionMode: 'In Person',
semester: {
code: '12345',
@@ -154,6 +156,7 @@ export const mikeScottCS314Course: Course = new Course({
},
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/50825/',
flags: ['Writing', 'Independent Inquiry'],
core: ['Natural Science and Technology, Part II'],
instructionMode: 'In Person',
semester: {
code: '12345',