Commit Graph

14615 Commits

Author SHA1 Message Date
Martin Brennan
1cdb5b7e4a
DEV: Add uppyReady hook to uppy mixins (#15361)
This should be overridden in a child component if you need to
hook into uppy events and be sure that everything is already
set up for _uppyInstance.
2021-12-20 11:00:20 +10:00
Martin Brennan
2d68e5d942
FEATURE: Scheduled problem checks for admin dashboard (#15327)
This commit introduces scheduled problem checks for the admin dashboard, which are long running or otherwise cumbersome problem checks that will be run every 10 minutes rather than every time the dashboard is loaded. If these scheduled checks add a problem, the problem will remain until it is cleared or until the scheduled job runs again.

An example of a check that should be scheduled is validating credentials against an external provider.

This commit also introduces the concept of a `priority` to the problems generated by `AdminDashboardData` and the scheduled checks. This is `low` by default, and can be set to `high`, but this commit does not change any part of the UI with this information, only adds a CSS class.

I will be making a follow up PR to check group SMTP credentials.
2021-12-20 09:59:11 +10:00
Penar Musaraj
cebf55f590
DEV: Remove jquery-tags-input dependency (#15344) 2021-12-17 14:53:52 -05:00
Penar Musaraj
178acd4d46
DEV: Remove jQuery color dependency (#15340) 2021-12-17 14:26:16 -05:00
Penar Musaraj
62d1114bad
DEV: Fix linting issue with emoji keydown event (#15352) 2021-12-17 12:29:52 -05:00
Penar Musaraj
4ee5d52ac9
DEV: Remove jQuery autoellipsis dependency (#15336) 2021-12-17 11:45:12 -05:00
Joffrey JAFFEUX
e71cd73965
UX: correctly handles escape on emoji picker (#15351) 2021-12-17 16:18:33 +01:00
Joffrey JAFFEUX
bec76f937c
DEV: drops jquery from scrolling-post-stream (#15313)
Note that this commit also introduces a `domUtils` helper to handle most complex operations in vanilla JS compared to using jQuery.
2021-12-17 14:52:42 +01:00
Gerhard Schlager
769388b8ba FIX: Translation overrides from fallback locale didn't work on client
Discourse sent only translation overrides for the current language to the client instead of sending overrides from fallback locales as well. This especially impacted en_GB -> en since most overrides would be done in English instead of English (UK).

This also adds lots of tests for previously untested code.

There's a small caveat: The client currently doesn't handle fallback locales for MessageFormat strings. That is why overrides for those strings always have a higher priority than regular translations. So, as an example, the lookup order for MessageFormat strings in German is:
1. override for de
2. override for en
3. value from de
4. value from en
2021-12-17 14:03:35 +01:00
Joffrey JAFFEUX
8e9799da72
Revert "DEV: supports actionClick for small actions (#15331)" (#15350)
This reverts commit 022dba4727.
2021-12-17 14:02:12 +01:00
Joffrey JAFFEUX
afdc01a8d8
DEV: allows to import decorateGithubOneboxBody (#15349) 2021-12-17 10:05:04 +01:00
Joffrey JAFFEUX
022dba4727
DEV: supports actionClick for small actions (#15331) 2021-12-17 09:55:54 +01:00
Joffrey JAFFEUX
cb976ac562
DEV: creates domFromString utility function (#15310) 2021-12-17 09:25:34 +01:00
Jarek Radosz
e6480bbb04
DEV: Remove iOS 9.3 polyfills (#15343)
We're on iOS 15.2 now. 🙂
2021-12-17 02:47:13 +01:00
Jarek Radosz
5eab90e0f8
FIX: Incorrect header offset calculation (#15341)
I somehow changed the sign before committing #15221 🤦
2021-12-17 09:46:31 +08:00
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