Commit Graph

1132 Commits

Author SHA1 Message Date
Gerhard Schlager dfb9fa3b98 Update translations 2019-12-10 13:10:55 +01:00
Rafael dos Santos Silva dbee72e92b FIX: Export poll UI should only show for admins 2019-12-05 17:03:06 -03:00
Neil Lalonde 50b98a47ac Update translations 2019-12-05 11:20:52 -05:00
Joffrey JAFFEUX 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
Mark VanLandingham 118fef2353
FIX: Hide pie legend when results are grouped (#8445) 2019-12-02 13:59:52 -06:00
Mark VanLandingham 87a298a59b
FIX: Poll pie container was too large (#8444) 2019-12-02 11:51:06 -06:00
Régis Hanol 455147cabe DEV: use DB.after_commit instead of delaying the job 2019-11-29 22:48:39 +01:00
Régis Hanol 5ae570a088 remove unnecessary symlink 2019-11-29 22:23:43 +01:00
Régis Hanol 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
David Taylor dd8fe1a9e7 DEV: Update annotations 2019-11-29 15:49:08 +00:00
Joffrey JAFFEUX 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
Joffrey JAFFEUX cfa6ec8034
FIX: improves recurring by ensuring DST is computed correctly (#8410) 2019-11-25 23:32:24 +01:00
Mark VanLandingham a3157f0e38
FIX: The build; ran prettier (#8412) 2019-11-25 12:12:44 -06:00
Mark VanLandingham b92a8131c0
FEATURE: Pie chart option for poll results (#8352) 2019-11-25 11:51:01 -06:00
Benjamin Hipple 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
Rafael dos Santos Silva 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
Joffrey JAFFEUX c498780479
FIX: prevents exception and more duplicates (#8396) 2019-11-22 19:43:37 +01:00
Joffrey JAFFEUX a40bc1e92b
FIX: prevents timezone to show duplicated zones in preview
It could happen if you have Etc/UTC in default settings, and timezone="UTC" on date, the equality check is now more strict.
2019-11-22 17:14:27 +01:00
Joffrey JAFFEUX 3d1b6b6729
FIX: handle german quotes in discourse local-dates (#8386)
https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307
2019-11-21 11:43:35 +01:00
David Taylor 22e713d2b0 FIX: Add skip_validations in one more place for narrative bot plugin
Followup to bbb814e58e
2019-11-20 15:43:42 +00:00
David Taylor bbb814e58e FIX: Allow advanced tutorial when title emojis are disabled
We already skip validations for other uses of PostCreator in the narrative bot, so this commit adds it in the `reply_to` action as well
2019-11-20 15:29:06 +00:00
Joffrey JAFFEUX e6442a2d2f
FIX: we don't need to refresh dates so often (#8367) 2019-11-18 10:04:07 +01:00
Joffrey JAFFEUX 45648e46ba
FIX: attempts to be correct about dst when using recurrence (#8366) 2019-11-18 10:02:58 +01:00
Sam Saffron e2ccb0c608 DEV: remove NGINX performance report
This report is no longer supported or tested, it was moved to:

https://github.com/SamSaffron/discourse-nginx-performance-report

The new home for the performance report means this is no longer an official
Discourse plugin
2019-11-18 15:30:57 +11:00
Penar Musaraj 20f5a062f4 Fix Prettier in poll plugin 2019-11-15 11:01:22 -05:00
romanrizzi f87d38fc7c Use correct variable name 2019-11-14 17:46:20 -03:00
Blake Erickson 73e33ce243 DEV: send url string to FileHelper and refactor another open-uri call
FileHelper.download requires a string not a URI. I also found another
instance of using open-uri directly and swapped it out to use
FileHelper.

I also updated it to not `read` a file if it comes back nil.

Follow up to: fe01099a38
2019-11-14 08:25:30 -07:00
Gerhard Schlager f72730703a Update translations 2019-11-14 15:41:42 +01:00
Blake Erickson fe01099a38 DEV: Be sure to read the file into string before base64
Follow up to: 08b4753843

If you don't use `read` base64 will error out with: "no implicit
conversion of Tempfile into String"
2019-11-14 05:55:36 -07:00
Blake Erickson 08b4753843 DEV: Use FileHelper instead for downloading narrative bot avatar
Follow up to

b69450bee2

Using FileHelper here allows us to not have to use another require for
open-uri and gives us all the benefits of FileHelper.
2019-11-14 05:23:51 -07:00
Blake Erickson b69450bee2 FIX: need to require open-uri for discourse-narrative-bot plugin
By requiring open-uri this will fix the following error:

```
NoMethodError (private method `open' called for #<URI::Generic...
```

also switched to the shorter syntax and removed default options. Since
ruby 2.4 redirect is on by default.
2019-11-13 18:11:50 -07:00
Roman Rizzi c63e84dc62
FEATURE: Send a message to new TL2 users and point them to the advanced tutorial (#8335)
* FEATURE: Send a message to new TL2 users and point them to the advanced tutorial

* DEV: Use a method to find the discobot user
2019-11-13 18:31:49 -03:00
Robin Ward f518065654 FIX: computed is part of `@ember/object` not `@ember/object/computed` 2019-11-13 11:58:09 -05:00
Arpit Jalan 5ff84be8cc FIX: do not strip nil string 2019-11-13 16:58:14 +05:30
Jarek Radosz 17bca00661 DEV: Run prettier 2019-11-12 12:07:19 +01:00
Jarek Radosz 5d4b240453
DEV: Provide radix argument to parseInt (#8281)
* DEV: Provide radix 10 argument to parseInt

* DEV: Provide radix 16 argument to parseInt

* DEV: Remove unnecessary parseInt calls

* Fix year formatting

parseInt was used here to convert decimals to ints
2019-11-12 10:47:42 +01:00
Robin Ward e39d89ecd9 REFACTOR: Remove `InputValidation` which was simply an `Ember.Object` 2019-11-11 15:48:56 -05:00
Robin Ward da04c602ba REFACTOR: Remove `debounce` to `discourseDebounce`
Otherwise it can be confused with the ember debounce
2019-11-11 13:34:01 -05:00
Kris b066a4128d Adding a text-overflow: ellipsis; mixin and related cleanup 2019-11-06 14:00:29 -05:00
Neil Lalonde b151963f18 Update translations 2019-11-06 10:43:13 -05:00
Gerhard Schlager 94a34af702 Update translations 2019-11-05 16:52:48 +01:00
Jarek Radosz d43e7354ec
DEV: Convert <button> tags to {{d-button}} components (#8224)
* DEV: Convert <button> tags to {{d-button}}

* Fixes
2019-11-04 11:23:54 +01:00
Robin Ward 90f934a660 REFACTOR: Use a module for `Ember.isEmpty` 2019-11-01 13:50:15 -04:00
Robin Ward 8d34f4bbd9 Revert "Revert Ember.run refactors"
This reverts commit fcb1ca52f9.
2019-10-30 09:48:24 -04:00
Robin Ward fcb1ca52f9 Revert Ember.run refactors
This reverts commit 5ca60fcb6b.
2019-10-29 17:10:47 -04:00
Robin Ward 5ca60fcb6b REFACTOR: Use imports for `Ember.run` 2019-10-29 15:31:56 -04:00
Robin Ward 7744b636e9 FIX: Handle nil case for avatar, just in case 2019-10-24 14:02:51 -04:00
Robin Ward 8b4e71cb21 FIX: Allow avatar downloads to follow redirects 2019-10-24 14:01:54 -04:00
Robin Ward 2c0efac25e FIX: Broken certificates 2019-10-24 12:39:58 -04:00
Bianca Nenciu 690db4fd36
FIX: Show poll voters in Oneboxed posts. (#7768) 2019-10-24 14:00:25 +03:00