Commit Graph

17521 Commits

Author SHA1 Message Date
Joe
641f49748d
Revert "prevent auto-scroll when focus is set inside header panels" (#14829)
This reverts commit f444e3e3f7.
2021-11-08 09:11:26 +08:00
Martin Brennan
18dc2c5040
FEATURE: Use uppy for tags uploader (#14821)
No other caveats or fixes.
2021-11-08 08:18:09 +10:00
Krzysztof Kotlarek
fe8087e523
FEATURE: small action post accepts href (#14816)
Optionally add href to small action.
It can be used by discourse-assign to link to correct post from translation
2021-11-08 08:24:44 +11:00
Joe
f444e3e3f7 prevent auto-scroll when focus is set inside header panels 2021-11-05 12:09:31 -04:00
Martin Brennan
8586088b87
FIX: Stop saving bookmark on modal press ESC (#14823)
Since db7be947df the functionality
to not save a bookmark when pressing ESC on the modal has been
broken, because a new initiatedByESC event was introduced there
in d-modal instead of clicking on the modal close button. This
commit fixes the issue by adding an initiatedByESC property
to onClose inside application.js, and checking for that OR
initiatedByCloseButton in the bookmark modal.
2021-11-05 13:43:19 +10:00
Martin Brennan
1dddbf3d47
FEATURE: Use uppy for watched word uploader (#14817)
This commit, while changing the watched word uploader to use
uppy, also fixes a minor bug with the UppyUploadMixin where
the file input's value was not cleared after reset, which
prevented subsequent file uploads. The composer mixin already
has this fix.
2021-11-05 09:23:28 +10:00
jbrw
6360d3d4e7
FIX: ensure required_tag_group_name is null if no value present (#14796)
* FIX: ensure required_tag_group_name is null if no value present

If the array was present but empty `required_tag_group_name` would be set to undefined, which would then be removed from the payload of the remote request.

Addming the length check ensures the value is set to null, which is sent as an empty value (which the backend sees, and can remove it and persist the change on the Category object).
2021-11-04 17:26:21 -04:00
Penar Musaraj
9b30103628
UX: Layout fixes for admin permalinks page (#14819) 2021-11-04 14:15:55 -04:00
Penar Musaraj
89a2cec7be
REFACTOR: Use CSS animations for likes (#14809) 2021-11-04 09:13:34 -04:00
Martin Brennan
ccd259e2b5
FEATURE: Move avatar uploader to uppy (#14815)
Simple change, no further caveats for this one.
2021-11-04 14:40:20 +10:00
Martin Brennan
fac9185421
FEATURE: Move emoji uploader to use uppy (#14814)
This commit changes the emoji uploader to use the UppyUploadMixin,
and makes some minor changes to the emoji uploader (tightening the
copy for drag and drop and adding a percentage for the upload).

Since no other uppy upload mixin components have needed to upload
multiple files so far, this necessitated adding a tracker for the
in progress uploads so we know when to reset the uploader once all
uploads are complete.

At the moment, the emoji uploader cannot be used for direct S3 uploads
because the admin emoji controller creates other records and does other
magic with the emojis. At some point we need to factor this kind of thing
into the ExternalUploadManager.transform! action to complete external
uploads.
2021-11-04 11:31:58 +10:00
Joe
046138314e fix test 2021-11-03 11:41:13 -04:00
Joe
cc6b6b5b77 fix test 2021-11-03 11:41:13 -04:00
Joe
6252e166a9 Add tests 2021-11-03 11:41:13 -04:00
Joe
c0cbfcc548 Add lazy loading to post avatars 2021-11-03 11:41:13 -04:00
Joe
a3fe52dff3 Add lazy loading to topic list avatars 2021-11-03 11:41:13 -04:00
Jean
734ba90afe
UX: remove tags chooser on PMs for non-staff users (#14800) 2021-11-02 21:44:11 -04:00
jbrw
aec125b617
FIX: Display Instagram Oneboxes in an iframe (#14789)
We are no longer able to display the image returned by Instagram directly within a Discourse site (either in the composer, or within a cooked post within a topic), so:

- Display an image placeholder in the composer preview
- A cooked post should use an iframe to display the Instagram 'embed' content
2021-11-02 14:34:51 -04:00
Penar Musaraj
51233ae349
UX: Fix several issues with topic progress refactor (#14790) 2021-11-02 13:45:40 -04:00
Penar Musaraj
80c6f6a48b
FIX: Use mouse down event when cancelling search (#14788) 2021-11-02 09:26:06 -04:00
Penar Musaraj
7dcecef4c3
FIX: Prevent duplicate search requests to backend (#14786)
When sending a full search request to backend (i.e. when hitting Enter),
the debouncer needs to be cancelled, otherwise it will get invoked and
trigger a second search request to the backend.
2021-11-01 13:48:42 -04:00
Penar Musaraj
116b93595a
UX: Fix bar-style category dropdown (#14785) 2021-11-01 11:17:41 -04:00
Martin Brennan
dcf3733c13
FIX: Deleting a for_topic bookmark caused JS error (#14781)
When deleting a for_topic bookmark, we were calling
bookmark.attachedTo() for the bookmarks:changed event,
but the bookmark was not always a Bookmark model instance,
so sometimes that call would error. Now we make sure that
the bookmarks in the topic.bookmarks JS array are all
bookmark model instances, and added a test to cover this
deleting for_topic bookmark case as well.
2021-11-01 13:31:17 +10:00
Jarek Radosz
a7322aca77
DEV: Remove unnecessary controllerFor in tests (#14779) 2021-10-30 23:36:37 +02:00
Kris
cd8822cb50
UX: better accommodate PM composer with tags (#14778) 2021-10-29 16:26:37 -04:00
Penar Musaraj
f6a3c22a89
DEV: Allow replacing share icons separately (#14774) 2021-10-29 13:35:27 -04:00
Robin Ward
e3e0d025ea FIX: Include topic details when PMing
We used to do this and at some point regressed when we lost a reference
to the `post` object. This restores the old behaviour.
2021-10-29 12:42:27 -04:00
Penar Musaraj
724f1ee9d1
UX: Fix short post width on mobile (#14771) 2021-10-29 11:39:19 -04:00
Penar Musaraj
488511479e
UX: Show quick search hint more consistently (#14769) 2021-10-29 11:08:31 -04:00
Bianca Nenciu
19ef6995a8
FIX: Do not replace words in hashtags and mentions (#14760)
Watched words were replaced inside mentions and hashtags when watched
word regular expressions were enabled.
2021-10-29 17:53:09 +03:00
Penar Musaraj
095421a1e1
REFACTOR: Use IntersectionObserver to calculate topic progress position (#14698) 2021-10-29 09:23:15 -04:00
Bianca Nenciu
148ee1d162
FIX: Do not perform link lookup for replaced links (#14742)
A link that was added because a watched word was replaced could create
a notice if the same link was present before.
2021-10-28 13:27:31 +03:00
Joffrey JAFFEUX
9e19b22f64
DEV: prevents Firefox ESR tests to crash on ||= (#14758)
A follow up PR should investigate why `proposal-logical-assignment-operators` is not getting used here (test file?) but this should be enough to get things running.
2021-10-28 10:55:22 +02:00
David Taylor
9fa5077805 DEV: Remove unneeded qunit-helper override
This was leaking on every test... and also doesn't seem to be required. The `examineDockHeader` doesn't exist any more in core, so this was a no-op.
2021-10-27 18:34:04 +01:00
David Taylor
8bb911e038 DEV: Teardown appEvent listener in edit-notification-clicks-tracker 2021-10-27 18:34:04 +01:00
David Taylor
8af0674b68 DEV: teardown event listeners in click-interceptor 2021-10-27 18:34:04 +01:00
David Taylor
cc18a5439c DEV: Ensure core initializers with .reopen are only called once 2021-10-27 18:34:04 +01:00
David Taylor
0bec323204 DEV: Teardown leaky page:changed appEvents between tests 2021-10-27 18:34:04 +01:00
Penar Musaraj
d2ddb82022
UX: Remove animation in admin theme list (#14743) 2021-10-27 13:09:34 -04:00
Joffrey JAFFEUX
184ccf4490
DEV: nullify cachedCookFunction to prevent retains (#14737) 2021-10-27 16:29:36 +02:00
David Taylor
79ad0860a2
FIX: Cleanup PresenceChannel instances when composer closed (#14741)
I was previously relying on `this.isDestroying` returning `true` during `willDestroyElement`. This was an incorrect assumption.

This commit refactors the logic into an explicit `cleanup` function, and also adds some cleanup for empty keys in the `subscribedProxy` array
2021-10-27 15:17:10 +01:00
Kris
103de1f20d
UX: Change login tabindex, follow-up to 6aa6275 (#14734) 2021-10-27 09:15:49 -04:00
Joffrey JAFFEUX
4272eb7ffc
FIX: prevents a circular json error in tests (#14738)
The flow goes from:

- getting current user object
- creating a POJO using some of the current user keys
- passing this POJO around, which end up being used in message bus
- the processing fn associated ens up doing User.create on this object will both create a User object, but also inject store in it, store is holding a reference to currentUser Object and...

BOOM, we have an object holding a reference to the same object, which JSON.stringify used in prepareBody of pretender doesn't like.
2021-10-27 14:01:41 +01:00
Andrei Prigorshnev
7f79727090
DEV: rename refresh action to avoid regressions in the future (#14721) 2021-10-27 14:53:04 +04:00
Kris
6aa6275f3f
UX: change tabindex on login to skip email login link (#14732) 2021-10-26 20:46:53 -04:00
David Taylor
50f4f43825
DEV: Use double quotes for js-flags (#14693)
Single quotes seem to be raising parse errors in some CI situations. Switching to double quotes seems to fix the problem.
2021-10-27 11:09:30 +11:00
Jean
31aa071e54
UX: Apply tags during PM creation (#14731) 2021-10-26 16:46:02 -04:00
David Taylor
e073451eae
UX: Make PresenceChannel changes more responsive (#14733)
For very fast-paced things (e.g. replying... indicators), 5s resolution is not great. This commit improves the resolution to 1 update per second.
2021-10-26 21:15:20 +01:00
Robin Ward
d067ee1c5a UX: Never show back button if less than current position 2021-10-26 15:45:55 -04:00
Penar Musaraj
b3f642db65
UX: Don't show anchor icon on touch devices (#14724) 2021-10-26 13:43:20 -04:00