Commit Graph

26174 Commits

Author SHA1 Message Date
Kris c4e8ba3965
UX: post action spacing refactor & consistency (#15403) 2022-01-04 09:44:54 -05:00
Penar Musaraj be599513e3
FEATURE: use raster image and autofill in 2FA input (#15429)
- switches to a raster image QR code so it can be long-pressed (or right
clicked) and added to iCloud keychain
- adds `autocomplete="one-time-code"` to the 2FA input for better
discoverability
2022-01-04 15:31:46 +11:00
Martin Brennan ed83d7573e
FIX: Tone down admin dashboard critical problem messaging (#15442)
Keep the title the same as it used to be and only
show the exclamation icon on the critical problems in
the list.
2022-01-04 13:00:58 +10:00
Martin Brennan b22450c7a8
DEV: Drop old bookmark columns (#15405)
As per 22208836c5
these are no longer needed, a follow up commit will remove the ignored
columns.
2022-01-04 11:19:27 +10:00
Martin Brennan 20fe5eceb8
FEATURE: Scheduled group email credential problem check (#15396)
This commit adds a check that runs regularly as per
2d68e5d942 which tests the
credentials of groups with SMTP or IMAP enabled. If any issues
are found with those credentials a high priority problem is added to the
admin dashboard.

This commit also formats the admin dashboard differently if
there are high priority problems, bringing them to the top of
the list and highlighting them.

The problem will be cleared if the issue is fixed before the next
problem check, or if the group's settings are updated with a valid
credential.
2022-01-04 10:14:33 +10:00
Osama Sayegh 61bb0df3f6
FEATURE: Allow topic pin toggle when header is docked (#15438)
Meta topic: https://meta.discourse.org/t/cant-pin-unpin-topic-from-the-title/213444?u=osama.

I know there is an inconsistency between the category of the linked topic (#bug) and the title prefix of this PR, but I really couldn't find anything in the code base that suggested this ever worked before, so I'm categorizing this PR as a feature.
2022-01-03 15:21:06 +03:00
Arpit Jalan 702685b6a0
SECURITY: only show user suggestions with regular post (#15436) 2022-01-03 13:37:40 +05:30
David Taylor 7fdb2944b9
DEV: Allow `ember server --environment production` to be used (#15431)
Running in production mode is useful when doing performance-sensitive work.

- Set the `exportApplicationGlobal` flag, so we get the `Discourse` global in production mode. It defaults to only adding the global in development mode. Note that, when generating ember-cli assets via rails, we set this in `ApplicationHelper#discourse_config_environment`.

- Disable SRI - Ember CLI adds this to index.html when in production mode. We don't use SRI in production, so disable here to match.

- Refactor the `AssetRev` logic in `ember-cli-build.js`, so that our custom bundle hashes are find/replaced into index.html. Without this change, our custom bundles (e.g. `start-discourse.js`) remain without their hash in `index.html`, and do not function.

  I have confirmed that the only diff in the `/dist` out following this change is to the `index.html` file. All other filenames and contents remain identical.
2021-12-31 12:26:23 +00:00
Roman Rizzi 23b75d8a2b
FEATURE: Before consolidation callbacks. (#15428)
You can add callbacks that get called before updating an already consolidated notification or creating a consolidated one.

Instances of this rule can add callbacks to access the old notifications about to be destroyed or the consolidated one and add additional data inside the data hash versus having to execute extra queries when adding this logic inside the `set_mutations` block.
2021-12-30 15:40:16 -03:00
Joe 20de49c872 check for code-blocks before loading highlight-js 2021-12-30 12:44:22 -05:00
Joe c5c216563e remove deprecated jQuery workaround 2021-12-30 12:44:22 -05:00
Penar Musaraj 05eaedc810
DEV: revert linting workaround for emoji picker `keydown` action (#15424) 2021-12-30 12:39:21 -05:00
Jordan Vidrine bbca25e875
fix flair misalignment (#15425) 2021-12-29 14:58:10 -06:00
Penar Musaraj 879e35195a
DEV: Small refactor to header offset (#15421)
Centralizes calculations in a helper under the site header component.

This also reverts a small CSS change to the composer: since ac79c5ef,
the composer height was not including the grippie, which means that the
composer height was off by 11 pixels, and the topic progress widget was
sometimes being displayed cut off by 11 pixels.
2021-12-29 11:03:21 -05:00
Penar Musaraj 108c8302fb
FEATURE: Automatic admin editor dark mode (#15419) 2021-12-29 11:02:37 -05:00
Meghna f6db99b56a
UX: improved invite accept page layout (#15418) 2021-12-29 09:12:18 +05:30
Osama Sayegh 8e6988163f
FIX: Don't allow NULL values for `notification_level` in `category_users` (#15407) 2021-12-29 09:19:39 +11:00
Jordan Vidrine 91a816e788
DEV: Add `composer-open` class to body element when compsoer is open (#15420) 2021-12-28 15:25:53 -06:00
Penar Musaraj 312c417366
DEV: Minor topic timeline refactor (#15357) 2021-12-28 12:01:20 -05:00
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