Commit Graph

1153 Commits

Author SHA1 Message Date
Neil Lalonde
2dd1ff79b4 Update translations 2020-01-20 11:00:44 -05:00
Jarek Radosz
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
Arpit Jalan
91f8ada8e0 FIX: add missing translation key for narrative bot Italian locale. 2020-01-16 13:23:16 +05:30
Joffrey JAFFEUX
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
Joffrey JAFFEUX
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
David Taylor
4e8aaacce8 UX: Update IE11 deprecation warning, and enable by default 2020-01-13 17:01:28 +00:00
Robin Ward
648a1124eb FIX: Specs with old filename 2020-01-10 15:29:35 -05:00
Robin Ward
72c3f36e58 Add optional file to precompile list 2020-01-10 15:14:32 -05:00
Robin Ward
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
Jarek Radosz
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
Arpit Jalan
57081acc08 FIX: trigger commands are different for each locale, account for that. 2020-01-01 16:53:36 +05:30
Joffrey JAFFEUX
c15d702ae6
FEATURE: internet explorer deprecation global notice (#8577) 2019-12-30 08:19:07 +01:00
Krzysztof Kotlarek
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
Neil Lalonde
91b290c784 Update translations 2019-12-19 12:31:52 -05:00
Robin Ward
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
David Taylor
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
Krzysztof Kotlarek
f59647cd55
FIX: move IE specific CSS rules to discourse-internet-explorer plugin (#8567) 2019-12-18 15:25:16 +11:00
Mark VanLandingham
44612f900e
FIX: Remove 'staff_only' results option for non-staff (#8565) 2019-12-17 13:43:15 -08:00
Robin Ward
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
Robin Ward
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
romanrizzi
5431ae0a17 FIX: Don't raise an error if the user is not present 2019-12-11 11:03:31 -03:00
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