Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPolls #1629
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
blinry
Apr 12, 2017
Contributor
Any hints and suggestions on how to implement this – datastructure/protocol-wise – are welcome, I guess!
|
Any hints and suggestions on how to implement this – datastructure/protocol-wise – are welcome, I guess! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
commented
Apr 12, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 12, 2017
My wishlist for this feature would be:
- up to 6 options (because 6 is more than 4)
- up to 30 characters per option (so that
Die Toilettenpapierhalterungenfits in)
Later (second or third iteration):
- make polls expire
- let poll creator allow voting on multiple options
- let poll creator allow adding own options
winniehell
commented
Apr 12, 2017
•
|
My wishlist for this feature would be:
Later (second or third iteration):
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 12, 2017
These are the database changes that I would make:
- Add the following column to
statuses:
t.string "poll_options", default: [], null: false, array: true- Create the following table:
create_table "poll_votes", force: :cascade do |t|
t.bigint "status_id"
t.string "poll_option", null: false
t.integer "account_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["status_id"], name: "index_poll_votes_on_status_id", using: :btree
end
winniehell
commented
Apr 12, 2017
•
|
These are the database changes that I would make:
t.string "poll_options", default: [], null: false, array: true
create_table "poll_votes", force: :cascade do |t|
t.bigint "status_id"
t.string "poll_option", null: false
t.integer "account_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["status_id"], name: "index_poll_votes_on_status_id", using: :btree
end |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 12, 2017
These are the API changes that I would make:
- Add
poll_optionsto theStatusentity - Adjust endpoints for statuses to respect
poll_options - Provide new
Pollentity (onlyGETendpoint) which contains:- The status ID
- The number of votes per option (anonymously)
winniehell
commented
Apr 12, 2017
|
These are the API changes that I would make:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 12, 2017
I'd like to have a very simple implementation for the first iteration so that the feature could be shipped fast. This includes:
- Use boring radio buttons for voting.
- Avoid logic for expiring polls automatically.
- Don't allow poll options or votes to be edited later.
- Don't allow adding a poll to an existing status.
- Display results as numbers instead of bar charts. (getting bars drawn correctly on different screens isn't trivial)
As an alternative for expiring polls after a specified amount of time, we could introduce a Close poll button for the poll creator and a matching API endpoint.
winniehell
commented
Apr 12, 2017
|
I'd like to have a very simple implementation for the first iteration so that the feature could be shipped fast. This includes:
As an alternative for expiring polls after a specified amount of time, we could introduce a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mkosler
Apr 13, 2017
Other than bringing over functionality that Twitter has right now, what does this add that using an outside site like http://www.strawpoll.me/ doesn't?
mkosler
commented
Apr 13, 2017
|
Other than bringing over functionality that Twitter has right now, what does this add that using an outside site like http://www.strawpoll.me/ doesn't? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 13, 2017
what does this add that using an outside site like http://www.strawpoll.me/ doesn't?
It adds another way of interacting with followers without introducing a dependency to a third-party service.
winniehell
commented
Apr 13, 2017
•
It adds another way of interacting with followers without introducing a dependency to a third-party service. |
wxcafe
changed the title from
Feature request: Support polls
to
Polls
Apr 13, 2017
wxcafe
added
enhancement
priority - low
ui
labels
Apr 13, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hoodiek
Apr 14, 2017
a strong tool for this is also an "end notification"
twitter allows it to have an expiring date, but it can be hard to scroll back and find your poll, if you are an active user
hoodiek
commented
Apr 14, 2017
|
a strong tool for this is also an "end notification" twitter allows it to have an expiring date, but it can be hard to scroll back and find your poll, if you are an active user |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
winniehell
Apr 17, 2017
@wxcafe Thank you for labeling the issue!
Is there a way to get feedback on the ideas above from mastodon maintainers or should I just start working on it and submit a pull request?
winniehell
commented
Apr 17, 2017
|
@wxcafe Thank you for labeling the issue! Is there a way to get feedback on the ideas above from mastodon maintainers or should I just start working on it and submit a pull request? |
added a commit
to winniehell-forks/mastodon
that referenced
this issue
Apr 20, 2017
winniehell
referenced this issue
Apr 21, 2017
Closed
"Load more" button in "Home" column disappears when clicked #1058
This was referenced May 1, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jdmansour
May 29, 2017
This is a really nice feature, thanks for working on it! I fondly remember polls from my first social network at our university, this was before Facebook and Twitter existed. Polls are a fun and low-threshold way to engage a community and a good discussion starter.
One option I'd like to suggest is to make the poll anonymous vs non-anonymous. That is, in one case just show the percentages, and in the other case also show the names of who voted. I found anonymous polls good to get honest answers, and non-anonymous polls good for asking among friends, e.g. who wants to go watch which movie.
(Note in the anonymous case, the server would still know who voted how. It is highly nontrivial in a distributed system to make this truely anonymous. We would just hide the names - I think that is what you are doing right now anyway.)
And one question, (how) do you deal with remote accounts? Can they vote, too? Does Mastodon set a cookie if you interacted using a remote account, so that we can identify that you already voted and change the UI accordingly?
jdmansour
commented
May 29, 2017
|
This is a really nice feature, thanks for working on it! I fondly remember polls from my first social network at our university, this was before Facebook and Twitter existed. Polls are a fun and low-threshold way to engage a community and a good discussion starter. One option I'd like to suggest is to make the poll anonymous vs non-anonymous. That is, in one case just show the percentages, and in the other case also show the names of who voted. I found anonymous polls good to get honest answers, and non-anonymous polls good for asking among friends, e.g. who wants to go watch which movie. (Note in the anonymous case, the server would still know who voted how. It is highly nontrivial in a distributed system to make this truely anonymous. We would just hide the names - I think that is what you are doing right now anyway.) And one question, (how) do you deal with remote accounts? Can they vote, too? Does Mastodon set a cookie if you interacted using a remote account, so that we can identify that you already voted and change the UI accordingly? |
jdmansour
referenced this issue
May 29, 2017
Closed
Let other sites know my preferred identity ("global cookie") #3420
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
r14c
Jun 21, 2017
please keep in mind that gnu/social already has a polls feature that you may want to try to be compatible with :)
r14c
commented
Jun 21, 2017
|
please keep in mind that gnu/social already has a polls feature that you may want to try to be compatible with :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
duck57
Jul 10, 2017
@hoodiek Having a "poll ended" notification would make Mastodon polls much better than Twitter polls. Do you think the notification should just go to the poster of the poll or should it also go to users who voted in it in case they want to see the final results?
duck57
commented
Jul 10, 2017
|
@hoodiek Having a "poll ended" notification would make Mastodon polls much better than Twitter polls. Do you think the notification should just go to the poster of the poll or should it also go to users who voted in it in case they want to see the final results? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Starless-Night
Jul 27, 2017
This sounds awesome especially if you can choose to have it in ranked choice voting.
Starless-Night
commented
Jul 27, 2017
|
This sounds awesome especially if you can choose to have it in ranked choice voting. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ThibG
Apr 19, 2018
Collaborator
I had a quick look at the subject, and it seems polls have already been thought about in ActivityStreams: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question
https://www.w3.org/TR/activitystreams-vocabulary/#questions
Announcing, closing and responding to polls seems pretty straightforward with those specifications. I am not too happy with how results (intermediate or final) can be synchronized across instances, however.
|
I had a quick look at the subject, and it seems polls have already been thought about in ActivityStreams: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question Announcing, closing and responding to polls seems pretty straightforward with those specifications. I am not too happy with how results (intermediate or final) can be synchronized across instances, however. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gargron
Apr 19, 2018
Member
@ThibG Indeed, simple enough to make it work so the origin server has a working poll, and it's possible to forward poll answers to the author's followers just like replies, but if the poll is boosted or loaded somewhere else there's no simple way to guarantee it displays complete results...
|
@ThibG Indeed, simple enough to make it work so the origin server has a working poll, and it's possible to forward poll answers to the author's followers just like replies, but if the poll is boosted or loaded somewhere else there's no simple way to guarantee it displays complete results... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gargron
Apr 19, 2018
Member
That is, unless you literally hit the origin server to pull down the latest data on each load of the REST API response. And while that solves the latest-data problem, that's a loooooot of extra load on all servers suddenly.
|
That is, unless you literally hit the origin server to pull down the latest data on each load of the REST API response. And while that solves the latest-data problem, that's a loooooot of extra load on all servers suddenly. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nightpool
Apr 19, 2018
Collaborator
|
I mean, making results click-to-play is probably not an unreasonable idea.
…On Thu, Apr 19, 2018 at 10:22 AM Eugen Rochko ***@***.***> wrote:
That is, unless you literally hit the origin server to pull down the
latest data on each load of the REST API response. And while that solves
the latest-data problem, that's a loooooot of extra load on all servers
suddenly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1629 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAORV9MYnzXphZ903pjI-d0UtC4RrCppks5tqJ2egaJpZM4M7zR0>
.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gargron
Apr 19, 2018
Member
If loading the results was a separate, click-to-play endpoint, then that would be a bit more acceptable, yes. I suppose we don't really care if the origin server lies about the responses, do we? So we could save them in a flat structure without trying to verify/normalize into a relational schema.
|
If loading the results was a separate, click-to-play endpoint, then that would be a bit more acceptable, yes. I suppose we don't really care if the origin server lies about the responses, do we? So we could save them in a flat structure without trying to verify/normalize into a relational schema. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ThibG
Apr 19, 2018
Collaborator
We could also try to forward replies along the same path we forward deletes: taking boosts into account. Not sure how that would scale.
Worst case, we could just have a link “view results” that goes to the public status view, but that's suboptimal.
|
We could also try to forward replies along the same path we forward deletes: taking boosts into account. Not sure how that would scale. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gargron
Apr 19, 2018
Member
Forwarding will not be necessary in the scenario nightpool suggests. Although you can probably forget about real-time updating bars like on strawpoll, I think...
|
Forwarding will not be necessary in the scenario nightpool suggests. Although you can probably forget about real-time updating bars like on strawpoll, I think... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ThibG
Apr 19, 2018
Collaborator
Another thing I dislike with the proposed handling of results is the lack of privacy. Ok sure, we don't have very strong privacy expectations for this kind of things, but still, why would every server need to know who has voted what?
|
Another thing I dislike with the proposed handling of results is the lack of privacy. Ok sure, we don't have very strong privacy expectations for this kind of things, but still, why would every server need to know who has voted what? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gargron
Apr 19, 2018
Member
In that case maybe you don't want polls, maybe you want to use Strawpoll... Either that or ActivityPub needs a way to display answer counts without listing individual answers. Tbh, imagine a typical poll on Twitter, it can get thousands of replies. There are hardly any threads with thousands of replies, so this is a unique leap, and a JSON document with thousands of
{
"attributedTo": "http://sally.example.org",
"inReplyTo": "http://polls.example.org/question/1",
"name": "arduino"
}is gonna weigh a lot of KB!
|
In that case maybe you don't want polls, maybe you want to use Strawpoll... Either that or ActivityPub needs a way to display answer counts without listing individual answers. Tbh, imagine a typical poll on Twitter, it can get thousands of replies. There are hardly any threads with thousands of replies, so this is a unique leap, and a JSON document with thousands of {
"attributedTo": "http://sally.example.org",
"inReplyTo": "http://polls.example.org/question/1",
"name": "arduino"
}is gonna weigh a lot of KB! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nightpool
Apr 19, 2018
Collaborator
|
Oh yeah i was assuming remote servers would only ever see counts.
…On Thu, Apr 19, 2018 at 10:56 AM Eugen Rochko ***@***.***> wrote:
In that case maybe you don't want polls, maybe you want to use
Strawpoll... Either that or ActivityPub needs a way to display answer
counts without listing individual answers. Tbh, imagine a typical poll on
Twitter, it can get thousands of replies. There are hardly any threads with
thousands of replies, so this is a unique leap, and a JSON document with
thousands of
{
"attributedTo": "http://sally.example.org",
"inReplyTo": "http://polls.example.org/question/1",
"name": "arduino"
}
is gonna weigh a lot of KB!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1629 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAORV_O1k3ZFsCoXo2nRvaA7xP_RjxY1ks5tqKWFgaJpZM4M7zR0>
.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ThibG
Apr 19, 2018
Collaborator
@Gargron yes, that's also why I don't like that representation (though it's probably not that bad). Thankfully, “This section is non-normative”. I think the suggested ways of announcing a poll and replying to it are fine, but we may want to decide on something else to display the results (a list of counts associated with the different answers seems fine).
|
@Gargron yes, that's also why I don't like that representation (though it's probably not that bad). Thankfully, “This section is non-normative”. I think the suggested ways of announcing a poll and replying to it are fine, but we may want to decide on something else to display the results (a list of counts associated with the different answers seems fine). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cwebber
Apr 20, 2018
Maybe each answer that shows up in the poll could itself be an AS2 collection which can give its totalItems, but which can (optionally, if non-anonymous) also expose its items (which are the actual response objects) in case anyone wants to "audit" it or see what their friends said?
I wonder what @evanp thinks?
cwebber
commented
Apr 20, 2018
|
Maybe each answer that shows up in the poll could itself be an AS2 collection which can give its totalItems, but which can (optionally, if non-anonymous) also expose its items (which are the actual response objects) in case anyone wants to "audit" it or see what their friends said? I wonder what @evanp thinks? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cwebber
commented
Apr 20, 2018
|
so the collection's name in this case would be the answer to the poll |



winniehell commentedApr 12, 2017
•
edited by wxcafe
Edited 1 time
-
wxcafe
edited Apr 13, 2017 (most recent)
On twitter, I have used polls to write an interactive story together with @blinry. This is currently not possible with Mastodon.
I would like to start working on this though I am not sure if I will be able to finish.
I searched or browsed the repo’s other issues to ensure this is not a duplicate: