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

Add tie result for approval #416

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

ArendPeter
Copy link
Member

@ArendPeter ArendPeter commented Dec 13, 2023

Description

This updates the approval results page to sometimes indicate that the election is tied instead of showing a winner

Here are the specific updates

  • Add election setting for breaking ties randomly
  • Adjust results title to show ties
  • Refactor tabulator to avoid managing offsets on an array
  • Refactor tabulator to always sort candidates and break ties randomly (the break ties randomly setting is only used by the frontend)
  • Refactor tabulator with SingleWinnerApproval sub-method

Here's some follow up tasks

  • filter random tie break out of the detailed steps if random tiebreaker isn't enabled
  • add support for random tie breaker in the settings (it's currently locked to disabled)

Screenshots / Videos (frontend only)

image

Related Issues

related #415

@mikefranze
Copy link
Collaborator

Looks good, but I'm wondering if we should also include ties that occur in each round in the round_results. That should also be an array since you could have multiple ties in STAR.

@ArendPeter
Copy link
Member Author

Looks good, but I'm wondering if we should also include ties that occur in each round in the round_results. That should also be an array since you could have multiple ties in STAR.

I added the ties to the logs within the round results, but not as an additional field. I'd be open exposing it's own field in the future, but in general I think it's better to keep the output simpler and limit the fields to those that we expect the frontend to consume.

Copy link
Collaborator

@mikefranze mikefranze left a comment

Choose a reason for hiding this comment

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

Looks good

@ArendPeter ArendPeter merged commit 7d23ed3 into Equal-Vote:main Jan 8, 2024
3 checks passed
@ArendPeter ArendPeter deleted the approval-tie branch January 8, 2024 20:58
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