-
Notifications
You must be signed in to change notification settings - Fork 0
Results page + availability editing tweaks #34
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
I also separated out the API submission logic to avoid cluttering up the file.
initialState was also misspelled as initalState.
When editing an event that starts before today, the calendar needs to allow selections starting from that date instead of just from today.
It now shows a little warning icon if the event is longer than 30 days.
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 pull request enhances the user interface for the Results and Availability Painting pages, adding significant functionality including server cookie forwarding, duration optionality, a new edit event page, pre-populated availability editing, and date length validation.
Key changes include:
- Added server cookie forwarding to resolve API session rate limiting issues
- Made event duration optional with "None" as default
- Created reusable EventEditor component and new edit event page
- Enhanced availability editing with pre-population of existing data
- Added 30-day limit validation for event date ranges
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/ui/layout/results-page.tsx | Enhanced results page with edit buttons and empty state messaging |
| app/ui/layout/event-editor.tsx | New reusable component for creating and editing events |
| app/ui/layout/availability-page.tsx | Updated to support pre-populated availability data |
| app/ui/components/selectors/*.tsx | Added disabled state support to custom select components |
| app/ui/components/schedule/timeblocks/*.tsx | Fixed cursor styling and background color handling |
| app/ui/components/month-calendar.tsx | Added date range validation with error messaging |
| app/ui/components/date-range/*.tsx | Enhanced date range components with validation and editing modes |
| app/new-event/page.tsx | Refactored to use new EventEditor component |
| app/_utils/*.tsx | Added utility functions for event submission and cookie handling |
| app/[event-code]/*.tsx | Updated pages to support editing and cookie forwarding |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
It's now consistent with desktop.
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 bunch of changes to the user interface on the Results and Availability Painting pages. Some significant functionality was added, along with new pages and new components.
Server Cookie Forwarding
In cases where the server is the one fetching from the API, cookies weren't being sent with the requests, resulting in Guest session creation rate limits. The
getAuthCookieStringutility function was created to just get a single string that you can send in the header of a request.Duration Changes
Duration is now optional, and defaults to "None" in the selector.
Results Page Adjustments
A few adjustments were made in cases where there was no data to show.
Edit Event Page
A new page was created to edit event details. The
new-eventpage was turned into a component (EventEditor) which was repurposed to power this page. A few elements, like the event type switcher and custom code field, are disabled.Availability Editing
Now when visiting the availability painting page, it will be pre-populated with data if you've already submitted availability for the event. Submitting will just overwrite your previous submission.
Event Date Length Checking
The date picker now shows an error message (on desktop only so far, mobile just has a little icon at the top) when the event is longer than 30 days.
Other Miscellaneous Fixes
console.logstatements were removed.