Commit Graph

22015 Commits

Author SHA1 Message Date
Kris d516a88b4c DEV: add tag name class to body of tag pages 2020-04-24 22:27:25 -04:00
Kris 67429335d5 Remove SASS spacing function 2020-04-24 19:32:02 -04:00
Kris 040b8c00a4 UX: replace closed topic icon with discourse-no-entry 2020-04-24 17:31:34 -04:00
Jeff Wong e638d43f0a
FEATURE: dismiss first notification on click anywhere (#9525)
FEATURE: dismiss first notification on click anywhere

Quicker jumpstart for those already familiar with the platform:

Allow dismissal of first notification mask from any click.
On the dismissal click, we also need to send a "yes I saw it" confirmation
by grabbing a batch of notifications. This prevents the dialog from appearing
again on refresh, or other browsers and ensures we only see it once.
2020-04-24 13:27:54 -07:00
Penar Musaraj 5a3350cd76 FIX: Do not override all title elements with page title
This is redudant too, setting document.title is sufficient.
2020-04-24 10:16:05 -04:00
Penar Musaraj b45142ef79
FIX: reenable draft check modal and fix focus on iOS for PMs 2020-04-24 09:35:19 -04:00
Joffrey JAFFEUX d83f39be73
DEV: replaces jquery scrollTop by vanilla js code (#9543) 2020-04-24 12:45:47 +02:00
David Taylor 0616826841
DEV: Add jquery-free `decorateCookedElement` function to plugin api (#9534)
This is a replacement for `decorateCooked` which will work without jquery.

A backwards compatibility layer is provided for existing plugins/themes which are currently using `decorateCooked`
2020-04-24 09:47:33 +01:00
David Taylor 8a112b7464
DEV: Automatically extend CSP when themes link to external scripts (#9531) 2020-04-24 09:47:01 +01:00
Joffrey JAFFEUX 90d6816d19
FIX: removes inheriting as it's too random and can be very hard to track (#9542) 2020-04-24 10:08:22 +02:00
Sam Saffron cbceadf48b
FEATURE: when blocking emails prefer blocking canonical
Previously we relied entirely on levenshtein_distance_spammer_emails site
setting to handle "similar looking" emails.

This commit improves the situation by always preferring to block (and check)
canonical emails.

This means that if:

`samevil+test@domain.com` is blocked the system will block `samevil@domain.com`

This means that `samevil+2@domain.com` (ad infinitum) will be blocked
2020-04-24 14:09:51 +10:00
Sam Saffron 6a18c9aa0b
Revert "FEATURE: enforce_canonical_emails site setting"
This reverts commit 6f9177e2ed.

We decided on a completely different approach to the problem.

Instead we will let blocked emails be treated as canonical.
2020-04-24 13:52:06 +10:00
Martin Brennan cd1c7d7560
FIX: Copying image markdown for secure media loading full image (#9488)
* When copying the markdown for an image between posts, we were not adding the srcset and data-small-image attributes which are done by calling optimize_image! in cooked post processor
* Refactored the code which was confusing in its current state (the consider_for_reuse method was super confusing) and fixed the issue
2020-04-24 10:29:02 +10:00
Blake Erickson bd3425b389 REFACTOR: Use rescue inside do/end block
Follow up to 9cbbaf4237
2020-04-23 16:26:29 -06:00
Kris 9f52997be1 UX: Let's try X for the closed topic icon instead of a \ 2020-04-23 17:23:25 -04:00
Joffrey JAFFEUX b19d50f355
FIX: site settings dropdown can be 440px width (#9539) 2020-04-23 23:12:58 +02:00
Joffrey JAFFEUX b871e79c5b
FIX: removes rounding correction as it can be in either direction (#9538) 2020-04-23 23:10:40 +02:00
Penar Musaraj 7cd006fe3a Revert "DEV: Draft check async when starting new PM"
This reverts commit e49212d0bc.

This requires some more work.
2020-04-23 15:51:54 -04:00
Blake Erickson 5b98161f2f
DEV: ember-cli refactor for TextField and TextArea imports (#9480)
In order to be able to use ember-cli we need to fix the import
statements for `TextField` and `TextArea` in the code base.

The only change I don't fully understand is the one in
`discourse-loader.js`, but adding the components to that file make it
all work.
2020-04-23 12:36:05 -06:00
Penar Musaraj e49212d0bc DEV: Draft check async when starting new PM
When the sequence is missng, the draft check is done synchronously and it results in  iOS devices not launching the keyboard.
2020-04-23 14:17:15 -04:00
Mark VanLandingham 3e543dfa18
FIX: Do not set title attribute on header-topic-info widget (#9533) 2020-04-23 12:44:20 -05:00
Joffrey JAFFEUX 82b43451b3
FIX: Inner content of a row could have no max-width and be very large (#9532) 2020-04-23 19:18:01 +02:00
Joffrey JAFFEUX be1b7f7468
FIX: fails gracefully if :scope is not handled by a browser (#9529) 2020-04-23 16:50:30 +02:00
Roman Rizzi 7a2e8d3ead
DEV: Add the missing `app` subdirectory (#9499)
* DEV: Add missing  directory to the Discourse ember app

* DEV: Resolve imports correctly
2020-04-23 10:07:54 -03:00
David Taylor 8e28ccb2ea
PERF: Refactor decorateCooked to run in a detached DOM (#9517)
This means that decorateCooked can be used to modify HTML without triggering the download of remote resources (e.g. images)

In some rare cases (e.g. IntersectionObservers in Chromium), decorating needs to happen in the real DOM. For this, pass `afterAdopt: true` to `decorateCooked`
2020-04-23 11:03:46 +01:00
Sam Saffron 8dccf0521c
Revert "PERF: stop firing superfluous onSelectionChange"
This reverts commit fa96054acf.

Sadly this fails a test case, we may have to hunt up all the
parentElements to check for the cooked class to perform the
bypass
2020-04-23 18:16:13 +10:00
Sam Saffron fa96054acf
PERF: stop firing superfluous onSelectionChange
onSelectionChanged fires a debounced event that calls window.getSelection()

window.getSelection() is reasonably expensive. There is no reason to do any
of this work if we have an input field focused, that is not how quote works
2020-04-23 17:51:23 +10:00
Joffrey JAFFEUX 7132c50f3b
FIX: prevents constant composer reloading (#9528) 2020-04-23 07:54:29 +02:00
Sam Saffron d69ec186b9
Revert "DEV: DiscourseEvents fired when users are added/removed from groups (#9522)"
This reverts commit 54ec9f7009.

The commit clashes with a previous implementation of the same event
2020-04-23 15:06:55 +10:00
Krzysztof Kotlarek 52c1d7337e
FEATURE: don't display new/unread notification for muted topics (#9482)
* FEATURE: don't display new/unread notification for muted topics

Currently, even if user mute topic, when a new reply to that topic arrives, the user will get "See 1 new or updated topic" message. After clicking on that link, nothing is visible (because the topic is muted)

To solve that problem, we will send background message to all users who recently muted that topic that update is coming and they can ignore the next message about that topic.
2020-04-23 14:57:35 +10:00
Mark VanLandingham 54ec9f7009
DEV: DiscourseEvents fired when users are added/removed from groups (#9522) 2020-04-23 14:53:31 +10:00
Joffrey JAFFEUX 3bbd8b1258
UX: rework date time input range (#9524) 2020-04-22 22:17:53 +02:00
Blake Erickson 9cbbaf4237 FIX: Don't throw 500 for invalid website url input
It's possible to cause a 500 error by putting in weird characters in the
input field for updating a users website on their profile.

Normal invalid input like not including the domain extension is already
handled by the user_profile model validation. This fix ensures a server
error doesn't occur for weird input characters.
2020-04-22 13:57:56 -06:00
Joffrey JAFFEUX 00f632fb0d
REFACTOR: s/translatedfilterPlaceholder/translatedFilterPlaceholder (#9521) 2020-04-22 20:39:55 +02:00
Joffrey JAFFEUX 4c248fc5c4
UX: do not attempt to full width sk on mobile (#9520) 2020-04-22 20:39:45 +02:00
Robin Ward e4a0e0bead FIX: Ignore removed column 2020-04-22 14:27:01 -04:00
Vinoth Kannan df0c386f8a
UX: drop the `automatic_membership_retroactive` column from groups model. (#9430) 2020-04-22 22:07:39 +05:30
Kris bf0c055a9a UX: add comment-plus icon for reopening topics 2020-04-22 12:29:27 -04:00
Krzysztof Kotlarek 81c216e04c
FIX: composer problem on the categories page (#9508) 2020-04-22 09:24:54 -07:00
Mark VanLandingham 04fb37c7a4
DEV: Export openNewCategoryModal from discovery-categories (#9501) 2020-04-22 11:03:28 -05:00
Eric Mueller 45f3517ef6
FEATURE: add class to <aside> quote block when quoting an ignored user (#9511)
* add class to <aside> quote block when quoted an ignored user

* Changed from single to double quotes
2020-04-22 12:00:44 -04:00
Robin Ward 13f2723dcb FIX: Don't log an error to logster if a topic could not be updated.
If for some reason an update did not go through (for example,
concurrently updating the same topic twice), we were logging something
like:

```
create_errors_json called with unrecognized type: #<Topic
```

This happened because we knew an error occurred but the active record
object had no errors attached.

This patch fixes the issue by attaching a proper error message in the
event that this happens.
2020-04-22 11:56:04 -04:00
Justin DiRose b7dea0d5c1
FIX: Copy button was displayed on quoted codeblock (#9514) 2020-04-22 15:57:25 +02:00
Vinoth Kannan e5c44f6dcf UX: display 'merge' button in all non-staff user profiles. 2020-04-22 17:42:09 +05:30
Daniel Waterworth c8fed90e4e FIX: Handle sub-sub-category paths without an id 2020-04-22 12:19:54 +01:00
Vinoth Kannan ceee855d00 minor code improvement
a511bea4cc
2020-04-22 16:40:59 +05:30
Joffrey JAFFEUX 5fb5807098
FIX: caret icon should inherit its color (#9513) 2020-04-22 13:10:02 +02:00
Joffrey JAFFEUX 4889dbde49
FIX: differentiate sk outline handling on single/multi (#9512) 2020-04-22 13:02:20 +02:00
Dan Ungureanu 4e5f9d4cd1
DEV: Drop 'key' column from user_api_keys (#9388) 2020-04-22 12:13:19 +03:00
Joffrey JAFFEUX 5c45363e67
UX: better outline support in sk components (#9510) 2020-04-22 10:54:02 +02:00