Add helpful empty states to the home sidebar #25

Open
opened 2026-10-03 19:44:35 +00:00 by jalenluorion · 0 comments
Member

Goal
A new user with nothing in their schedule sees "No courses in your schedule" and no way forward. Replace the bare text with a short message and a button that takes them to the next step.

What you'll learn
Conditional rendering, Next.js Link, and matching a design from Figma.

Resources

Where to start

  • web/src/app/components/ProfileSidebar.tsx: the "My Courses" and "My Clubs" view modes render plain text when courses.length === 0 or clubs.length === 0. currentScheduleId is undefined when the user has no schedule.
  • web/src/app/components/Navbar.tsx: shows a "Create Schedule" button when the user has no schedules. Today, adding a course without a schedule ends in an alert().
  • web/src/app/components/BottomNav.tsx and Navbar.tsx: examples of import Link from "next/link".

Done when

  • No schedule: the sidebar explains that a schedule is needed first and points to "Create Schedule"
  • No courses: message plus an "Add a course" button that switches the section into edit mode (setIsCoursesEditMode(true))
  • No clubs: message plus an "Add a club" button (edit mode) and a "Browse events" Link to /explore
  • Copy and spacing match the Figma (ask your lead for the link)
  • Works in light and dark mode

Notes
There is no saved-events panel in the app yet, so this issue covers schedules, courses, and clubs only.

**Goal** A new user with nothing in their schedule sees "No courses in your schedule" and no way forward. Replace the bare text with a short message and a button that takes them to the next step. **What you'll learn** Conditional rendering, Next.js `Link`, and matching a design from Figma. **Resources** - [Conditional rendering](https://react.dev/learn/conditional-rendering) - [Next.js Link](https://nextjs.org/docs/app/api-reference/components/link) **Where to start** - `web/src/app/components/ProfileSidebar.tsx`: the "My Courses" and "My Clubs" view modes render plain text when `courses.length === 0` or `clubs.length === 0`. `currentScheduleId` is undefined when the user has no schedule. - `web/src/app/components/Navbar.tsx`: shows a "Create Schedule" button when the user has no schedules. Today, adding a course without a schedule ends in an `alert()`. - `web/src/app/components/BottomNav.tsx` and `Navbar.tsx`: examples of `import Link from "next/link"`. **Done when** - [x] No schedule: the sidebar explains that a schedule is needed first and points to "Create Schedule" - [x] No courses: message plus an "Add a course" button that switches the section into edit mode (`setIsCoursesEditMode(true)`) - [x] No clubs: message plus an "Add a club" button (edit mode) and a "Browse events" `Link` to `/explore` - [x] Copy and spacing match the Figma (ask your lead for the link) - [x] Works in light and dark mode **Notes** There is no saved-events panel in the app yet, so this issue covers schedules, courses, and clubs only.
jalenluorion added this to the Phase 1 milestone 2026-10-03 19:44:35 +00:00
jalenluorion added this to the CMUCal project 2026-10-03 19:45:09 +00:00
naemii self-assigned this 2026-10-03 20:26:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal#25
No description provided.