Commit Graph

14650 Commits

Author SHA1 Message Date
Jarek Radosz
2114dd53ef
DEV: Tweak smooth-scroll polyfill speed (#15342)
The polyfill was scrolling much slower than browser that actually support the feature. See: https://github.com/iamdustan/smoothscroll/issues/13

This commit is based on 1baba758a7
2021-12-17 02:38:04 +01:00
Penar Musaraj
60851037d8
DEV: Remove unused composer editor preview sync (#15322) 2021-12-16 17:18:54 -05:00
Penar Musaraj
d9c511f734
DEV: Refactor animation for invalid inputs in wizard (#15334) 2021-12-16 17:17:36 -05:00
Penar Musaraj
92bff4df93
FIX: Add smooth scrolling polyfill (#15333) 2021-12-16 14:07:52 -05:00
Penar Musaraj
48b7696dbc
DEV: Remove jQuery animate calls (#15321)
Affects j/k navigation and PM interaction with @discobot.
2021-12-16 11:00:09 -05:00
Joffrey JAFFEUX
81b0ac1766
FIX: uses new format for search tag endpoint to prevent issues (#15328)
Due to our usage of fixtures, backend changes didn't get catch.
2021-12-16 11:57:47 +01:00
Kris
ad4faf637c
UX: Always show avatar on mobile topic lists (#15323) 2021-12-15 20:31:03 -05:00
jbrw
a2fcc360dd
UX: Show group card with animated loading state (#15253)
* Remove _calculateTopOffset entirely

* Show group card with animated loading state

Showing the animated loading state before rending the actual content prevents an
awkward scroll position jump when displaying this card.

This mimics the behaviour of the user card (which uses the same `CardContentsBase` mixin).

* Fix two user card issues

1. A JS console error (with no consequences) when clicking a group mention
2. User cards weren't being loaded from the header (for example, for PMs)

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2021-12-15 13:47:31 -05:00
Penar Musaraj
9fd92f329e
DEV: remove showHtml jQuery plugin (#15316) 2021-12-15 13:13:06 -05:00
Penar Musaraj
6120dde65c
DEV: Cleanup for attributes in category edit screens (#15284) 2021-12-15 12:37:11 -05:00
Bianca Nenciu
0335c9d77f
FEATURE: Add topic-navigation plugin outlet and popup component (#15081)
Adds a plugin outlet that can be used to insert a popup over topic timeline.
2021-12-15 17:16:14 +02:00
Joe
3b3e572ce6
allow themes to change the lock icon easily (#15309) 2021-12-15 09:13:10 -05:00
Andrei Prigorshnev
6afab87d50
DEV: migrate more routes away from the old actions: pattern (#15275) 2021-12-15 18:06:10 +04:00
Bianca Nenciu
a09b6fe114
FEATURE: Save scroll position on bookmarks page (#15296)
Clicking on a bookmark and then back will preserve the scrolling
position.
2021-12-15 15:27:09 +02:00
Joffrey JAFFEUX
666d291b24
DEV: minor refactoring or jump-to-post (#15312)
- replaces alias by reads
- drops jquery usage
- autofocus should already be done; so remove custom code
- uses @action
2021-12-15 12:09:26 +01:00
David Taylor
88fa8b5848
DEV: Skip Ember OnError validation for plugin qunit tests (#15314)
If the Ember OnError validation test is added, it breaks the "no tests were run" detection (since at least 1 test is always run). This is particularly important when running tests scoped to a single plugin, because there is no indication that you have typo'd the `qunit_single_plugin` query parameter.
2021-12-15 10:59:38 +00:00
Natalie Tay
77781f9a11
FEATURE: Extend plugin API to add multiple poster icons (#15311) 2021-12-15 18:09:26 +08:00
Martin Brennan
e37f0eb240
DEV: Add DropTarget options function for Uppy mixins (#15307)
This is so the target element for file drag + drop is
not always just this.element for the component, and
provides a way to hook into onDragOver and onDragLeave.
By default also adds a .uppy-is-drag-over class to the target
element.
2021-12-15 15:43:07 +10:00
Sam
15752da957
Revert "A11Y: Focus last viewed topic in topic lists (#15300)" (#15304)
This reverts commit 76aeee6735.

Sadly this breaks on non-screen readers on Chrome and Safari
2021-12-15 12:33:33 +11:00
Osama Sayegh
76aeee6735
A11Y: Focus last viewed topic in topic lists (#15300) 2021-12-15 10:02:31 +11:00
Penar Musaraj
dba16391ad
DEV: cleanup for attributes in search filters (#15283) 2021-12-14 14:47:03 -05:00
Joffrey JAFFEUX
031f4f06d5
DEV: update and improvements to json editor (#15294)
- changes on how errors are handled to prevent weird cases
- uses didInsert/willDestroy to setup/clean state
- updates json editor library to 2.6.1
2021-12-14 17:21:49 +01:00
Bianca Nenciu
ce7c821aa9
UX: Extend user hyperlink in staff action logs (#15293)
The avatar hyperlink redirected to admin user page and the username
hyperlink applied a filter. Now both hyperlinks redirect to admin user
page.
2021-12-14 17:14:18 +02:00
Penar Musaraj
10caceec42
DEV: Prefers reads helper over alias (#15282) 2021-12-14 10:03:31 +08:00
Mark VanLandingham
53475cf5be
DEV: Plugin API to add desktop notification handlers (#15280) 2021-12-13 11:54:46 -06:00
Penar Musaraj
954ab4e0ec
DEV: Refactor popup-tip component (#15257) 2021-12-13 11:22:02 -05:00
Dan Ungureanu
adb6202c94
FIX: Check if invite domain is valid (#15238)
* FIX: Check if invite domain is valid

Previous regex checked for generic hostname, which is too generic for
this case.
2021-12-13 16:39:14 +11:00
Martin Brennan
40d13ce662
DEV: Only support multipart for backup S3 uploads with Uppy (#15270)
In the composer, we already only allow for S3 multipart uploads
if enable_direct_s3_uploads is true, so in the backups uploader
that is based on Uppy we want to do the same thing. In future
if self-hosters need some way to not use S3 multipart in these
scenarios for whatever reason we can revisit this then (which
should be as simple as adding a enable_multipart_s3_uploads site
setting).
2021-12-13 15:24:00 +10:00
Martin Brennan
18a209bd0d
DEV: Use Uppy in wizard-field-image uploads (#15269)
We cannot use any of the uppy mixins or core code, because
the code there is not shared with the wizard, and to move
it all to discourse-common would be a task almost equal
difficulty to taking the ring to Mordor.

Therefore, we can just use the uppy vendor libraries in the
wizard, and do a quick-n-dirty version of the uppy upload
code for the wizard-field-image uploader.
2021-12-13 15:23:44 +10:00
Martin Brennan
1c97a7fe43
DEV: Move isInside to private function (#15268)
This text manipulation library can be used by plugins
as well, so better to have this defined as a function
instead of floating above the class.
2021-12-13 12:26:33 +10:00
Martin Brennan
fc01619bcb
FEATURE: Use Tab for indenting text in composer (#15208)
This commit allows for using Tab and Shift+Tab to indent
and de-indent selected text in the composer. The selected
text is searched for the most occurrences of either tabs (\t)
or spaces at the start of each line, and that character is
used for indentation of all lines.
2021-12-13 09:31:49 +10:00
Mark VanLandingham
5e534e5897
DEV: Allow emoji picker to disable popper for itself (#15256) 2021-12-10 14:45:22 -06:00
Joe
726649fd46
adds missing id (#15255) 2021-12-10 14:33:55 +01:00
Joffrey JAFFEUX
ac31c2bbb2
FIX: only consider it handled by composer when a composer (#15254) 2021-12-10 13:07:54 +01:00
Kerry Liu
c8af3e7bc1
UX: only apply link formats on paste to selections that do not contain bbcode-like tags (#15204) 2021-12-09 16:41:44 +00:00
Joffrey JAFFEUX
e0ea16f05d
DEV: removes jquery usage from admin-watched-words (#15246) 2021-12-09 17:06:54 +01:00
Joffrey JAFFEUX
3052eb6ae6
DEV: fixes test as bodyClass is sometimes "foo bar" (#15248) 2021-12-09 15:34:50 +01:00
Joffrey JAFFEUX
adb23636e6
DEV: minor full page search refactoring (#15242)
- drops jquery usage
- shows clear all/ select all only when appropriate
- removes ~ char apparently un-needed
2021-12-09 13:48:08 +01:00
Joffrey JAFFEUX
f889ec2fcd
DEV: refactors admin-plugins/admin-site-settings (#15244)
- drops jQuery usage
- removes apparently useless clearfix
- uses @action
- drops unused clearFilter function in admin-plugins
2021-12-09 13:47:56 +01:00
Joffrey JAFFEUX
5d44adb9b9
DEV: refactors d-section (#15245)
- go tagless
- properly declares properties
- deprecates "false" in favour of false
- drops jquery
2021-12-09 13:47:47 +01:00
Joffrey JAFFEUX
76dff7fd9e
DEV: drops jquery usage from discovery-categories (#15243) 2021-12-09 13:47:13 +01:00
Angus McLeod
df3886d6e5
FEATURE: Experimental support for group membership via google auth (#14835)
This commit introduces a new site setting "google_oauth2_hd_groups". If enabled, group information will be fetched from Google during authentication, and stored in the Discourse database. These 'associated groups' can be connected to a Discourse group via the "Membership" tab of the group preferences UI. 

The majority of the implementation is generic, so we will be able to add support to more authentication methods in the near future.

https://meta.discourse.org/t/managing-group-membership-via-authentication/175950
2021-12-09 12:30:27 +00:00
Jeff Wong
347669ef04
DEV: Add keyboard:move selection event (#15241)
allows plugin event hook for keyboard:move-selection. Passes raw selected and all articles through named params.
2021-12-08 23:38:25 -08:00
Joffrey JAFFEUX
828e75c2f3
DEV: minor choose topic refactoring (#15233)
* DEV: minor choose topic refactoring

- prevents category to be clickable to make clicking topics easier
- drops jQuery
- uses @action
- uses ? operator where possible
- drops un-needed next/schedule usage

* uses topic-status component and prevents pinned icon to be focusable

* Update app/assets/javascripts/discourse/app/templates/components/choose-topic.hbs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-12-09 14:08:21 +11:00
Alan Guo Xiang Tan
4d1c84f15f
UX: Make toggling to filtered replies mode less jumpy. (#15240)
Previously we would jump to the first two replies but it made the
transition very jumpy depending on how long the post being selected is.
2021-12-09 10:03:22 +08:00
Alan Guo Xiang Tan
e668b3dc71
DEV: Remove unnecessary element. (#15225)
This was added 6 years ago in d1e85bdd8b
and I can't see how this is useful for any customizations at all.
2021-12-09 08:40:23 +08:00
Alan Guo Xiang Tan
ae88b52370
DEV: Fix position of avatar flair to be based on the actual avatar. (#15226)
Previously, it was based on the container of the avatar. However, the
container of the avatar can be extended to contain more than just the
avatar itself. This resulted in the positioning of the avatar flair to
be off.
2021-12-09 08:38:39 +08:00
Jeff Wong
51abcd7524
DEV: add app event for user-card:after-show (#15227)
Adds user-card:after-show event for when a usercard is fully loaded and shown.
2021-12-08 15:23:39 -08:00
Osama Sayegh
aec9ce9819
A11Y: Move focus to highlighted post when visiting a topic (#15236)
Meta topic: https://meta.discourse.org/t/discourse-with-a-screen-reader/178105/87?u=osama.
2021-12-08 21:33:15 +03:00
David Taylor
a6230b8138
UX: Improve composer presence-display positioning (#15235)
Previously the discourse-presence plugin was using a `position: absolute` hack to display the 'replying...' users in the top right of the composer. This commit adds a more suitable plugin outlet, and updates the discourse-presence styling so it slots into the flex-box layout at the top of the composer
2021-12-08 16:18:49 +00:00
Dan Ungureanu
d8fe0f4199
FEATURE: Restrict link invites to email domain (#15211)
Allow multiple emails to redeem a link invite only if the email domain
name matches the one specified in the link invite.
2021-12-08 17:06:57 +02:00
Joffrey JAFFEUX
e1b4e2e034
DEV: removes jquery usage from add-category-tag-classes (#15232)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-12-08 14:32:27 +01:00
Joffrey JAFFEUX
a144f49ec2
UX: scroll row to top of container in select-kit (#15230) 2021-12-08 12:22:18 +01:00
Jarek Radosz
301d5657fe
FIX: --header-offset didn't account for overscroll (#15221)
Fixes miniprofiler badge sliding away from the header when you rubber-band overscroll on the top of the page (in Safari)
2021-12-08 01:40:49 +01:00
Mark VanLandingham
a7fdcb921a
DEV: Sniff isPwa for capabilities (#15218) 2021-12-07 15:35:06 -06:00
David Taylor
f3d480dacb
DEV: Allow PresenceChannel to specify custom activity thresholds (#15217)
This allows consumers to vary the parameters on a per-channel basis. e.g. if you wanted a channel to consider someone 'away' after 10 minutes, and another channel to consider someone 'away' after 1 minute, that is now possible.
2021-12-07 20:57:57 +00:00
Jarek Radosz
6e8df3d66b
DEV: Deprecate registerOption() (#15209)
It's been a no-op for 5 years now.
2021-12-07 18:33:45 +01:00
Penar Musaraj
03b0c9f267
A11Y: Remove dupe label on signup confirm field (#15212) 2021-12-07 11:40:00 -05:00
Krzysztof Kotlarek
412a6c0e8c
FIX: edit tag test (#15207)
Broken with PR https://github.com/discourse/discourse/pull/15149
2021-12-07 07:24:55 +01:00
Krzysztof Kotlarek
a616bc296a
FIX: tag transition only if tag name changed (#15149)
We need to change path only if tag name is changed. If a description is added, we don't need to reload.
2021-12-07 05:44:55 +01:00
Andrei Prigorshnev
ce074d118e
DEV: drop unused method (#15190)
There are no usages in Core and plugins.
The last usage was removed in https://github.com/discourse/discourse/pull/9369.
2021-12-06 09:37:54 +08:00
Jarek Radosz
d3912075b6
FIX: PWA badges were not updating (#15191)
That regressed in #7714, over two years ago. :P
2021-12-05 00:15:51 +01:00
Kris
b01ded9c89
UX: Improve tag info style (#15177) 2021-12-03 10:22:05 -05:00
Joffrey JAFFEUX
f9e2ab570b
FIX: allows more precise placement strategy on mobile (#15171)
* FIX: allows more precise placement strategy on mobile

- default to absolute on mobile, fixed on desktop
- allows to set a global `placementStrategy` or a specific to each view `mobilePlacementStrategy` `desktopPlacementStrategy`

This is mainly used to allow a proper composer-actions positioning in mobile.

Note this commit also fixes a mouseDown event which could propagate quote-button event and cause the composer to close full screen on mobile

* mobile only
2021-12-03 11:47:33 +11:00
Mark VanLandingham
7e005f2ea3
DEV: Don't error when emoji-picker is used outside composer (#15172) 2021-12-02 14:50:30 -06:00
Jordan Vidrine
9ecf454074
DEV: Invite page changes (#15175) 2021-12-02 13:18:11 -06:00
Jarek Radosz
7456a59022
FEATURE: Add the ability to go back and forth between PM and New Topic (#15173)
Before this, if you were composing a new topic and then switched the mode to "New Message", the dropdown would disappear.

So if you changed your mind, you'd have to copy the text you typed, cancel, click "New Topic" again, and then paste the text. (and if you already had a title entered too, things would be more complicated…)
2021-12-02 19:46:40 +01:00
David Taylor
55cbc70f3f
DEV: Ensure redirects are passed through to the client by ember-cli (#15170)
By default, `fetch` will transparently follow redirects, even across domain boundaries
2021-12-02 15:03:45 +00:00
David Taylor
ceca34aca6
DEV: Ensure ember-cli does not attempt to bootstrap non-ember pages (#15168)
1b3d124a introduced a logic change which meant that we attempted to bootstrap, even on pages without any `preloadJson` (i.e. non-ember HTML pages from Discourse). This commit restores the original logic, making sure to avoid `?.`.
2021-12-02 10:58:54 +00:00
David Taylor
44d16fcd8e
DEV: Print full stack trace on ember-cli bootstrap error (#15167) 2021-12-02 10:58:03 +00:00
Jarek Radosz
1b3d124a4e
DEV: Don't use ?. in bootstrap-json (#15162)
That code is not transpiled, so it doesn't work on older node versions.
2021-12-01 22:04:56 +01:00
Mark VanLandingham
bd140948e3
DEV: Changes to support chat uploads (#15153) 2021-12-01 13:24:16 -06:00
David Taylor
abe30a17da
DEV: Fix ember CLI bootstrap logic (#15160)
When 1fa7a87f was rebased onto `main`, it didn't take into account the recent changes in c0781d7d. This commit updates the logic to work properly.
2021-12-01 18:31:52 +00:00
Kerry Liu
64e1ca6daa UX: only apply link formats on paste to selections that do not contain links 2021-12-01 13:29:17 -05:00
David Taylor
1fa7a87f86
SECURITY: Remove ember-cli specific response from application routes (#15155)
Under some conditions, these varied responses could lead to cache poisoning, hence the 'security' label.

Previously the Rails application would serve JSON data in place of HTML whenever Ember CLI requested an `application.html.erb`-rendered page. This commit removes that logic, and instead parses the HTML out of the standard response. This means that Rails doesn't need to customize its response for Ember CLI.
2021-12-01 16:10:40 +00:00
Andrei Prigorshnev
f37375f582
DEV: avoid sending events to a destroying object and enable few skipped tests (#15030) 2021-12-01 18:21:44 +04:00
Martin Brennan
d64323b4e6
DEV: Change create-invite-uploader to use uppy (#15088)
Part of overall strategy to remove jQuery file uploader
from the codebase. Also added some helper functionality to
the uppy mixin to allow for non-autostart uploads (all
previous upload changes have been for auto start components.)
2021-12-01 09:45:05 +10:00
Martin Brennan
dce6c6fb50
FIX: Native File object was not passed to uploadHandler (#15146)
The commit 20b2a42f49 broke
upload handlers, because previously we passed through the
native File object to the handler, not the uppy-wrapped
File object.
2021-12-01 09:01:53 +10:00
Krzysztof Kotlarek
9cabd3721b
FEATURE: ability to add description to tags (#15125)
Ability to add description to tags, which will be displayed on hover.
2021-12-01 09:18:56 +11:00
Jarek Radosz
7ce6971539
DEV: Add drop-date to drop-dateless deprecations (#15133) 2021-11-30 17:41:04 +01:00
Jarek Radosz
c0781d7d23
DEV: Replace bent with node-fetch in bootstrap (#15139)
Drops the `acceptedStatusCodes` array.
2021-11-30 17:40:32 +01:00
Andrei Prigorshnev
284ab8cdf7
DEV: migrate (almost all) routes from actions: to @action syntax (#14722)
This should be safe, all these places are pretty straightforward. I've run into one problem when changing this, though. That problem was fixed in https://github.com/discourse/discourse/pull/14624
2021-11-30 17:01:06 +04:00
Jarek Radosz
24356e339b
DEV: Fix pending posts page, make tests work in legacy env (#15132)
* Running the tests only in the ember cli env hid the fact that the pending posts feature wasn't working in the legacy environment
* Tests were using ember-cli-only APIs while there are widely used testing APIs in Discourse that support both ember envs
* `ember-test-selectors` was in both dependencies and devDependencies in discourse/package.json
* `qunit-dom` in package.json was not only unused but also defunct, as it wasn't pulled into the legacy env app

A followup to #14501, and #15128.
2021-11-30 13:01:39 +01:00
Osama Sayegh
fced35de15
UX: Add title attribute to reports cells (#15137)
Some reports, like the Web Crawler User Agents report, have very long strings that need to be truncated when displayed. However, there is no way to see the full value without exporting the report or inspecting the elements using dev tools. This PR set a `title` attribute with the full value to the reports `<td>` elements so that the full value is shown on hover.
2021-11-30 14:58:42 +03:00
Joffrey JAFFEUX
77a1d8675c
FIX: adds 422 status code to bootstrap json (#15138)
A post error validation would return a 422 status code. This status code was not accepted with the recent changes to bootstrap-json/index.js and would return a "Discourse Build Error" string, preventing any kind of bootbox popup error in the composer.
2021-11-30 11:54:38 +01:00
Jeff Wong
9896fc7d33
FIX: allow staff to upload when they should and authorized_extensions is blank (#15136)
Allow staff to upload when authorized_extensions is blank, but
authorized_extensions_for_staff is not
2021-11-29 21:40:54 -08:00
David Taylor
af4b8d0e21
DEV: Automatically leave PresenceChannels when in the background (#15047)
* DEV: Improve PresenceChannel state storage

Replaces some objects with Maps, and removes the redundant _presentChannels Set.

* DEV: Automatically leave PresenceChannels when in the background

If a tab has been in the background for 10s, or there has been no user activity for 60s, then the user will be removed from all PresenceChannels until activity resumes. Developers can opt-out of this by passing `{onlyWhileActive: false}` to the `enter` method.
2021-11-30 15:38:19 +11:00
Jarek Radosz
6662101208
DEV: Fix a test leak (#15135)
The leak was introduced in #11722 and a test was added that relied on it in #14563

This PR fixes the leak (bookmarks-test), fixes the test that relied on it (fast-edit-test), and repleces some ad-hoc code with cloneJSON helper (other files)
2021-11-30 13:45:26 +11:00
Martin Brennan
7e5f52a163
DEV: Use pushObject for inProgressUploads in uppy (#15134)
The inProgressUploads is meant to be used to display these uploads
in a UI, and Ember will only update the array in the UI if pushObject
is used to notify it.
2021-11-30 10:42:45 +10:00
Martin Brennan
f70e6c302f
DEV: Switch to using uppy uploads in composer by default (#15058)
This is a big change to change over to using the uppy
upload mixin in the composer by default. This gets rid
of the temporary composer-editor-uppy component, as well
as removing the old ComposerUpload mixin and copying over
any missing functions that were not yet implemented by
ComposerUploadUppy. This has been working well on our
hosting for some time now and has led us to several
bug fixes.

This commit also deletes the old plugin API for adding
preprocessors for the uploads. The accepted method of doing
this now is via an uppy preprocessor plugin, which we have
several examples of in the core codebase.

Leaving the `enable_experimental_composer_uploader` site setting
intact for now because some plugins still rely on it, this
will be removed at a later date.

One step closer to ending the jQuery file uploader saga...
2021-11-30 08:33:06 +10:00
Joffrey JAFFEUX
3dc0b9e077
UX: closes multi-select on selection when maximum=1 (#15092) 2021-11-29 14:29:11 +01:00
Loïc Guitaut
354f88358c DEV: Add ember-test-selectors to production env 2021-11-29 11:31:31 +01:00
David Taylor
0ab57975a4
FIX: Ensure widget hooks always call the correct instance (#15127)
Widgets instances are ephemeral - they change on every re-render. We always want to notify the 'most recent' widget instance of events. This regressed in 1b9cf1b1 because the touchStart and drag hooks would persist the widget instance from the initial render. This commit switches TouchStart and Drag back to the pattern other events use, so that the most recent instance is always called. The performance benefits of per-element event listeners are retained.
2021-11-29 09:33:40 +00:00
Loïc Guitaut
a5fbb90df4 FEATURE: Display pending posts on user’s page
Currently when a user creates posts that are moderated (for whatever
reason), a popup is displayed saying the post needs approval and the
total number of the user’s pending posts. But then this piece of
information is kind of lost and there is nowhere for the user to know
what are their pending posts or how many there are.

This patch solves this issue by adding a new “Pending” section to the
user’s activity page when there are some pending posts to display. When
there are none, then the “Pending” section isn’t displayed at all.
2021-11-29 10:26:33 +01:00
Joffrey JAFFEUX
6e603799eb
FIX: treats ipad as mobileView for popper positioning (#15091)
* FIX: treats ipad as mobileView for popper positioning

* ensures it doesn’t break wizard
2021-11-29 17:40:01 +11:00
Jarek Radosz
530eb0c9bd
DEV: Throw on non-xhr errors (#15123)
Makes it easier to debug post-stream problems when the issue isn't with the server response.
2021-11-29 17:36:48 +11:00
Jarek Radosz
5d643a498e
FIX: Global log notice regressed in #15000 (#15119)
Notice models didn't have the same injections as GlobalNotice components.
2021-11-29 17:13:35 +11:00
Martin Brennan
20b2a42f49
DEV: Send multiple files in batches to composer upload handlers when using uppy (#15124)
In jQuery file upload land, we were sending a single file through
at a time to matching upload handlers. This in turn required plugin
authors to marshal the files as they came through one by one if they
wanted to group them together to do something with them. Now that
we are using uppy, files come through in the groups they are added
in (for example dropping multiple, selecting multiple from the system
file dialogue).

This commit changes the matching upload handlers to send through
all matching files at once instead of piecemeal.
2021-11-29 11:19:02 +10:00
Jarek Radosz
13aed6fe3b
FIX: Setting bookmarks in some cases was broken (#15120)
Error introduced in #14781

```
Error: Assertion Failed: You attempted to update <(unknown):ember3217>.bookmarks to "<(unknown):ember3846>", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as `@tracked`, or use `@ember/object#set` to do this.
```
2021-11-28 23:34:51 +01:00
Martin Brennan
e464958333
DEV: Fix uploadHandler impl. in composer-upload-uppy mixin (#15105)
In f6528afa01 I added parity support
for composer upload handlers to the uppy-ized composer. However the
way I assumed that it was only possible to handle a single file
upload at a time was false; it only appeared this way in the old
jQuery file upload composer because jQuery file upload sent through
files one at a time even if multiple were added at once. This caused
issues in certain plugins and themes by third parties.

This commit fixes the issue by making the uppy upload handler work
the same as the old one, by capturing all of the added files that
have matching handlers then going through them one by one and passing
them to the handler function.
2021-11-29 08:32:06 +10:00