citizenos / citizenos-fe

5 stars 3 forks source link

VOTING: Voting options exceeding 200 characters leading to errors #1432

Open ssin1901 opened 3 months ago

ssin1901 commented 3 months ago

What is the problem? Tested in Google Chrome incognito mode

  1. A user inputed custom voting options of 1000 characters in a voting topic (screenshot1)
  2. Preview displayed the options just fine (screenshot2)
  3. However, when clicking Save changes & publish, they got an error message that only 200 characters were allowed (screenshot3)
  4. The Preview also changed to a Yes/No option even it had earlier displayed the custom options
Screenshot 2024-07-19 at 15 06 51 Screenshot 2024-07-19 at 15 10 34 Screenshot 2024-07-19 at 15 10 50 Screenshot 2024-07-19 at 15 13 21

Why is this a problem? @ilmartyrk @BeccaMelhuish luckily idea gathering will solve this issue, but previously users did add longer voting options. I'm not sure if high priority label is needed.

Possible solution. Voting options need a line of text indicating that only 200 character options will be accepted AND user should not be able to go to Preview if their options are over 200 characters.

BeccaMelhuish commented 2 months ago

@ssin1901 @ilmartyrk Simplest solution to me would be to add the character limit to each voting option field, and not allow the user to add more than 200 characters?

I guess the best placement for it would be here (right end of the character limit text aligned with the right end of the text field), though not sure how it will look.. If not looking great we can ask Kevin to suggest? image

BeccaMelhuish commented 2 months ago

Removed 'test app' label as I guess it is relevant to the live app now :)

ilmartyrk commented 1 month ago

@ssin1901 check the lengths for the idea headings and vote options and find what would be the best length

BeccaMelhuish commented 1 month ago

@ssin1901 @ilmartyrk Moved this one to testing so Sara can test the lengths, then send to 'Ready for dev' once we know the limit?

ssin1901 commented 1 week ago

@ilmartyrk @BeccaMelhuish tested different lengths with mobile and longer than 100 characters, and there was text overflow (screenshot1) on most mobile devices.

screenshot2

100 characters isn't very long, less than a sentence. I wouldn't advise keeping this limit.

Instead of changing the length, could we adjust the height or padding of the radio box to accommodate the extra text? (if possible).

BeccaMelhuish commented 1 week ago

@ssin1901 What do you think if we do a combination of these two things?

  1. Restrict the input of vote options and idea headings to 200 characters, so instead of getting the following error after they've written out a really long one, they simply aren't allowed to enter more than 200 in the first place. (I can't see any reason why this would cause issues, but @ssin1901 if you have any use case insights do share!)

image

  1. Make the size of the white box responsive, in cases where someone inputs a longer option/idea heading (up to 200 characters):

image