Open
Conversation
…tar-server into Write-In-Candidates
…hat they are not tallied
✅ Deploy Preview for bettervoting ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A very minimal write-in candidate frontend implementation based on Mike Franze's backend work. If write-ins are checked as allowed for a race....
Voter experience
Voter can add write in candidates to that race, which then get treated as if they were there the whole time by the frontend (these should be kept to the bottom since they are "special" like none of the above).
Frontend treats all trim-lowercase as the same "name" and so refuses to add JOHN if John has already been added.
Admin experience
Admin will see for those races a fun little new icon
If they click on it they will be taken to an approval page where they can approve or disapprove and set the official name of a write-in candidate
Results page
Tabulation then treats approved candidates as normal and others as ignored. User sees something like this in the results
Closing thoughts
This approach essentially (1) ignores capitalization (2) lets admin pick "real name" and (3) doesn't let admin merge "JFK" and "John F Kennedy". It is conceptually simple, weak, but i think viable for "ticking the box" in elections where bylaws require it. Basically election admins won't even know that our backend supports an aliasing system that can support admin-specified write-in merging. When we're ready (or if anyone asks for it) we can implement the rest.
Here's my rationale for not implementing frontend for the candidate merging in this PR: write-in-merging has insane edge cases. Here's one example, but I fear there may be lots like this. What if a voter makes writein "JFK" and gives them 3 stars and also "John F Kennedy" and gives them 5 stars in a multi-winner election, and admin merges "JFK" and "John F Kennedy"? How should ballot be counted? It would seem to necessitate either A Choice or else A Complicated User Interface for admins to handle the mess. I don't want to make either of those things if I can avoid it 😄.