Skip to content

Add Course Details Drawer - #126

Merged
mirmirmirr merged 20 commits into
main-previewfrom
info-drawer
Apr 21, 2026
Merged

Add Course Details Drawer#126
mirmirmirr merged 20 commits into
main-previewfrom
info-drawer

Conversation

@mirmirmirr

Copy link
Copy Markdown
Contributor

This PR addresses Issue #111.

This PR adds the option for users to open up a course details drawer from the planner courses to view a courses details while creating a planner.

To access the details drawer, right click or click on the three horizontal dots on the right side of a PlannerCourse instance and select the first option, View Course Details. On desktops, the drawer will open in from the left side, eclipsing the Catalog. On mobile devices, the drawer will open up from the bottom of the screen.

@mirmirmirr mirmirmirr linked an issue Apr 17, 2026 that may be closed by this pull request
@mirmirmirr
mirmirmirr requested a review from ramonechen April 17, 2026 20:55
@mirmirmirr
mirmirmirr marked this pull request as ready for review April 17, 2026 20:55
Copilot AI review requested due to automatic review settings April 17, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a “Course Details” drawer accessible from planner course context menus, enabling users to view key course info without searching the catalog. Along the way, it refactors filter option fetching into a global Zustand store and consolidates header icon-button UI into a shared Button component.

Changes:

  • Add CourseDetailsDrawer (Vaul drawer) and wire it into planner course menu options.
  • Move catalog filter option fetching/caching into useFilterStore and reuse via useCourseFilters.
  • Replace catalog-specific Tag usage and header HeaderButton with shared Tag/Button components.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/pages/Catalog.tsx Renames selected filters component usage.
src/lib/stores/useFilterStore.ts New Zustand store for filter options + useCourseFilters helper.
src/features/planner/usePlannerCourse.ts Adds “View Course Details” menu option hook support.
src/features/catalog/search/filters/SelectedFilters.tsx Switches to shared Tag and passes toggleFilter.
src/features/catalog/search/filters/FilterSection.tsx Switches to shared Tag and passes toggleFilter.
src/features/catalog/search/context/provider.tsx Uses useFilterStore to fetch/provide filter options.
src/features/catalog/search/SearchBar.tsx Renames selected filters component usage.
src/features/catalog/components/CatalogCourse.tsx Uses useCourseFilters and shared Tag for course badges.
src/components/header/HeaderButton.tsx Removes custom header icon button component.
src/components/header/ButtonTray.tsx Migrates to shared Button for header actions.
src/components/course/Course.tsx Wires drawer open state + adds drawer component to planner course view.
src/components/Tag.tsx Decouples from catalog context via injected onToggle.
src/components/SideDrawer.tsx New course details drawer UI (Vaul).
src/components/Button.tsx New shared icon-button with tooltip styling.
package.json Adds vaul dependency.
package-lock.json Locks vaul dependency.
Comments suppressed due to low confidence (1)

src/components/Tag.tsx:84

  • handleClick only toggles when onToggle is provided, but the button is still enabled whenever isSelectable/isRemovable is true. This can silently produce “clickable but does nothing” tags if a caller forgets onToggle. Consider making onToggle required when interactive, or disabling/throwing when it’s missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/SideDrawer.tsx Outdated
Comment thread src/components/Button.tsx
Comment thread src/components/header/ButtonTray.tsx
Comment thread src/components/header/ButtonTray.tsx
Comment thread src/features/catalog/search/context/provider.tsx Outdated
Comment thread src/components/SideDrawer.tsx Outdated
Comment thread src/components/SideDrawer.tsx
Comment thread src/components/Button.tsx Outdated
Comment thread src/lib/stores/useFilterStore.ts Outdated

@ramonechen ramonechen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The drawer UI looks and feels very clean and responsive; can't find any issues with it on desktop or mobile views. Looks good to merge 👍

@mirmirmirr
mirmirmirr merged commit a9d8c6c into main-preview Apr 21, 2026
3 checks passed
@mirmirmirr
mirmirmirr deleted the info-drawer branch April 21, 2026 20:22
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.

Add drawer view for course details

3 participants