-
Notifications
You must be signed in to change notification settings - Fork 1
FLOW 41 - add banner #197
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
base: main
Are you sure you want to change the base?
FLOW 41 - add banner #197
Conversation
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.
There was a problem hiding this 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 |
src/constants/GlobalTheme.tsx
Outdated
@@ -30,6 +30,10 @@ export default { | |||
google: '#4285f4', | |||
facebook: '#3c5a99', | |||
|
|||
announcement: '#ffc400', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
src/constants/GlobalTheme.tsx
Outdated
announcementSuccess: '#36b37e', | ||
announcementWarning: '#ff5630', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Added a banner. Probably woefully overengineered.