Commit Graph

26236 Commits

Author SHA1 Message Date
d330a5447d DEV: Remove old backup uploader and resumable.js (#15365)
Now that d5e380e5c14ac1d24f1f5f32d082fdbfbd1a15db has been
committed there is nothing in the codebase that uses either
resumable.js or the old backup-uploader component.

R.I.P resumable.js
2021-12-21 15:02:10 +10:00
995c514336 DEV: Handle CORS and other fetch failures for media-optimization-worker (#15364)
Occasionally there will be a misconfigured CORS rule or a different
network failure when loading one of the media optimization WASM scripts.
This commit handles load failures and sends a new installFailed message
from the service worker, so that we don't error and hold up the rest
of the uploads if this occurs; the worker will just not process anything
and will keep trying to install itself with subsequent uploads until it succeeds.

This commit also removes the redundant useUppy variable in the worker
this should have been removed a while ago in f70e6c302fddd38595a1fc90e24964a2cb0716bb
2021-12-21 09:00:19 +10:00
07436e9d8c UX: update navigation-container scaling & wrapping (#15372) 2021-12-20 17:08:03 -05:00
973c9bdcd3 FIX: Menu panel position adjustment (#15358) 2021-12-20 10:25:37 -05:00
40d1bbab5d DEV: implements actionDecriptionWidget (#15367)
This will allow to have more complex behaviors in post-small-actions, while keeping most of the behavior consistent.
2021-12-20 14:53:43 +01:00
d5e380e5c1 DEV: Promote uppy backup uploader to primary uploader (#15363)
This commit removes the enable_experimental_backup_uploader site
setting and the flags in backups-index.hbs to make the uppy
backup uploader the main one from now on.

A follow-up commit will delete the old backup uploader code and
also remove resumable.js from the project.
2021-12-20 13:39:35 +10:00
Sam
b6c3e9aa03 FEATURE: hide_email_address_taken forces use of email in forgot password form (#15362)
* FEATURE: hide_email_address_taken forces use of email in forgot password form

This strengthens this site setting which is meant to be used to harden sites
that are experiencing abuse on forgot password routes.

Previously we would only deny letting people know if forgot password worked on not
New change also bans usage of username for forgot password when enabled
2021-12-20 12:54:10 +11:00
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
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
cebf55f590 DEV: Remove jquery-tags-input dependency (#15344) 2021-12-17 14:53:52 -05:00
178acd4d46 DEV: Remove jQuery color dependency (#15340) 2021-12-17 14:26:16 -05:00
62d1114bad DEV: Fix linting issue with emoji keydown event (#15352) 2021-12-17 12:29:52 -05:00
4ee5d52ac9 DEV: Remove jQuery autoellipsis dependency (#15336) 2021-12-17 11:45:12 -05:00
e71cd73965 UX: correctly handles escape on emoji picker (#15351) 2021-12-17 16:18:33 +01:00
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
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
4cd5158974 FIX: "Customize Text" showed compiled MessageFormat string for overridden _MF translations 2021-12-17 14:03:35 +01:00
8e9799da72 Revert "DEV: supports actionClick for small actions (#15331)" (#15350)
This reverts commit 022dba4727ebd030c7f3d0d24206d4828dfc672a.
2021-12-17 14:02:12 +01:00
afdc01a8d8 DEV: allows to import decorateGithubOneboxBody (#15349) 2021-12-17 10:05:04 +01:00
022dba4727 DEV: supports actionClick for small actions (#15331) 2021-12-17 09:55:54 +01:00
cb976ac562 DEV: creates domFromString utility function (#15310) 2021-12-17 09:25:34 +01:00
e6480bbb04 DEV: Remove iOS 9.3 polyfills (#15343)
We're on iOS 15.2 now. 🙂
2021-12-17 02:47:13 +01:00
5eab90e0f8 FIX: Incorrect header offset calculation (#15341)
I somehow changed the sign before committing #15221 🤦
2021-12-17 09:46:31 +08:00
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
60851037d8 DEV: Remove unused composer editor preview sync (#15322) 2021-12-16 17:18:54 -05:00
d9c511f734 DEV: Refactor animation for invalid inputs in wizard (#15334) 2021-12-16 17:17:36 -05:00
92bff4df93 FIX: Add smooth scrolling polyfill (#15333) 2021-12-16 14:07:52 -05:00
48b7696dbc DEV: Remove jQuery animate calls (#15321)
Affects j/k navigation and PM interaction with @discobot.
2021-12-16 11:00:09 -05:00
9365c4b364 DEV: make sure we handle staged users correctly in DiscourseConnect (#15320)
Some time ago, we made this fix to external authentication –  https://github.com/discourse/discourse/pull/13706. We didn't address Discourse Connect (https://meta.discourse.org/t/discourseconnect-official-single-sign-on-for-discourse-sso/13045) at that moment, so I wanted to fix it for Discourse Connect as well.

Turned out though that Discourse Connect doesn't contain this problem and already handles staged users correctly. This PR adds tests that confirm it. Also, I've extracted two functions in Discourse Connect implementation along the way and decided to merge this refactoring too (the refactoring is supported with tests).
2021-12-16 19:44:07 +04:00
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
2a4df93b8e FEATURE: Allow to modify topic-backed static pages (#15324)
A plugin API that allows customizing existing topic-backed static pages, like:
faq, tos, privacy (see: StaticController) The block passed to this
method has to return a SiteSetting name that contains a topic id.

```
add_topic_static_page("faq") do |controller|
  current_user&.locale == "pl" ? "polish_faq_topic_id" : "faq_topic_id"
end
```

You can also add new pages in a plugin, but remember to add a route,
for example:

```
get "contact" => "static#show", id: "contact"
```
2021-12-16 04:24:11 +01:00
ad4faf637c UX: Always show avatar on mobile topic lists (#15323) 2021-12-15 20:31:03 -05:00
1c9a0fe18e UX: let mobile post controls scroll on overflow (#15305) 2021-12-15 15:36:10 -05:00
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
9fd92f329e DEV: remove showHtml jQuery plugin (#15316) 2021-12-15 13:13:06 -05:00
6120dde65c DEV: Cleanup for attributes in category edit screens (#15284) 2021-12-15 12:37:11 -05:00
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
6afab87d50 DEV: migrate more routes away from the old actions: pattern (#15275) 2021-12-15 18:06:10 +04:00
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
0719531bd3 FIX: Notify group members when someone quotes or replies to their post. (#15295)
When a member set a group PM notification level to Normal, we didn't notify group members if someone quoted or replied to one of their posts.
2021-12-15 09:07:39 -03:00
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
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
77781f9a11 FEATURE: Extend plugin API to add multiple poster icons (#15311) 2021-12-15 18:09:26 +08:00
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
4519f3f137 FIX: Add more actions to the uploads API key scope (#15306)
The uploads API key create scope did not cover the
external upload API endpoints, or the direct S3
multipart endpoints, and this commit adds them.

cf. https://meta.discourse.org/t/upload-create-api-key-insufficient/211896
2021-12-15 14:08:11 +10:00
Sam
15752da957 Revert "A11Y: Focus last viewed topic in topic lists (#15300)" (#15304)
This reverts commit 76aeee6735ea06302dd9c09cf2bd2ce0e01e827e.

Sadly this breaks on non-screen readers on Chrome and Safari
2021-12-15 12:33:33 +11:00
76aeee6735 A11Y: Focus last viewed topic in topic lists (#15300) 2021-12-15 10:02:31 +11:00
091ca9dbb1 UX: prevent timeline overflow in extreme cases (#15303) 2021-12-15 10:02:02 +11:00
dba16391ad DEV: cleanup for attributes in search filters (#15283) 2021-12-14 14:47:03 -05:00