Conversation
…ged nav button behavior
The actual fixes I forgot to commit 💀
9b304e3 to
3e534aa
Compare
|
Added #422 (branch name 391) changes to this branch because it needed fixes from this ticket to be fully finished. Feel free to disregard that PR. On top of backend changes from this PR, and the visual changes from #422, I also refactored /schedule/page.tsx into reusable components because it was starting to get really chunky. These are the main changes: File structure changes
Data/state refactor changes
|
…o 377-backend-schedule-logic-fix
…o 377-backend-schedule-logic-fix
There was a problem hiding this comment.
Pull request overview
This PR refactors the hacker schedule UI/data flow and updates time-based schedule logic so “next”/“live” determinations account for event end times, while also reorganizing schedule rendering into reusable hooks/components.
Changes:
- Added shared schedule types and grouping utilities (group by day + start time, with end-time tie-breaking).
- Reworked the schedule page to use a new
useScheduleDatahook and new controls/sections components (scroll-synced day nav). - Updated “next schedule” and schedule sneak peek logic to use end-time aware live/upcoming calculations and countdown labels.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| app/_types/schedule.ts | Adds shared schedule-related TS types (EventDetails, ScheduleData, grouped entries). |
| app/(pages)/_hooks/useScheduleSneakPeekData.ts | Changes sneak peek upcoming logic to “nearest next start-time batch” and adjusts filtering rules. |
| app/(pages)/_hooks/useScheduleData.ts | New hook encapsulating schedule/personal data fetching, grouping, filters, and membership updates. |
| app/(pages)/_hooks/useNextSchedule.ts | Fixes “next event” selection to include events that haven’t ended yet. |
| app/(pages)/_hooks/useActiveDaySync.ts | New hook to sync active day tab with scroll position and smooth scroll navigation. |
| app/(pages)/_globals/globals.scss | Fixes global selector scoping so body font-family isn’t nested under *. |
| app/(pages)/(hackers)/_components/Schedule/groupedEntries.ts | New grouping/sorting helper with end-time tie-break logic. |
| app/(pages)/(hackers)/_components/Schedule/constants.ts | Adds canonical DAY_KEYS / DAY_LABELS types/constants. |
| app/(pages)/(hackers)/_components/Schedule/ScheduleMobileControls.tsx | Removes old mobile controls component (replaced by unified controls). |
| app/(pages)/(hackers)/_components/Schedule/ScheduleControls.tsx | New unified controls for mobile + desktop (filters + day nav). |
| app/(pages)/(hackers)/_components/Schedule/DaySection.tsx | New day section renderer (grouped by time) with empty states. |
| app/(pages)/(hackers)/_components/Schedule/DayNavButtons.tsx | New day navigation button component with hover/focus preview. |
| app/(pages)/(hackers)/_components/HomeHacking/ScheduleSneakPeek.tsx | Adds countdown labels and groups upcoming events by start time; removes prior upcoming empty-state UI (now commented out). |
| app/(pages)/(hackers)/(hub)/schedule/page.tsx | Refactors schedule page to use the new hook + components and render per-day sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/(pages)/(hackers)/_components/HomeHacking/ScheduleSneakPeek.tsx
Outdated
Show resolved
Hide resolved
app/(pages)/(hackers)/_components/HomeHacking/ScheduleSneakPeek.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/(pages)/(hackers)/_components/HomeHacking/ScheduleSneakPeek.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
michelleyeoh
left a comment
There was a problem hiding this comment.
Nice job cleaning up schedule page! Pretty clean breakdown of components.
Moving forward please move hooks and types to the appropriate folder & some brief comments in the backend-related files would be nice for readability
Added:
- schedule page & sneak peak requested fixes
- useScheduleSharedNow for consistent seconds update
finished updating logic to check end time and order accordingly