Commit Graph

1391 Commits

Author SHA1 Message Date
Kris f1d5d2b134
REFACTOR: Convert buttons to flexbox (#11785) 2021-01-27 16:17:08 -05:00
Joffrey JAFFEUX c6a1042950
DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
Andrew Prigorshnev 3bbe87f229
FIX: polls extending in post reply histories (#11837)
* Add an acceptance test

* FIX: polls extending in post reply histories
2021-01-26 10:29:49 -05:00
Jarek Radosz 33507cdb14
DEV: Styleguide fixes (#11836)
Includes:

* FIX: Don't override computed properties
* FIX: Prevent a set-after-destroy error
* FIX: Get rid of select-kit deprecations
* FIX: Replace removed admin-group-selector
* FIX: Provide onChange action to fix warnings
* FIX: Remove an element with an invalid id
* DEV: Remove topic-notifications-button from dropdowns
  It has its own styleguide section under "Molecules".
* UX: Styleguide tweaks
* DEV: Make the dropdowns useable
2021-01-26 15:40:58 +01:00
Discourse Translator Bot 3c028cb67f
Update translations (#11848) 2021-01-26 14:52:35 +01:00
Krzysztof Kotlarek fcbb6c4143
FIX: remove rendering UX from bookmark model (#11765)
Fix for `bookmark.js` model. Most logic was moved to `topic` controller
2021-01-25 09:35:13 +11:00
tshenry 17e683d373
UX: Simplify narrative bot bio (#11820) 2021-01-22 17:21:26 -08:00
Vinoth Kannan 039b4111e3
FIX: print raw html of logo image to skip unwanted html encoding (#11805)
Currently, the image logo is broken since the image tag is rendering incorrectly.
2021-01-22 19:48:01 +05:30
Discourse Translator Bot 0e8c155b70
Update translations (#11779) 2021-01-20 22:58:26 +01:00
Discourse Translator Bot 7f7bae1262
Update translations (#11764) 2021-01-20 12:43:57 +01:00
Discourse Translator Bot 440b63e833
Update translations (#11756) 2021-01-19 16:14:59 +01:00
Discourse Translator Bot 0e8e3f4813
Update translations (#11689) 2021-01-12 14:29:05 +01:00
Kane York a88a246c6e
FIX: Discobot exception when site_contact_username is promoted (#11666)
Because the site admin is sending a message to themselves, there is only one user in the topic_allowed_users, and `.last` returns nil.
Attempt to recognize this situation and continue, or bail without doing anything if this somehow happens another way.
2021-01-11 13:07:36 -08:00
Joffrey JAFFEUX 49f4c75080
FIX: recurring was not working for some cases (eg: hours and unit > 1) (#11657) 2021-01-07 12:21:51 +01:00
Discourse Translator Bot 45671276bf
Update translations (#11635) 2021-01-05 14:27:00 +01:00
Joffrey JAFFEUX 8af6e72675
FIX: ensures recurring works when setting a start date in future (#11587) 2020-12-29 20:11:18 +01:00
Discourse Translator Bot 09f9d4b281
Update translations (#11601) 2020-12-29 19:44:53 +01:00
Discourse Translator Bot e113ddc73c
Update translations (#11557) 2020-12-22 14:49:40 +01:00
David Taylor d25fd34b44
DEV: Remove with_deleted workarounds for old Rails version (#11550)
* DEV: Remove with_deleted workarounds for old Rails version

These workarounds using private APIs are no longer required in the latest version of Rails. The referenced issue (https://github.com/rails/rails/issues/4306) was closed in 2013. The acts_as_paranoid workaround which this was based on was removed for rails > 5.

Switching to using a scope also allows us to use it within a `belongs_to` relation (e.g. in the Poll model). This avoids issues which can be caused by unscoping all `where` clauses.

Predicates are not necessarily strings, so calling `.join(" AND ")` can sometimes cause weird errors. If we use `WhereClause#ast`, and then `.to_sql` we achieve the same thing with fully public APIs, and it will work successfully for all predicates.
2020-12-22 10:38:59 +11:00
Roman Rizzi 142e0ae062
Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)"" (#11509)
* Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)"

This reverts commit aa0d4ea764.

* Correctly debounce onScroll function
2020-12-18 10:18:52 -03:00
Penar Musaraj 8922a878f3
DEV: Add site header organism to styleguide (#11495) 2020-12-15 12:48:47 -05:00
Penar Musaraj 2b2c840297
DEV: Fix JS errors in styleguide (#11494)
Replaces latest topic list component with basic topic list (the former
no longer exists). And fixes the display of the topic footer buttons.
2020-12-15 12:35:14 -05:00
Discourse Translator Bot 47fa3cf864
Update translations (#11492) 2020-12-15 15:25:10 +01:00
Roman Rizzi aa0d4ea764
Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)
This reverts commit 8b426431a4.
2020-12-10 16:48:25 -03:00
Roman Rizzi 8b426431a4
DEV: Wrap `Ember.run.debounce`. (#11352)
We want to wrap the `Ember.run.debounce` function and internally call `Ember.run` instead when running tests.

This commit changes discourseDebounce to work the same way as `Ember.run.debounce`.

Now that `discourseDebounce` works exactly like `Ember.run.debounce`, let's replace it and only use `DiscourseDebounce` from now on.

Move debounce to discourse-common to be able to reuse it in different bundles

Keep old debounce file for backwards-compatibility
2020-12-10 11:01:42 -03:00
Robin Ward 76b04afca3
FIX: Local dates showed incorrect timezones with extra whitespace (#11408)
You might wonder why this matters. It turns out in some locales like
French, we replace quotation marks with « and » -- this should likely
not happen before BBCode is parsed but that is not the case for this
plugin. The plugin has code to handle this situation, but it means extra
spaces are inserted around the time zone which breaks it.

This fix allows us to supply extra whitespace and will show the correct
time zone.
2020-12-08 10:57:18 +11:00
Penar Musaraj 28feb7c2ff
DEV: Add header colors to styleguide (#11421) 2020-12-07 14:50:45 -05:00
Roman Rizzi bbe5d8d5cf
DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
Discourse Translator Bot d7bd9aa3d0
Update translations (#11385) 2020-12-01 14:34:25 +01:00
Roman Rizzi 1c2358ba16
DEV: Tidy up imports. (#11364)
Only allow one import definition per file and add a new eslint rule to enforce it.
2020-11-27 11:30:16 -03:00
Joffrey JAFFEUX ad1a10e6e9
FIX: hides votes from regular users when poll is staff only (#11342) 2020-11-24 22:19:06 +01:00
Discourse Translator Bot 9c901ee978
Update translations (#11336) 2020-11-24 17:25:37 +01:00
chenyxuan defbae4007
FIX: Force string conversions to UTF-8 "bytes" (#11315)
https://meta.discourse.org/t/cant-create-poll-with-some-chinese-options/170836
2020-11-23 17:51:05 +01:00
Robin Ward 3394d994e9 FIX: Tests were using jQuery selectors
For the most part `querySelectorAll` will work with jQuery selectors,
but the big exception is `:eq(0)` and similar. Those needed to be
replaced.
2020-11-23 11:36:07 -05:00
Discourse Translator Bot 7fecad41db
Update translations (#11264) 2020-11-17 14:49:58 +01:00
Discourse Translator Bot 9904a007c5
Update translations (#11182) 2020-11-10 15:23:06 +01:00
Discourse Translator Bot 886d619d3f
Update translations (#11108) 2020-11-03 18:08:07 +01:00
Jarek Radosz a17d54d0bf
DEV: De-arrowify tests (#11068)
Using arrow functions changes `this` context, which is undesired in tests, e.g. it makes it impossible to setup things like pretender (`this.server`) in `beforeEach` hooks.

Ember guides always use classic functions in examples (e.g. https://guides.emberjs.com/release/testing/test-types/), and that's what it uses in its own test suite, as do various addons and ember apps.

It was also already used in Discourse where `this` was required. Moving forward, it will be needed in more places as we migrate toward ember-cli.

(I might later add a custom rule to eslint-discourse-ember to enforce this)
2020-10-30 17:37:32 +01:00
Discourse Translator Bot 0a74322589
Update translations (#11087) 2020-10-30 16:06:32 +01:00
Kane York 8b24e0f0b7
FIX: Use <> link instead of code for discobot backup image link (#11063)
Due to the new enhanced copy-paste handling, the URL would be included in the user's reply as code, too!
By surrounding the link in angle brackets, we prevent the bot from accidentally including the link itself and spoiling the surprise.

I considered having the bot automatically edit the user's post to remove the backticks. I very quickly ran into a problem with spurious whitespace, and it would also look _super weird_ for the bot to edit your post when that's not what's being taught.
The seemingly bare link not automatically embedding is also weird, but slightly less so.

Fun fact: this doesn't work on localhost, because the onebox engine refuses to issue requests to localhost :)
2020-10-30 11:57:27 +11:00
Robin Ward 435a9913a4 REFACTOR: Replace global `find` with `queryAll`
In newer Embers jQuery is removed. There is a `find` but it only returns
one element and not a jQuery selector. This patch migrates our code to a
new helper `queryAll` which allows us to remove the global.
2020-10-29 14:45:51 -04:00
Robin Ward b302321451 REFACTOR: Test assertions should be imported.
Previously they were global functions.
2020-10-28 11:39:06 -04:00
Krzysztof Kotlarek dbec3792b7
FIX: pretty text allow list (#10977)
Reword whitelist to allowlist in pretty-text.
This library is used by plugins so we need deprecation notice.
2020-10-28 13:22:06 +11:00
Kane York 03503a37be
FIX: Capybara diet upgrade, can eat real 🌿 now (#11040)
More seriously: discobot wasn't reacting properly if users used their
emoji keyboard to insert a real herb emoji, which works just as well
in a real post.

While we're here, use String#include? instead of constructing a new regexp.

https://meta.discourse.org/t/capybaras-dont-eat-real-emojis/168361
2020-10-27 07:49:22 -07:00
Discourse Translator Bot 9648122b51
Update translations (#11042) 2020-10-27 15:36:21 +01:00
Jarek Radosz 690a38bc9b
FIX: Show title on results of all poll types (#11041)
Previously, the title was shown only with pie chart results. Issue originally reported in https://meta.discourse.org/t/keep-the-heading-visible-when-showing-poll-results/167585

Also includes:
UX: Move the "Show breakdown" button (Display it with other poll buttons at the bottom)
FIX: Show the breakdown button only on any votes
2020-10-27 13:48:54 +01:00
Robin Ward 1e4c0d1857 Remove more global variables from tests.
* Use `sinon` instead of `sandbox` and require an import.
* You need to import `currentURL` to use it.
2020-10-26 13:32:11 -04:00
Robin Ward 919f488358 REFACTOR: All remaining acceptance tests converted to new format
Also contains fixes to leaky state in pretender.
2020-10-23 09:28:13 -04:00
Joffrey JAFFEUX b6492356cb
FIX: removes duplicate “ and adds ‘ and ’ (#11010) 2020-10-23 10:35:43 +02:00
Joffrey JAFFEUX 6811902a70
FIX: converts “ and ” to " in local dates (#10987) 2020-10-21 17:16:36 +02:00