-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Multi Custom Events, persist, select, and manage custom events with URL import #10
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
base: master
Are you sure you want to change the base?
Conversation
…e (fix missing CustomEventReducer); keep Day display PR unaffected
src/raidpal/RaidPalView.js
Outdated
| const unique = []; | ||
| const { time_table: slots, slot_duration_mins, inconsistent_slot_durations=false } = event; | ||
|
|
||
| const toLower = (s) => (typeof s === 'string') ? s.toLowerCase() : ''; |
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 could probably move up a scope so #93 can use it too
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.
Lifted this out into the Utils file and applied it application wide where it can be used,
I've also done the TODO that automatically shows the closest upcoming slot event in RaidPal before any others too so the user should also see their next slot first and all events in the dropdown ordered by their own slot time.
Introduces a utility function to convert strings to lowercase, ensuring consistency across the application. Improves event selection logic to prioritise events with slots closest to the current time for the logged-in user.
Improves RaidPal event selection logic by considering user slots and proximity to current time. It introduces normalisation functions for user IDs and logins to ensure accurate matching.
|
@kfitzgerald Is this one likely to make the cut any time soon? we've got some Team Organised events coming up that would be nice to be able to track them as custom events :) |
This PR adds full support for multiple custom events, decoupled from RaidPal-specific state. Users can load events by pasting a JSON URL or a live RaidPal event URL, which is automatically mapped to the RaidPal API endpoint. Loaded events persist across reloads and are presented under a new “Custom” tab with a dropdown selector and a “Custom Events” label for visual consistency.
A redesigned Custom Event modal provides a tabbed interface to load new events or manage saved ones; the manage view lists saved events with options to select or delete, and includes responsive layout tweaks for small screens. The app safely handles unoccupied slots and missing display names to avoid toLowerCase errors, and automatically switches back to the Followed tab when the final custom event is removed. The implementation introduces a dedicated custom events slice (state, actions, persistence) and leaves existing behavior untouched for non-custom flows.