Commit Graph

1166 Commits

Author SHA1 Message Date
59db2811b0 FIX: Disable poll options if user groups do not allow them (#8987) 2020-02-18 12:13:19 +02:00
72b6f908f4 UX: minor tweaks to poll builder UI (#8985) 2020-02-17 11:02:44 -05:00
82b307cd52 FIX: Use correct translation string 2020-02-17 13:49:43 +02:00
2c7d32e783 FIX: prevents everyone group to show as group option for polls (#8957) 2020-02-14 14:11:34 +01:00
637535fc6b Update translations 2020-02-13 15:00:16 -05:00
0772a4338b FIX: Remove pie draw animation (#8940) 2020-02-12 07:09:40 -08:00
daaa0a657f FIX: Render HTML for pie chart options (#8912) 2020-02-11 10:02:54 -06:00
b34f09f8d7 FIX: Polyfill String.startsWith function for IE11
Followup to fe0d912b97985a6272e720729aa6197e8e40274f
2020-02-11 15:35:22 +00:00
8ca9ad887d FIX: replaces fake null value by clearable option (#8875) 2020-02-06 08:30:26 +01:00
5d97286fa7 FEATURE: Allow single option polls (#8853) 2020-02-05 08:03:27 -06:00
0431942f3d DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00
07222af7ab FEATURE: Add 'groups' option to polls (#8469)
This options can be used to restrict polls to certain groups.
2020-01-28 14:30:04 +02:00
03143d9449 FIX: Do not extract dates from quotes and Oneboxes (#8754)
Post.local_dates used to contain dates from quotes and Oneboxes.
2020-01-21 17:42:41 +02:00
2dd1ff79b4 Update translations 2020-01-20 11:00:44 -05:00
fe588cc7f8 DEV: Fix function prototype deprecations (#8681)
* DEV: Fix the function prototype observers deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details.

* DEV: Fix the function prototype event listeners deprecation

DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details.

* DEV: Simplify `default as` imports

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-01-16 18:56:53 +01:00
91f8ada8e0 FIX: add missing translation key for narrative bot Italian locale. 2020-01-16 13:23:16 +05:30
f4744193bd FEATURE: allows to define a dissmiss duration on global notices (#8715)
This commit also adds more documentation to various options and defines a 1 week duration for IE global notice dismiss duration.
2020-01-15 09:02:28 +01:00
f10078eab4 FIX: moves back padStart/padEnd to core polyfills (#8714)
Multiple users are on chrome 56 when this is only supported on chrome 57. Given it's only few lines of code, it makes sense to keep supporting this.
2020-01-14 10:54:39 +01:00
4e8aaacce8 UX: Update IE11 deprecation warning, and enable by default 2020-01-13 17:01:28 +00:00
648a1124eb FIX: Specs with old filename 2020-01-10 15:29:35 -05:00
72c3f36e58 Add optional file to precompile list 2020-01-10 15:14:32 -05:00
556d66a97c FIX: Use CDN for the discourse-internet-explorer
Previously the CDN was skipped because the assets were not in the proper
place to be uploaded.
2020-01-10 15:06:55 -05:00
9e3fc1111d FIX: Add a blank poll options validation (#8652)
Before, saving a post with a blank poll option resulted in error 500.
2020-01-03 15:09:36 +01:00
57081acc08 FIX: trigger commands are different for each locale, account for that. 2020-01-01 16:53:36 +05:30
c15d702ae6 FEATURE: internet explorer deprecation global notice (#8577) 2019-12-30 08:19:07 +01:00
8c2e27790c FIX: everyone can see poll results when on_vote and closed (#8613)
The bug was mentioned here: https://meta.discourse.org/t/poll-name/136436

I added specs to cover existing behaviour and refactored can_see_results method.

Guard condition should apply only if the poll result setting is set to `staff_only`.

In other cases, user can see results when the poll result setting is set to `always` or user voted or poll is closed.
2019-12-24 08:04:35 +11:00
91b290c784 Update translations 2019-12-19 12:31:52 -05:00
c91a360ef7 FIX: Include Symbol polyfill for IE11
This is necessary when we use `for (x of y)` operators in Javascript as
they are transpiled to use `Symbol` which is not present in IE.
2019-12-18 15:58:36 -05:00
b4f28ce2b1 FIX: Add missing Object.entries polyfill for IE11
This was omitted when IE polyfills were migrated from polyfills.js to ie.js
2019-12-18 11:36:26 +00:00
f59647cd55 FIX: move IE specific CSS rules to discourse-internet-explorer plugin (#8567) 2019-12-18 15:25:16 +11:00
44612f900e FIX: Remove 'staff_only' results option for non-staff (#8565) 2019-12-17 13:43:15 -08:00
bc97d39688 FIX: Allow IE script to load with a CDN
A proper fix would involve it being precompiled like other assets, but
due to the conditional nature of the resource this is more complicated.

For now this is better than IE being broken.
2019-12-13 15:50:46 -05:00
4abe4454dd FEATURE: Create IE Support Plugin (#8520)
This core plugin, which could be split off in the future, allows us to load IE specific code on demand.

Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
2019-12-11 09:07:22 -05:00
5431ae0a17 FIX: Don't raise an error if the user is not present 2019-12-11 11:03:31 -03:00
dfb9fa3b98 Update translations 2019-12-10 13:10:55 +01:00
dbee72e92b FIX: Export poll UI should only show for admins 2019-12-05 17:03:06 -03:00
50b98a47ac Update translations 2019-12-05 11:20:52 -05:00
0d3d2c43a0 DEV: s/\$redis/Discourse\.redis (#8431)
This commit also adds a rubocop rule to prevent global variables.
2019-12-03 10:05:53 +01:00
118fef2353 FIX: Hide pie legend when results are grouped (#8445) 2019-12-02 13:59:52 -06:00
87a298a59b FIX: Poll pie container was too large (#8444) 2019-12-02 11:51:06 -06:00
455147cabe DEV: use DB.after_commit instead of delaying the job 2019-11-29 22:48:39 +01:00
5ae570a088 remove unnecessary symlink 2019-11-29 22:23:43 +01:00
3807484757 FIX: delay the 'send_advanced_tutorial_message' job to prevent race conditions
When a user accepts an invite with an email address that matches a group
which automatically awards its members Trust Level 2, a race condition might happen
when the 'send_advanced_tutorial_message' job runs.

That job is enqueued inside the 'user_promoted' event which is triggered inside a
transaction on the user record. If the job runs before the transaction is done,
the user record is invisible and this generates an exception.
2019-11-29 22:14:41 +01:00
dd8fe1a9e7 DEV: Update annotations 2019-11-29 15:49:08 +00:00
0807751390 REFACTOR: poll-pie-chart widget (#8415)
This commit mostly get rid of the later() call and encapsulate all pie chart display logic inside discourse-poll-pie-canvas widget instead of sharing it between discourse-poll-pie-chart and discourse-poll-pie-canvas
2019-11-27 00:10:43 +01:00
cfa6ec8034 FIX: improves recurring by ensuring DST is computed correctly (#8410) 2019-11-25 23:32:24 +01:00
a3157f0e38 FIX: The build; ran prettier (#8412) 2019-11-25 12:12:44 -06:00
b92a8131c0 FEATURE: Pie chart option for poll results (#8352) 2019-11-25 11:51:01 -06:00
c75ebfee57 UX: Rename 'Hide results' to 'Show vote' in polls (#8403)
For various reasons, users may want to change their response to a poll.
Currently they have permission to do so, however it is hidden behind the 'Hide
results' button. Since what this button does is take the user back to the vote
panel, it seems more appropriate to name it 'Show vote', where it becomes
obvious that it can be modified and re-submitted.

As discussed here [1], there are mulitple users, myself included, who assumed
that editing a misclick response was impossible. This improves the label to make
it more descriptive of the action actually being taken.

[1] https://meta.discourse.org/t/ability-to-remove-my-choice-in-a-poll/53642/6
2019-11-25 12:26:19 +01:00
fd0025a735 FEATURE: Add export poll button (#8370)
This PR aims to make poll results easily exportable to staff in a CSV format, so they can be analyzed in external software.

It also makes the export data easily customizable by allowing users to leverage any data explorer query to generate the report. By default, we use a query that ships with data explorer, but user can change the ID in settings or use 0 to disable this feature.

One potential upgrade is using the recent work that allows arbitrary group to run data explorer and allow all the groups with access to the configured query to also export polls, but that can be added later.

Co-Authored-By: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2019-11-22 16:06:39 -03:00