Commit Graph

26155 Commits

Author SHA1 Message Date
Joe e09742aa69
FIX: improve the way magnific popup is loaded (#15348) 2021-12-28 11:48:03 -05:00
Arpit Jalan b75cbec4b6
FEATURE: allow sending message via a link to multiple users (#15412)
https://meta.discourse.org/t/possible-to-compose-pre-filled-multi-user-private-message-via-url/78020
2021-12-28 06:35:22 +05:30
Roman Rizzi e005e3f153
DEV: Create post actions without creating a notification and store custom data. (#15397)
I plan to use this in an upcoming discourse-reactions PR, where I want to like a post without notifying the user, so I can instead create a reaction notification.

Additionally, we decouple the a11y attributes from the icon itself, which will let us extend the widget's icon without losing them.
2021-12-27 11:25:37 -03:00
Jarek Radosz 0b34d5ac6c
UX: Maximize the preview space in composer (#15188)
A follow-up to #15117 and #15141. Applies the previous changes to PM-specific fields, makes the preview area take the all the available height of the composer, and unifies more spacing between composer elements.
2021-12-24 12:38:33 +01:00
Roman Rizzi 1ad47030fe
REFACTOR: Use a consolidation rule for collapsing likes. (#15393)
This PR moves the behavior from the PostAlerter. We delete an existing liked notification and set the `username2` attribute to the previous `display_username`. We repeat this process unless the last one is old enough or it's not in the most recent ones.
2021-12-23 09:44:03 -03:00
Rafael dos Santos Silva 435562cc70
FIX: Uploads were broken in old Safari (#15391)
Blob.prototype.arrayBuffer is Safari 14 onwards, so we can check to see if this exists and just skip the checksumming if not.
2021-12-23 08:16:51 +10:00
Bianca Nenciu abb57c350d
FIX: Save draftSequence when it is 0 (#15394)
The first draftSequence value is 0 and that was not recognized as a
valid value by the client.
2021-12-22 22:01:28 +02:00
Bianca Nenciu 28400f1cbe
FIX: Predict draftSequence on draft save (#15390)
The new draft sequence is returned after the draft is saved and usually
it is the old draft sequence plus one and this way the new draft
sequence can be predicted.

Sometimes drafts are saved at odd times or the request is slower than
usual which can create a race condition. This prediction can fix this
problem.
2021-12-22 17:17:32 +02:00
Joffrey JAFFEUX b0dd1b1200
DEV: correctly notify property changes of emoji store (#15389) 2021-12-22 10:59:41 +01:00
Martin Brennan 667a8a63b3
DEV: Drop jQuery file uploader and old upload components (#15376)
This commit removes jQuery file uploader from Discourse,
completing the transition to Uppy. The image-uploader
and UploadMixin components are also removed in this commit
as they have already been replaced and are the only things
using jQuery file upload.

            .-'~~~`-.
          .'         `.
          |  R  I  P  |
          |   jquery  |
          |    file   |
          |   upload  |
          |           |
        \\| 2013-2021 |//
        -----------------
2021-12-22 08:59:44 +10:00
Jarek Radosz 72ad5bf8bd
FIX: SiteSetting.title was being polluted in StaticController (#15385)
Regressed in #15324
2021-12-21 20:51:18 +01:00
Joffrey JAFFEUX 96982ca2bc
FIX: gives composer options to post:highlight trigger (#15384)
This change allows to prevent page jump, when jump is prevented, due to highlightPost causing a `focus()`.
2021-12-21 19:53:07 +01:00
Osama Sayegh 0192efb37b
FIX: Remove length constraint of `fancy_title` in `topics` (#15381)
The `fancy_title` column in the `topics` table currently has a constraint that limits the column to 400 characters. We need to remove that constraint because it causes some automatic topics/PMs from the system to fail when using Discourse in locales that need more than 400 characters to the translate the content of those automatic messages.

Internal ticket: t58030.
2021-12-21 21:24:23 +03:00
Mark VanLandingham 5a0e878a8a
DEV: Add callback when search is empties in choose-topic (#15380) 2021-12-21 11:58:39 -06:00
Andrei Prigorshnev f97c8ff0a6
DEV: add a container to the empty-state layout to simplify styling in themes (#15264) 2021-12-21 21:37:29 +04:00
Andrei Prigorshnev c202252190
FEATURE: when suggesting usernames skip input that consist entirely of disallowed characters (#15368) 2021-12-21 21:13:05 +04:00
Andrei Prigorshnev 952bebc5a1
FIX: fallback to `anonymous` not `user` when suggesting usernames for anonymous users (#15354) 2021-12-21 21:09:55 +04:00
Mark VanLandingham 852dc85504
DEV: Add div around choose-topic results (#15379) 2021-12-21 08:54:40 -06:00
Martin Brennan 3ca1b17589
DEV: Change images-uploader to use Uppy (#15375)
Missed this one, it is only used for the selectable_avatars
site setting.
2021-12-21 15:53:44 +10:00
Martin Brennan d330a5447d
DEV: Remove old backup uploader and resumable.js (#15365)
Now that d5e380e5c1 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
Martin Brennan 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 f70e6c302f
2021-12-21 09:00:19 +10:00
Kris 07436e9d8c
UX: update navigation-container scaling & wrapping (#15372) 2021-12-20 17:08:03 -05:00
Penar Musaraj 973c9bdcd3
FIX: Menu panel position adjustment (#15358) 2021-12-20 10:25:37 -05:00
Joffrey JAFFEUX 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
Martin Brennan 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
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
Gerhard Schlager 4cd5158974 FIX: "Customize Text" showed compiled MessageFormat string for overridden `_MF` translations 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
Andrei Prigorshnev 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
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
Jarek Radosz 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