Commit Graph

1305 Commits

Author SHA1 Message Date
6a65e5312b FEATURE: Add a preview to the poll builder (#7988)
* FEATURE: Add a preview to the poll builder

* Use selectKit helper in the poll preview test

* Extract the mobile-specific poll builder form CSS
2019-08-13 09:49:40 -04:00
b500ef77d7 Poll migration is not idempotent (#7964)
The migration script is not idempotent due to database constrains on the
poll related objects, namely:

polls: index_polls_on_post_id_and_name (post_id,name) UNIQUE
poll_options: index_poll_options_on_poll_id_and_digest  (poll_id,digest) UNIQUE
poll_votes:  index_poll_votes_on_poll_id_and_poll_option_id_and_user_id  (poll_id,poll_option_id,user_id) UNIQUE

This change skips a particular poll migration if it's already found on
the db.
2019-08-08 18:48:53 +02:00
636b6c3a5a FIX: Wrong discobot tutorial started for certain locales.
If a locale has triggers that start with the same word, our regexp will
always end up matching the first trigger. For example,

`start tutorial` and `start tutorial advanced`

To support the change, we have to make the match on triggers more
restrictive. `@discobot quote here` will no longer work like `@discobot
quote`.
2019-08-08 10:53:58 +08:00
b574276e6e DEV: Correct hardcoded value in discobot tests. 2019-08-08 10:53:58 +08:00
78500fb770 UX: Improve layout of poll builder modal 2019-08-07 15:00:03 -04:00
f4543ff02a FIX: ensures pikaday picker is showing in UTC (#7968) 2019-08-06 08:41:38 +02:00
a68d8de72f UX:UX: Use shorter weekday labels in local-dates plugin 2019-08-05 14:21:59 +02:00
1267185a07 DEV: Remove unused option.
Follow up to 18ed03e044611c29b006011e1b729f5a9d43163a.
2019-07-30 21:12:13 +08:00
18ed03e044 Clarify how to start a tutorial
https://meta.discourse.org/t/does-the-advanced-user-tutorial-still-exist/123661/14
2019-07-30 21:10:22 +08:00
Joe
a0df4c3757 UX: prevents cooked dates from wrapping (#7954) 2019-07-30 14:04:30 +08:00
c1d2fb115c DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
97e9599ecc Update translations 2019-07-15 09:43:22 -04:00
bfbd97d3b5 Remove extra whitespaces from locale files
Co-authored-by: Gerhard Schlager <mail@gerhard-schlager.at>
2019-07-04 13:48:17 +02:00
a5e80079d6 FEATURE: Add Belarusian language 2019-07-04 11:37:37 +02:00
463db22928 DEV: Add test.
Follow-up to bccd090cedd4f49b9a07958292baed462b8c1a1c.
2019-06-26 16:37:01 +03:00
bccd090ced SECURITY: Escape email text for posts containing [details]. 2019-06-26 16:28:31 +03:00
7e884cce6b Update translations 2019-06-25 10:57:18 -04:00
dbc59cfe61 Update translations 2019-06-17 13:25:37 -04:00
32cd9ba59b FIX: ensures local-dates modal is not taking full height on mobile (#7772) 2019-06-16 08:48:07 +02:00
a8793d0d9a REFACTOR: Test Memory Usage Fixes (#7769)
* Calling `Discourse.reset()` creates a new container
We should run our de-initializers only after acceptance tests,
since initializers are not run outside of acceptance tests anyway,
and the container at this point can be passed properly to the
`teardown()` method.

* Remove `Discourse.reset` from tests
This would cause a new container to be created which leaks many objects.

* `updateCurrentUser` is more accurate than `replaceCurrentUser`
2019-06-14 14:54:20 +02:00
c322cccd53 FIX: Memory Leaks when decorating posts (#7749)
* Remove long-deprecated method

* FIX: Memory Leaks when decorating posts

Previously we'd keep creating mixins dynamically when decorating the
same class.

This code changes the API to recommend an `id` parameter for each
decorator which will avoid leaks. All plugins should be updated to
include this parameter, although if they don't in the meantime it'll
just mean a warning in the console (and a continued leak.)
2019-06-11 17:21:23 +02:00
5d7e34e0ad Update translations 2019-06-10 10:36:08 -04:00
84e5d58a0d DEV: make prettier 💅 happy 2019-06-06 12:28:41 +02:00
c131903e56 FIX: clone dateTime before changing timezone 2019-06-06 11:16:58 +02:00
b339d67401 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
70b73c2159 DEV: Use proper heredoc name. 2019-06-04 16:31:18 +08:00
63e3d49508 DEV: Add test for poll plugin reduce_excerpt. 2019-06-04 16:30:15 +08:00
dbfdce95c9 Update translations 2019-05-30 10:40:16 -04:00
dc43828905 add trust level blog link to discobot PM welcome 2019-05-29 18:19:35 -07:00
0df5349dbf FIX: ensure the post url is present
Also don't interpolate a string
2019-05-30 00:05:53 +02:00
a188d15b08 FIX: reduce poll when post is nil 2019-05-30 00:02:33 +02:00
227c45107d FEATURE: Implement Onebox for posts including polls. (#7539) 2019-05-29 17:05:52 +02:00
1efed6e527 DEV: amend test for anonymous handling to use real data
Previously we relied on fabrication on anonymous, we can not get the
transaction commit pipeline to work as it does in production, cleanly

This amends it so our anonymous user is created using the core APIs

Signed-off-by: Sam Saffron <sam.saffron@gmail.com>
2019-05-29 15:05:37 +10:00
3a1d99577e FIX: Replace details content with instruction. 2019-05-29 08:36:04 +08:00
b98b994fe7 apply prettier on plugins (#7605) 2019-05-27 11:06:11 +02:00
bfea922167 DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
edc6ac0c66 Update translations 2019-05-21 00:04:37 +02:00
0afcad148a DEV: Always use %{count} in pluralized strings 2019-05-20 23:26:22 +02:00
b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
a58aa9b4bf Update translations 2019-05-20 13:42:05 +02:00
3c1fa3910f DEV: track the correct channel in specs
These tests are erratically failing due to distributed cache messages that
can land between tests

Ensure we are only looking for the correct messages
2019-05-20 18:27:09 +10:00
aeb7143aff DEV: correct flaky poll specs
They were relying on a pristine message bus, however current implementation
still uses redis, stuff can get held up and we can end up publishing
distributed cache messages in the middle invalidating the tests
2019-05-17 16:16:02 +10:00
5605dba85c DEV: Automatically annotate plugin models alongside core models 2019-05-13 16:37:47 +01:00
c00dab89e4 Fix the build take 2. 2019-05-13 11:22:48 +08:00
9059a8ca90 Fix the build. 2019-05-13 10:16:26 +08:00
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
41f4f9302d UX: Rename discobot tutorial triggers.
We found the previous triggers less straight forward than just calling
it tutorial.

`start new user` -> `start tutorial`
`start new advanced user` -> `start advanced tutorial`
2019-05-10 09:08:16 +08:00
f3a346464e FIX: allTimezonesd was mistakenly removed (#7513) 2019-05-09 10:22:54 +02:00
c72f16d927 Follow up to 329969ea20296b74b77e8e568e63f635cefa7b3a. 2019-05-08 15:36:12 +08:00
329969ea20 FIX: Discobot mention tutorial should be case insensitive. 2019-05-07 10:54:22 +08:00