-
Notifications
You must be signed in to change notification settings - Fork 0
Redesign dashboard #35
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
Conversation
This is mostly just to get the API data in a more JSON-friendly format.
Also added a myEvent prop to the DashboardEvent component to know when to render the edit button.
This is to add a check icon to indicate copy success, and handle the state completely on the button.
It's a hacky workaround, but it works.
I'm surprised I wasn't warned about redeclaring an existing variable.
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 redesigns the dashboard with a new layout and event grid system, replacing the previous tile-based interface. The changes improve the user experience by displaying more event details and fixing several critical bugs related to authentication and data submission.
Key changes:
- New dashboard UI with tabbed navigation for "My Events" vs "Others' Events" and enhanced event cards showing date ranges, weekdays, and time information
- Fixed authentication cookie forwarding by correcting cookie name from "auth_sess_token" to "account_sess_token"
- Fixed weekday event submission bug where JSON body variable was being redeclared instead of reassigned
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| app/ui/layout/dashboard-page.tsx | New dashboard layout component with tabbed interface and mobile responsiveness |
| app/ui/components/dashboard/event-grid.tsx | Grid container for displaying dashboard event cards |
| app/ui/components/dashboard/dashboard-event.tsx | Event card component with navigation, copy, and edit functionality |
| app/ui/components/dashboard/dashboard-copy-button.tsx | Copy button component for sharing event links |
| app/ui/components/dashboard/date-range-row.tsx | Date range display component for specific-date events |
| app/ui/components/dashboard/weekday-row.tsx | Weekday range display component for recurring events |
| app/dashboard/page.tsx | Converted to server component using new fetch utilities |
| app/dashboard/loading.tsx | Removed (moved to root app folder) |
| app/_utils/process-dashboard-data.tsx | Data transformation utility for dashboard events |
| app/_utils/fetch-data.tsx | Added fetchDashboard function for server-side data fetching |
| app/_utils/cookie-utils.tsx | Fixed authentication cookie name |
| app/_utils/submit-event.tsx | Fixed weekday event submission variable declaration |
| app/_lib/providers.tsx | Updated LoginContext to support nullable state |
| app/ui/components/schedule/timeblocks/preview-timeblock.tsx | Removed unused backgroundColor variable and prop |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
mirmirmirr
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 brand-new dashboard page, as well as a few miscellaneous fixes.
New Dashboard
We have retired the big white squares for event tiles. Now the dashboard has a new look with much more relevant information.
Moved
loading.tsxThis page was moved to the root of the
appfolder, so that any page that requires loading has the same page.Account Cookie Forwarding Fix
I accidentally used the wrong name for the cookie when creating the
getAuthCookieStringfunction, resulting in all account-related activity not working. This is now fixed.Weekday Event Submission Fix
I redeclared the JSON body variable that was being sent to the API, so no data was being sent. That's fixed.
LoginContextState Type ChangeTo support a "waiting" state, the type of
loggedInis now nullable. It is only set totrueorfalseafter the login state is determined.PreviewTimeBlockProp ErrorbackgroundColorwas being passed as a prop when that prop didn't exist. It didn't cause any major problems, but Next.js didn't like it. It's fixed now.