-
Notifications
You must be signed in to change notification settings - Fork 186
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
Auto Accept PR 2: Frontend & Waiting List Integration #10416
base: main
Are you sure you want to change the base?
Conversation
Waiting list:
|
Add to waiting list:
|
Bulk auto accept class method tests:
|
…iation.org into v3/auto-accept-2
...ker/components/RegistrationsV2/RegistrationAdministration/RegistrationAdministrationList.jsx
Outdated
Show resolved
Hide resolved
@@ -128,6 +130,8 @@ export default function RegistrationAdministrationList({ competitionInfo }) { | |||
|
|||
const actionsRef = useRef(); | |||
|
|||
const [autoAcceptEnabled, setAutoAcceptEnabled] = useState(competitionInfo.auto_accept_registrations) |
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.
Can we use competitionInfo
as the source of truth?
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.
Currently it is being hydrated on render (not queried via API), so there's no way to refetch it currently. Assuming we could refetch it, how would you suggest we then update whether or not the "Disable auto accept" button is rendered - declare all of competitionInfo
a state? (my understanding is that React doesn't detect changes in the state of variables)
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.
if we would fetch it, we would rely on the react Query to handle the state being up to date.
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.
Yeah it would be pretty simple if we switch to fetching it with react query, I think.
Having a situation where there are 2 sources of truth (competitionInfo.auto_accept_registrations
and autoAcceptEnabled
), and which could disagree, is not good - leaves room for future bugs, etc.
Frontend Changes
Backend Changes
Should they be accepted onto the waiting list if the auto-accept-cutff has been reached?No - consulted people on discordaccepted
Future PR