compdemocracy / polis

:milky_way: Open Source AI for large scale open ended feedback
https://pol.is
GNU Affero General Public License v3.0
772 stars 178 forks source link

Make 140-char limit on statements configurable (at conversation-level) #648

Open patcon opened 3 years ago

patcon commented 3 years ago

Re-ticketed from https://github.com/pol-is/polis/pull/247#issuecomment-639245297

options:

cc: @arjentum

patcon commented 3 years ago

Support for this ability to modify character limit expressed by @arjentum in Gitter chat:

Is the character limit for statements a hard limit, or is it changeable? Asking because my conversation is likely to be in Malay, which I think is less information-dense than English.

+1 from @metasoarous

jucor commented 3 years ago

FWIW it seems that the constant to turn into a variable is here: https://github.com/compdemocracy/polis/blob/dd0e581305b77601f17f003216fa7d48896996b8/client-participation/js/util/constants.js#L9 and the client-side logic where it goes into a variable is here: https://github.com/compdemocracy/polis/blob/dd0e581305b77601f17f003216fa7d48896996b8/client-participation/js/views/comment-form.js#L17

Now of course what's needed is:

patcon commented 3 years ago

Wooo. Prettty sure you just laid this out as a great first-timers-only ticket, so tagging :) https://publiclab.org/wiki/software-outreach#First-timers-only

(Also feel free to Just Do It, since you're a first-timer at this point 🙃 )

stuartlynn commented 3 years ago

Hey @jucor . I was wondering if you made progress with this. If not I am happy to take a swing at it. Looking to do a few tickets to get a feel for the codebase. Don't want to step on your tows though if you have already got some code written!

jucor commented 3 years ago

No I haven't :) I've been mostly thinking about the math, where I'm more uniquely useful. Go for it! And happy to serve as soundboard / second pair of eyes if you want to invite me on a WIP PR :)

On Mon, 7 Jun 2021, 14:56 Stuart Lynn, @.***> wrote:

Hey @jucor https://github.com/jucor . I was wondering if you made progress with this. If not I am happy to take a swing at it. Looking to do a few tickets to get a feel for the codebase. Don't want to step on your tows though if you have already got some code written!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/compdemocracy/polis/issues/648#issuecomment-855951706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBERN7PUM24HT42U4I37LTRTFYNANCNFSM4T4A47TQ .

stuartlynn commented 3 years ago

I had a clarifying question here.

What should happen if an admin changes the character limit after comments have been submitted? Specifically if they reduce the character limit?

  1. All existing comments stay active but all new comments must adhere to the new limit
  2. All existing comments which exceed the limit are retired/removed from the system and new comments under the limit are allowed?
  3. We only allow admin's to reduce the character limit to the size of the longest existing comment but no smaller.

My assumption is that it would be option 1 but wanted to make sure!

colinmegill commented 3 years ago

Perhaps we solve it centrally. We modeled the limit on a system that faced, and solved, the same issue.

https://blog.twitter.com/official/en_us/topics/product/2017/Giving-you-more-characters-to-express-yourself.html

jucor commented 3 years ago

Colin, do you mean "we extend it for all languages"? In which case it would not a moderator-parameter anymore, but a constant that we change throughout the repo?

On Tue, 8 Jun 2021, 18:27 Colin Megill, @.***> wrote:

Perhaps we solve it centrally. We modeled the limit on a system that faced, and solved, the same issue.

https://blog.twitter.com/official/en_us/topics/product/2017/Giving-you-more-characters-to-express-yourself.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/compdemocracy/polis/issues/648#issuecomment-856955386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBERJZJ7252IDU74X6U4DTRZHGNANCNFSM4T4A47TQ .

stuartlynn commented 3 years ago

So I think there are a few separate questions then.

  1. Is it desirable to allow an admin to be able to arbitrarily set the character limit?
  2. If not then is it desirable to give them a few options 140, 280 etc.
  3. If any kind of choice is bad, does increasing the limit globally catch all edge cases?
  4. In either of the choice based systems, what should happen if the limit is decreased to be less than the length of existing comments?
stuartlynn commented 3 years ago

I have some time to start work on this over the weekend if it's still a feature worth developing!

patcon commented 3 years ago

Haven't had time work on polis stuff in aaaaages, but I'm down to cowork on our own tickets over the weekend if you are, Stuart!

Oh hey, for clarity: I recall "admin" tends to refer to "server admin" and "moderator" is the term for the owner of a convo. Just to keep lingo clear :)

I'm sure it's fine to jump right to this issue, but for context: in prior discussion, making chat limit configurable at server-level https://github.com/compdemocracy/polis/issues/647 (by server admin) was an initial step toward this current issue were speaking in, which is for the moderator-level setting of char limit (per convo). That linked ticket might fit what Colin describes as "centrally".

The smaller scope of the server-level config feature (#647 ) might give you the endorphin rush (of merging) sooner. It's prob mostly styling. This would be a smaller change when working on client-participation part of codebase, which is highly optimized but fragile and changed with understandable caution. So the scoping might help the work be reviewed/merged quicker :) and then a future convo-level config PR could be just adding an admin UI to something already visually working!

As for your Q, peanut gallery hot-takes:

  1. Suspect arbitrary is fine.
  2. Not valid?
  3. Not sure still relevant, or maybe I misunderstand the question.
  4. If I recall, there is very little validation in API, it's all in UI. And things are just pulled from database as they are stored, and not trimmed. If we're being par for the course, I'd say just continue to validate in UI, and show whatever is in database, fully. Presentation should pay no mind to limit.
stuartlynn commented 3 years ago

Awesome. I have been poking around the codebase a little and think I know all the places to accomplish this! Going to take a swing at it Saturday morning. Will ping you on discord to see if your about and want to co-work! Excited to do more with Polis but want to learn the codebase by helping close out some of these tickets!

Thanks for the answer to my questions, I think these make sense. Will tackle #647 first and then generalize to the per-convo case