-
Notifications
You must be signed in to change notification settings - Fork 76
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
[GH-489] add multiple votes for same option #539
base: master
Are you sure you want to change the base?
[GH-489] add multiple votes for same option #539
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
==========================================
+ Coverage 93.27% 93.33% +0.06%
==========================================
Files 13 13
Lines 1650 1666 +16
==========================================
+ Hits 1539 1555 +16
Misses 84 84
Partials 27 27 ☔ View full report in Codecov by Sentry. |
Thanks @annaos, but I think the specification is still ambiguous. |
Can I do something here? Do you have any ideas? |
It might be just a question of wording, but the existing In order to make users aware that the settings we are trying to implement this time are different from current Matterpoll's voting methods, I think it would be better to use one of the following formats for the settings.
In both cases, I think it's better to remove the limitation that "the number of votes that can be selected is limited to the maximum number of options" for Cumulative voting. The above is my thought. I'm glad to hear any thoughts on this, thanks. @annaos @hanzei |
I like the idea of the UPD I tried this solution to have a look at it and did it complete. |
Thanks for updating @annaos , and it looks great to me 👍 It may be a work in progress, but I think there are a few things that need to be addressed.
Hm... I came up with the following two ways to follow some sort of order, but I prefer 2. in that it can represent the order of votes.
...
if !p.Settings.Anonymous {
voters := make(map[string]int)
uniques := []string{} // to keep the order of the voters
for i := 0; i < len(o.Voter); i++ {
displayName, err := convert(o.Voter[i])
if err != nil {
return nil, err
}
voters[displayName]++
if !slices.Contains(uniques, displayName) {
uniques = append(uniques, displayName)
}
}
for _, u := range uniques {
...
... |
Close #489
--vote-method
Changed translation for id
poll.newPoll.votesettings.invalidSetting
(I'm not sure ifmake i18n-extract
will notice this)