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

Make number of poll choices configurable #10609

Open
KylePiira opened this issue Apr 21, 2019 · 15 comments
Open

Make number of poll choices configurable #10609

KylePiira opened this issue Apr 21, 2019 · 15 comments
Labels
suggestion Feature suggestion

Comments

@KylePiira
Copy link

KylePiira commented Apr 21, 2019

Pitch

It would be nice to be able to change the maximum number of poll choices in .env.production

Motivation

I'd like to increase the max number of choices for a poll to 5 on my server, however, that's currently not possible without forking the code.

@Gargron Gargron added the suggestion Feature suggestion label May 1, 2019
@joenepraat
Copy link
Contributor

I like to increase the maximum number of characters per option. 25 is much to low.

@connyduck
Copy link
Contributor

Also, please announce the poll limits in api/v1/instance like Pleroma does it

"poll_limits":{
   "min_expiration":0,
   "max_options":20,
   "max_option_chars":200,
   "max_expiration":31536000
}

@stale
Copy link

stale bot commented Oct 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/wontfix This will not be worked on label Oct 26, 2019
@joenepraat
Copy link
Contributor

I still like this request. Poll options length is far to short.

@stale stale bot removed the status/wontfix This will not be worked on label Oct 26, 2019
@domi41
Copy link

domi41 commented Dec 15, 2019

Showing interest for this so that the bot does not close it during the holidays…

This raises a federation question though : how should polls made on a server allowing more options behave on servers allowing less options ?

@trwnh
Copy link
Member

trwnh commented Dec 15, 2019

stalebot has been disabled for issues, it was only meant to work on prs but was misconfigured iirc

@pludi
Copy link

pludi commented Jun 8, 2022

This raises a federation question though : how should polls made on a server allowing more options behave on servers allowing less options ?

Given that Pleroma already allows more than 4 options and these get rendered just fine I don't see an issue there. AFAIK the ActivityPub standard doesn't set a limit here.

@JorgeStolfi
Copy link

See #23295.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jun 8, 2023

#10609 (comment)

AFAIK the ActivityPub standard doesn't set a limit here.

I don't think Mastodon should either. Why not just allow as many poll options as the user wants?


@joenepraat, I'd say that #10609 (comment) is a separate request.

@trwnh
Copy link
Member

trwnh commented Jun 8, 2023

I don't think Mastodon should either. Why not just allow as many poll options as the user wants?

Mastodon is opinionated, so it sets limits that it thinks are reasonable and in its view will improve the experience -- 500 characters, 4 attachments, 1 poll, 4 options, and so on. However, remote posts are not bound by the same limits. Mastodon handles these remote posts differently in various cases...

  • More than 500 characters will still be stored. Some clients like the official web app will collapse posts that exceed a certain height once rendered. Other clients will show the long post in its entirety. This has led to the custom of adding a CW for "long post", which is not ideal, but it is considered the courteous thing to do since more than a few clients don't support collapsing long posts. (I'd argue that this is a problem with the clients and that it should be fixed in those clients, but that's besides the point.)
  • More than 4 attachments will get silently truncated. Additional attachments will not be processed, and there will be no indication that there are more attachments. (There is a separate issue filed for this.)
  • More than 1 poll is not possible only due to the way polls are serialized over Mastodon's flavour of ActivityPub. Mastodon uses Create Question and treats the Question similar to a Note, in that it gets converted to a status based on its content, but it also processes the oneOf or anyOf properties to reconstruct the poll attachment. (This is something that's not really in line with ActivityStreams, where Question is an activity and not simply an object... but that ship has probably sailed, since everyone treats it as an object. If there was ever a request to have more than one poll per status, then it would probably necessitate a migration to using Create Note with Question in attachment, but this is out-of-scope for the discussion on the current issue.)
  • More than 4 options will get shown just fine. This one is the most arbitrary of limits, as it's almost entirely on the authoring side within Mastodon.

I do remember a poll once that asked what your favorite fediverse software or favorite fediverse account was, out of a list of over 20 options. I think it's a bit ridiculous, but I don't really see how it's any different from collapsing longer statuses after they exceed a certain height. Just let it scroll, I guess?

Also worth noting: in Pleroma/Akkoma these are usually options configurable for local and remote. You can reject activities and objects that go beyond your set limits. Example:
image
image

@RokeJulianLockhart
Copy link

@trwnh,

More than 4 attachments will get silently truncated. Additional attachments will not be processed, and there will be no indication that there are more attachments. (There is a separate issue filed for this.)

Any idea which issue?

@trwnh
Copy link
Member

trwnh commented Jun 10, 2023

that would be #14336

@McKristoffer
Copy link
Contributor

Cannot +1 this suggestion enough, max 4 choices is definitely too small. It's a no-brainer to have this configurable on a per-instance basis.

@mitexleo
Copy link

Which files do I need to edit ?

@bantryblues
Copy link

bantryblues commented Feb 15, 2024

glitch-soc already has a higher max poll options.
they’ve done it for so long they don’t even mention it anymore in their list of features.

there are also instructions on the web for how to change the max options for polls in Mastodon, but they have to redo it every time they upgrade.
https://stefanbohacek.com/blog/how-to-increase-the-number-of-mastodon-poll-options/

so increasing the number of options seems to be a trivial change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests