From 37b3985bfac5ffdc8e452f92869dcdefb5c92594 Mon Sep 17 00:00:00 2001 From: Sasha Sorokin Date: Thu, 2 Apr 2020 22:10:55 +0700 Subject: Improve polls: option lengths & redesign (#13257) This commit redesign the polls and increases characters limit for the options from 25 to 50 characters, giving pollsters more freedom. Summarizing, the redesign is making the polls more adaptive for upcoming changes to the options characters limit: the bar, or a "chart", is now displayed separately from the option itself; vote check mark is moved next to the option text, making the percentages take less space. Option lengths are taken into account and text is wrapped to multiple lines if necessary to avoid overflow. --- app/validators/poll_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/validators') diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 9d7321cad..a32727796 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -2,7 +2,7 @@ class PollValidator < ActiveModel::Validator MAX_OPTIONS = 4 - MAX_OPTION_CHARS = 25 + MAX_OPTION_CHARS = 50 MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze -- cgit