feat: course-catalog-injected-popup (#98)
* some work * some work on course popup update the stories and create the header component * use chip component in header * complete CourseHeaderAndActions Component added course buttons, using proper subcomponents now. * Change test course to 314 * Add rmp callback * some unocss updates * add course button onclick handlers * add todo for calendar button * Rename CoursePopup Old one to "Old", remove "2" from new one * description stuff done * Modify story to use proper course info * Add Grade Distribution Stuff * Minor tweaks change style in header * Add TODO replace current grade colors with a tailwind palette * Fix syllabi url Remove unused variable and unnecessary args to url * Bunch of renaming * Kinda complete the handlers * change grade distribution colors to match updated figma * change from reducer pattern to state variables, remove chartData from state * add additional story * disabled add when course is not open * use array fill * Some changes with the instructor names * trying to get the CES stuff to work * CES button is working * remove a todo * add actual color for dminus * fix description, start no distribution state * post merge fixes * small fixes * fix: import as type * fix: some better typescript stuff i think * fix: manifest.ts * fix: pr feedback * Apply suggestions from code review --------- Co-authored-by: doprz <52579214+doprz@users.noreply.github.com>
This commit is contained in:
10
src/shared/messages/CESMessage.ts
Normal file
10
src/shared/messages/CESMessage.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
interface CESMessage {
|
||||
/**
|
||||
* Opens the CES page for the specified instructor
|
||||
*
|
||||
* @param data first and last name of the instructor
|
||||
*/
|
||||
openCESPage: (data: { instructorFirstName: string; instructorLastName: string }) => chrome.tabs.Tab;
|
||||
}
|
||||
|
||||
export default CESMessage;
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createMessenger } from 'chrome-extension-toolkit';
|
||||
|
||||
import type BrowserActionMessages from './BrowserActionMessages';
|
||||
import type CESMessage from './CESMessage';
|
||||
import type TabManagementMessages from './TabManagementMessages';
|
||||
import type TAB_MESSAGES from './TabMessages';
|
||||
import type { UserScheduleMessages } from './UserScheduleMessages';
|
||||
@@ -8,7 +9,7 @@ import type { UserScheduleMessages } from './UserScheduleMessages';
|
||||
/**
|
||||
* This is a type with all the message definitions that can be sent TO the background script
|
||||
*/
|
||||
export type BACKGROUND_MESSAGES = BrowserActionMessages & TabManagementMessages & UserScheduleMessages;
|
||||
export type BACKGROUND_MESSAGES = BrowserActionMessages & TabManagementMessages & UserScheduleMessages & CESMessage;
|
||||
|
||||
/**
|
||||
* A utility object that can be used to send type-safe messages to the background script
|
||||
|
||||
@@ -26,7 +26,7 @@ export const colors = {
|
||||
cplus: '#F59E0B',
|
||||
c: '#FB923C',
|
||||
cminus: '#F97316',
|
||||
dplus: '#EA580C', // TODO (achadaga): copilot generated, get actual color from Isaiah
|
||||
dplus: '#EF4444',
|
||||
d: '#DC2626',
|
||||
dminus: '#B91C1C',
|
||||
f: '#B91C1C',
|
||||
|
||||
Reference in New Issue
Block a user