-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor Code for Desktop Compatability #54
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
Refactor Code for Desktop Compatability #54
Conversation
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
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
Copilot reviewed 43 out of 45 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ccheung777
left a comment
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.
💅🏻
This pull request introduces a major refactor of the application's state management and component structure, especially around course management and drag-and-drop functionality. The core logic for managing courses, filters, and drag-and-drop interactions has been moved from the
App.tsxfile into dedicated context providers and custom hooks. Additionally, course-related components have been modularized and specialized for different views (Catalog, Planner, Toolbox), resulting in a more maintainable and scalable codebase.Key changes include:
State Management & Architecture
App.tsx, replacing prop drilling withCourseWorkspaceProviderandFilterProvidercontext providers, and encapsulated drag-and-drop logic in theuseCourseWorkspacehook. This simplifies component props and centralizes state logic.Component Modularization
Coursecomponent into specialized components for each context:CatalogCoursefor catalog display and adding to toolboxPlannerCoursefor planner view with right-click context menu and course manipulation optionsToolboxCoursefor toolbox view with drag-and-drop stylingCoursecomponent, consolidating its logic into the new specialized components.Dependency Updates
tailwind-scrollbarpackage topackage.jsonfor improved custom scrollbar styling.References:
[1] [2] [3] [4] [5] [6]