Skip to content
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

Revert to v1 registrations if not using WCA registration #10152

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

dunkOnIT
Copy link
Contributor

This will become unnecessary once we move to v3, but for now the default to v2 makes it impossible to import registrations for the comps not using WCA registrations

Have tested locally and can confirm:

  • If "Use WCA registration" is ticked, it uses v2 registrations
  • If "Use WCA registration" is NOT ticked, it uses v1 registratiosn

Copy link
Member

@gregorbg gregorbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... You definitely earn a "short and sweet" prize for coming up with this idea (and extra kudos for finding this place in the code to begin with, the WCAT form loading is a horrible mess!)

However I'm not convinced that it's the most clean place to implement this. In particular, it causes unintuitive side-effects for people in the UI. If you want to dabble with some React code, look at (for example) FormSections/CompetitorLimit to see how we enable/disable certain sections based on other parts of the form. It would definitely be better for the users to straight-out disable this in the UI already, to minimize confusion (otherwise, it would make it seem to someone who is explicitly turning on the checkbox in the UI that "the form isn't saving properly" because during the proper save, the checkbox value is being overridden without clear communication to the user)

if you don't have the time or motivation to look into this, let me know and I'll hijack the PR.

app/models/competition.rb Outdated Show resolved Hide resolved
@dunkOnIT
Copy link
Contributor Author

otherwise, it would make it seem to someone who is explicitly turning on the checkbox in the UI that "the form isn't saving properly"

This concern isn't quite clicking with me? As I understand it, the only people who we expose the "enable v2" checkbox to are WCAT - and we can just "manually" communicate with them about this change.

In the case of a normal user creating a competition - they would just uncheck the "Use WCA registration" checkbox and without them being aware of it, the default uses_v2_registration value is overridden. I don't see this as a concern/see how it would lead to confusion?

@gregorbg
Copy link
Member

This needs to be updated now that #10132 is merged.

This concern isn't quite clicking with me? As I understand it, the only people who we expose the "enable v2" checkbox to are WCAT - and we can just "manually" communicate with them about this change.

In the case of a normal user creating a competition - they would just uncheck the "Use WCA registration" checkbox and without them being aware of it, the default uses_v2_registration value is overridden. I don't see this as a concern/see how it would lead to confusion?

I will accept this explanation only if you add a comment stating that this line is a V2 hack that can be removed after full V3 rollout 😄

@dunkOnIT dunkOnIT merged commit a3e385b into thewca:main Oct 30, 2024
2 checks passed
@dunkOnIT dunkOnIT deleted the fix/no-v2-on-external-reg branch October 30, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants