Commit Graph

58 Commits

Author SHA1 Message Date
Bianca Nenciu ac68cb20c3
UX: Show all pie legend options for long polls (#16510)
Results pie chart of polls with very many options were wider than the
post and most of their content was hidden.
2022-04-20 10:43:10 +03:00
Penar Musaraj 24e71acf3f
UX: Normalize sizing for inputs, buttons, dropdowns (#14226)
See PR for details
2021-09-09 11:01:56 -04:00
Joffrey JAFFEUX d7c185bf3d
DEV: updates chart.js to 3.5.1 (#14107) 2021-08-23 13:49:49 +02:00
Régis Hanol b8a0e47913
UX: make poll content selectable (#13529)
When initially released, the polls had a different design that didn't interact
well with the quote button - https://meta.discourse.org/t/31586

Now that the design has evolved, not being able to select text from inside a poll is
counter productive, so it's enabled again.
2021-06-30 15:25:59 +10:00
Penar Musaraj e305365168
FEATURE: Use responsive image sizes in post stream (#13343) 2021-06-18 09:15:03 -04:00
Penar Musaraj 9ebc9541b9
FIX: Size of emoji in poll options (#13294)
Fixes a regression in 33cb1b
2021-06-04 18:27:25 -04:00
Penar Musaraj 33cb1b7cf1
FIX: Ensure images in polls don't cause abrupt scrolling (#13272)
In some very rare cases, poll options can end up with images that have
no dimensions, in which case, navigating to replies in that post stream
might result in unexpected scrolling (as the browser loads the images
and adjusts its layout).

This ensures that if width/height attributes are missing from an image,
the image is forced to display within a 200 by 200 pixels space.

Co-authored-by: David Taylor <david@taylorhq.com>
2021-06-03 22:09:59 -04:00
Penar Musaraj b21f74060e
FIX: Layout of date input in poll builder (#13057) 2021-05-13 10:27:03 -04:00
Bianca Nenciu 8636292a40
FIX: Do not cut off long polls (#12854)
Some polls with images can be very long. Those which showed a pie chart
for the results had a fixed height set, which meant that some long polls
could be cut off.
2021-04-29 10:32:45 +03:00
Bianca Nenciu 2081b6e5c9
UX: Improve poll builder UI (#12549)
* Improve poll validation

* Redesign poll builder

* Group all advanced settings under a new section
2021-04-12 19:48:01 +03:00
Jarek Radosz 690a38bc9b
FIX: Show title on results of all poll types (#11041)
Previously, the title was shown only with pie chart results. Issue originally reported in https://meta.discourse.org/t/keep-the-heading-visible-when-showing-poll-results/167585

Also includes:
UX: Move the "Show breakdown" button (Display it with other poll buttons at the bottom)
FIX: Show the breakdown button only on any votes
2020-10-27 13:48:54 +01:00
Jarek Radosz babbebfb35
FEATURE: Add the title attribute to polls (#10759)
Adds an optional title attribute to polls. The rationale for this addition is that polls themselves didn't contain context/question and relied on post body to explain them. That context wasn't always obvious (e.g. when there are multiple polls in a single post) or available (e.g. when you display the poll breakdown - you see the answers, but not the question)

As a side note, here's a word on how the poll plugin works:

> We have a markdown poll renderer, which we use in the builder UI and the composer preview, but… when you submit a post, raw markdown is cooked into html (twice), then we extract data from the generated html and save it to the database. When it's render time, we first display the cooked html poll, and then extract some data from that html, get the data from the post's JSON (and identify that poll using the extracted html stuff) to then render the poll using widgets and the JSON data.
2020-10-02 09:21:24 +02:00
Jarek Radosz cd4f251891
FEATURE: Poll breakdown 2.0 (#10345)
The poll breakdown modal replaces the grouped pie charts feature.

Includes:

* MODAL: Untangle `onSelectPanel`
Previously modal-tab component would call on click the onSelectPanel callback with itself (modal-tab) as `this` which severely limited its usefulness. Now showModal binds the callback to its controller.

"The PR includes a fix/change to d-modal (b7f6ec6) that hasn't been extracted to a separate PR because it's not currently possible to test a change like this in abstract, i.e. with dynamically created controllers/components in tests. The percentage/count toggle test for the poll breakdown feature is essentially a test for that d-modal modification."
2020-08-06 17:57:06 +02:00
Penar Musaraj 14eec43889
DEV: Use CSS custom properties for colors in core plugins 2020-08-04 11:14:33 -04:00
Bianca Nenciu ff6811ceb8
Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
Bianca Nenciu 5e4cf244a5
FIX: Show time input in poll builder (#9128) 2020-03-16 13:25:45 +01:00
Joffrey JAFFEUX a4fc6ccc12
UX: prevents jumpyness when displaying poll voters (#9054) 2020-02-27 11:09:54 +01:00
Joffrey JAFFEUX 72b6f908f4
UX: minor tweaks to poll builder UI (#8985) 2020-02-17 11:02:44 -05:00
Mark VanLandingham daaa0a657f
FIX: Render HTML for pie chart options (#8912) 2020-02-11 10:02:54 -06:00
Mark VanLandingham b92a8131c0
FEATURE: Pie chart option for poll results (#8352) 2019-11-25 11:51:01 -06:00
Jarek Radosz 6a65e5312b FEATURE: Add a preview to the poll builder (#7988)
* FEATURE: Add a preview to the poll builder

* Use selectKit helper in the poll preview test

* Extract the mobile-specific poll builder form CSS
2019-08-13 09:49:40 -04:00
Penar Musaraj 78500fb770 UX: Improve layout of poll builder modal 2019-08-07 15:00:03 -04:00
Kris be5e889b1b UX: Poll style fix, button classes 2019-03-06 20:27:40 -05:00
Joe a342d2f150 UX: reduces white-space in polls (#6956)
* reduces white-space in polls and uses font-size variables
2019-02-05 10:47:22 +01:00
Régis Hanol 4459665dee
REFACTOR: use tables instead of custom fields for polls (#6359)
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
2018-11-19 14:50:00 +01:00
Joe 9c5b5243fc
UX: don't show 0 vote count in crawler or print view 2018-11-15 17:40:01 +08:00
Kris 6ec43f3472 FIX: poll avatar spacing too large 2018-08-29 09:11:03 -04:00
Kris d6144c6d60 UX: More compact polls on mobile 2018-08-27 16:53:35 -04:00
Kris 84d822959a Reducing some specificity, color fix 2018-08-03 17:44:22 -04:00
Joe 27c018e75c
FIX: makes large images in polls responsive 2018-07-01 13:20:00 +08:00
Joffrey JAFFEUX 174d392e5a
DEV: adds prettier (#5956)
Run `prettier --write "app/assets/stylesheets/**/*.scss" "plugins/**/*.scss"` after making sure you installed it with `yarn`

It's recommended to configure your editor to run prettier on file save.
2018-06-08 11:49:31 +02:00
Joe ec7f597274
FIX: update poll-builder to new modal design 2018-05-30 21:00:54 +08:00
Joe 47a9b3427b
FIX: input tip causes modal to change width when present 2018-05-30 14:26:06 +08:00
Régis Hanol ef87944a34 UX: show close date on automatically closed polls 2018-05-12 02:14:58 +02:00
Régis Hanol ba14c80b9c FEATURE: automatically close a poll on a given date and time 2018-05-03 02:12:19 +02:00
Bruno Perel 6750ff6873 (S)CSS cleanup: 0px => O and removal of duplicated properties (#5526) 2018-01-25 09:53:36 -05:00
Guo Xiang Tan 1da6fc8e3c UX: Highlight user's vote in polls. 2017-01-25 12:02:19 +08:00
Jeff Atwood d87e5ae819 tighten spacing for poll voters list 2017-01-14 22:11:46 -08:00
Robin Ward f07443b488 Migrate Discourse Polls to use vdom instead of embedded ember 2016-12-09 10:42:56 -05:00
Guo Xiang Tan ad44a64c5b UX: Fixes for poll option bars on dark theme. 2016-08-02 09:48:06 +08:00
Guo Xiang Tan dc2cf996af UX: Styles for poll options on dark theme. 2016-08-01 22:07:57 +08:00
Guo Xiang Tan 32c962cfd8 UX: Remove button styles on polls. 2016-07-29 11:09:23 +08:00
Guo Xiang Tan bb3f4a10f3 UX: Polls should take up full width of post's container. 2016-07-28 23:06:25 +08:00
Guo Xiang Tan 89e28c12ed UX: Fix polls on dark theme. 2016-07-19 13:01:54 +08:00
Jeff Atwood 7337b2953f slightly less giant poll percentages 2016-06-21 17:01:27 -07:00
Guo Xiang Tan fd91a8eee6
Bunch of UX changes for polls builder. 2016-06-15 23:47:19 +08:00
Guo Xiang Tan 8d46727d67
FEATURE: Poll UI Builder. 2016-06-15 11:14:24 +08:00
Guo Xiang Tan a36203ff78
PERF: Paginate public polls. 2016-06-12 16:14:53 +08:00
Guo Xiang Tan 8ecde35df3
FEATURE: Add public type to polls. 2016-06-08 16:19:13 +08:00
Régis Hanol 233cdc011d FIX: disable text selection in polls 2015-07-31 12:42:53 +02:00