This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Loïc Guitaut 1166db12b4
FIX: Make watched words uploads work as intended (#17097)
* FIX: Make watched words uploads work as intended

Currently when we upload a file containing watched words, it will always
add the words to the action that was initially selected: this is the
`block` action by default but if changing manually the action in the URL
to `flag` for example, then this action will be selected and uploaded
watched words will be categorised as `flag` no matter what.

The problem lies with how the component works: it’s an Uppy object where
extra data is defined to provide an action key to the server but when
navigating to another listed action, while this action key is properly
updated on the component itself, the underlying Uppy object has already
been created and doesn’t care about the new value.

This patch solves this by using the `_perFileData` method instead of
`data`: the former is merged just before uploading a file whereas the
latter is used when the Uppy object is created.
2022-06-17 11:07:58 +02:00
..
app Revert "DEV: Centralize user updates to a single MessageBus channel. (#17058)" (#17115) 2022-06-17 12:24:15 +08:00
config FIX: Add safari 12 to ember-cli build targets in production (#16745) 2022-05-13 10:08:59 +01:00
lib DEV: Add support for GH Codespaces to ember proxy (#16581) 2022-04-28 14:46:59 +02:00
public/assets/scripts DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
tests FIX: Make watched words uploads work as intended (#17097) 2022-06-17 11:07:58 +02:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Fix typos and outdated comments (#16614) 2022-05-04 14:12:18 +08:00
package.json FIX: uses tippy for popover (#15409) 2022-05-02 17:10:26 +02:00
testem.js DEV: Ensure ember-cli rake theme:qunit works with CSP enabled (#16541) 2022-04-22 16:59:45 +01:00