]> cat aescling's git repositories - mastodon.git/commit
Improve polls: option lengths & redesign (#13257)
authorSasha Sorokin <dafri.nochiterov8@gmail.com>
Thu, 2 Apr 2020 15:10:55 +0000 (22:10 +0700)
committerGitHub <noreply@github.com>
Thu, 2 Apr 2020 15:10:55 +0000 (17:10 +0200)
commit37b3985bfac5ffdc8e452f92869dcdefb5c92594
tree72680d3e58065d1104e4d2e8a92b9a0b3137baab
parenta9a063c0e983c5643178428327ca9907558c1f68
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/javascript/mastodon/components/poll.js
app/javascript/mastodon/features/compose/components/poll_form.js
app/javascript/styles/mastodon-light/diff.scss
app/javascript/styles/mastodon/polls.scss
app/validators/poll_validator.rb
app/views/statuses/_poll.html.haml