about summary refs log tree commit diff
path: root/app/validators
diff options
context:
space:
mode:
authorSasha Sorokin <dafri.nochiterov8@gmail.com>2020-04-02 22:10:55 +0700
committerGitHub <noreply@github.com>2020-04-02 17:10:55 +0200
commit37b3985bfac5ffdc8e452f92869dcdefb5c92594 (patch)
tree72680d3e58065d1104e4d2e8a92b9a0b3137baab /app/validators
parenta9a063c0e983c5643178428327ca9907558c1f68 (diff)
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.
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/poll_validator.rb2
1 files changed, 1 insertions, 1 deletions
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