Skip to content

Conversation

jerryzhou196
Copy link
Member

Added a banner. Probably woefully overengineered.

image

addison-ch and others added 6 commits March 23, 2025 20:49
Enhances announcement banner with bold text, unique IDs, and dismiss persistence using localStorage. Updates banner styles and integrates new props for flexibility.

Removes unused routes and theme imports for announcements to simplify code. Improves course filtering logic by adding seat availability checks and refactoring conditions for better readability and maintainability.
@jerryzhou196 jerryzhou196 requested a review from Copilot April 26, 2025 08:18
@jerryzhou196 jerryzhou196 changed the title Flow 41 add banner Flow 41 - add banner Apr 26, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an announcement banner to the application. Key changes include:

  • Adding new announcement color constants in the global theme.
  • Creating a new AnnouncementBanner component along with its styling and animations.
  • Inserting the AnnouncementBanner into App.tsx for display.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/constants/GlobalTheme.tsx Added new color constants for announcement banners
src/components/banner/styles/AnnouncementBanner.tsx Added styled components for the banner with animation rules
src/components/banner/AnnouncementBanner.tsx Implemented the announcement banner component with dismiss logic
src/App.tsx Integrated the AnnouncementBanner into the main app layout

@jerryzhou196 jerryzhou196 changed the title Flow 41 - add banner FLOW 41 - add banner Apr 26, 2025
@@ -30,6 +30,10 @@ export default {
google: '#4285f4',
facebook: '#3c5a99',

announcement: '#ffc400',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use accent instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, im stupid lol

Comment on lines 34 to 35
announcementSuccess: '#36b37e',
announcementWarning: '#ff5630',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not support these for now since they're not used yet, I think we should probably only use blue/yellow for banners and keep the prof/course colors reserved

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

Refactors AnnouncementBanner by removing unused 'type' prop and associated styling logic.
Replaces dynamic styles with theme-based defaults for consistency.
Adjusts margins and link styling for improved layout.

Enhances maintainability by streamlining code and eliminating redundant configurations.
@jerryzhou196 jerryzhou196 requested a review from edwinzhng April 28, 2025 16:51
@jerryzhou196
Copy link
Member Author

While editing it, I change the banner to look more minimal. I'm thinking we fix professor reviews before this gets merged in so hopefully we don't need to specify it.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants