Commit Graph

1158 Commits

Author SHA1 Message Date
Joffrey JAFFEUX 8ca9ad887d
FIX: replaces fake null value by clearable option (#8875) 2020-02-06 08:30:26 +01:00
Mark VanLandingham 5d97286fa7
FEATURE: Allow single option polls (#8853) 2020-02-05 08:03:27 -06:00
Joffrey JAFFEUX 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
Bianca Nenciu 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
Dan Ungureanu 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
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