Commit Graph

803 Commits

Author SHA1 Message Date
5268568d23 FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474)
This PR removes the user reminder topic timers, because that system has been supplanted and improved by bookmark reminders. The option is removed from the UI and all existing user reminder topic timers are migrated to bookmark reminders.

Migration does this:

* Get all topic_timers with status_type 5 (reminders)
* Gets all bookmarks where the user ID and topic ID match
* Loops through the found topic timers
  * If there is no bookmark for the OP of the topic, then we just create a bookmark with a reminder
  * If there is a bookmark for the OP of the topic and it does **not** have a reminder set, then just 
update it with the topic timer reminder
  * If there is a bookmark for the OP of the topic with a reminder then just discard the topic timer
* Cancels all outstanding user reminder topic timers
* **Trashes (not deletes) all user reminder topic timers**

Notes:

* For now I have left the user reminder topic timer job class in place; this is so the jobs can be cancelled in the migration. It and the specs will be deleted in the next PR.
* At a later date I will write a migration to delete all trashed user topic timers. They are not deleted here in case there are data issues and they need to be recovered.
* A future PR will change the UI of the topic timer modal to make it look more like the bookmark modal.
2020-09-14 11:11:55 +10:00
1c71f81144 Update translations 2020-09-09 14:59:40 +00:00
f2842490d3 PERF: Don't load all poll_votes for a poll 2020-09-05 18:42:11 +01:00
110f6ec6dd DEV: fixes eslint/prettier on github actions (#10601) 2020-09-04 20:01:14 +02:00
bf88410126 DEV: apply coding standards to plugins (#10594) 2020-09-04 13:51:53 +02:00
2d56663fc4 REFACTOR: Remove _.clone which is not deep 2020-09-03 10:03:33 -04:00
55c9c54b8b REFACTOR: Remove _.range and use ES6 instead 2020-09-03 10:03:33 -04:00
71da5e0e27 Update translations 2020-09-01 13:02:16 +00:00
d495464ead Update translations 2020-08-25 13:02:37 +00:00
a27b6770fd FIX: Polls can be quoted and loaded (#10456)
Variable 'post' was used to hold the current post and the post where
the poll appeared, which can be different when polls are quoted.
2020-08-19 18:13:56 +03:00
d0faee3bd8 Update translations 2020-08-18 13:02:44 +00:00
1a78a429b5 Update translations 2020-08-11 13:04:00 +00:00
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
81247c1f6a DEV: Remove mention of Transifex from locale files 2020-08-06 13:34:00 +02:00
a68533b394 Update translations 2020-08-05 13:55:12 +00:00
14eec43889 DEV: Use CSS custom properties for colors in core plugins 2020-08-04 11:14:33 -04:00
e0d9232259 FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
2020-07-27 10:23:54 +10:00
1c33f07e92 FIX: Poll tests were overwriting a couple of computed properties 2020-07-17 15:05:36 -04:00
5b276af921 Remove Discourse.SiteSettings from tests (#10193)
* Remove unused Discourse.SiteSettings

* Remove `Discourse.SiteSettings` from many tests

* REFACTOR: `lib:formatter` was using a lot of leaky state

* Remove more `Discourse.SiteSettings` from tests

* More SiteSettings removed from tests
2020-07-09 15:54:53 -04:00
10e2578751 FIX: Set default value for poll result field (#10178) 2020-07-07 17:23:21 +03:00
9075d5a9f5 Revert "FIX: Set default value for poll result field (#10044)"
This reverts commit 40de5352248df3e17c7d790f5a0c89a2162cca46.

Sadly this appears to break the JS test suite
2020-07-07 10:24:37 +10:00
40de535224 FIX: Set default value for poll result field (#10044) 2020-07-07 10:16:21 +10:00
26260d50b1 DEV: Import I18n in standard plugins (#10098) 2020-06-22 02:36:45 +02:00
390dc5c7a9 Update translations 2020-06-21 11:58:21 +02:00
36a3675e0a Update translations 2020-06-14 23:39:33 +02:00
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
65dd8e2fa2 Update translations 2020-06-10 12:01:02 -04:00
72c09ab4ae Update translations 2020-06-01 13:58:51 -04:00
3d20a1143b Update translations 2020-05-26 10:06:07 -04:00
faeb5793ba UI: various tweaks to polls UI on mobile (#9864) 2020-05-23 19:08:49 +02:00
6e3fe1abba DEV: Use async/await instead of andThen() 2020-05-11 18:22:48 +02:00
6359a5f8a9 DEV: Fix poll plugin causing error when server reloads in dev env. 2020-05-08 14:59:55 +08:00
781e3f5e10 DEV: Use response.parsed_body in specs (#9615)
Most of it was autofixed with rubocop-discourse 2.1.1.
2020-05-07 17:04:12 +02:00
029d091ea8 FIX: displays poll's close date in local time (#9656) 2020-05-06 22:18:47 +02:00
9bff0882c3 FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo

Use Nokogumbo HTML parser.
2020-05-05 13:46:57 +10:00
3cce608379 Update translations 2020-05-04 10:39:01 -04:00
84be92c067 FIX: Avoid exception when rendering a poll in a trashed post
Maintain the poll belongs_to post relation when a post is trashed
2020-04-28 14:43:09 +01:00
7177b9d771 UX: Translating poll chart types wasn't possible 2020-04-28 14:29:42 +02:00
82f9dcf301 Update translations 2020-04-20 11:37:59 +02:00
330102fd20 FEATURE: Show votes in an "on voted" poll to the creator
This required properly plumbing the guardian into the serializer.

Notably, the default state in the client was not changed - if you haven't voted in
the poll, you need to click the button to view the results instead of the results
being immediately visible on page load.

Implements https://meta.discourse.org/t/-/138108
2020-03-20 13:36:42 -07:00
5e4cf244a5 FIX: Show time input in poll builder (#9128) 2020-03-16 13:25:45 +01:00
29b35aa64c DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
48ba65f406 DEV: Clean up Ember imports (#8979)
Includes:
* Import `computed` helpers
* Import `@ember/application`
* Import `isBlank` from `@ember/utils`
* Import `A` from `@ember/array`
* Import `EmberArray` from `@ember/array`
* Import `ArrayProxy` from `@ember/array/proxy`
* Import `warn` from `@ember/debug`
* Import `EmberObject` from `@ember/object`
* Import `Application` from `@ember/application`
* Import `EmberRouter` from `@ember/routing/router`
* Import `isPresent` from `@ember/utils`
* Import `computed` from `@ember/object`
* Import `guidFor` from `@ember/object`
* Import `isArray` from `@ember/array`
* Import `TextField` from `@ember/component`
* Import `TextArea` from `@ember/component`
* Import `Promise` from `rsvp`
* Import `Evented` from `@ember/object/evented`
* Replace deprecated `ember-addons/ember-computed-decorators` imports
2020-03-06 23:49:28 +01:00
763a065df9 FIX: Correctly format select options for group poll by fields (#9131) 2020-03-06 12:58:59 -06:00
4b70719a48 Update translations 2020-03-05 12:45:42 -05:00
c62d5b139b FIX: Allow users to create polls in PMs with non human users (#9055) 2020-03-02 14:29:40 -05:00
a4fc6ccc12 UX: prevents jumpyness when displaying poll voters (#9054) 2020-02-27 11:09:54 +01:00
b0675075f7 Update translations 2020-02-25 10:29:14 -05:00
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