Commit Graph

37040 Commits

Author SHA1 Message Date
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 6df22638e1 FIX: Make sure new user narrative returns toggleBookmark promise
* the call to this.super() was not returned so there is no promise
  to chain .then() with, causing errors for bookmarks with reminders
2020-04-24 13:13:30 +10:00
dependabot-preview[bot] 8b0ac092d8 Build(deps-dev): Bump byebug from 11.1.2 to 11.1.3
Bumps [byebug](https://github.com/deivid-rodriguez/byebug) from 11.1.2 to 11.1.3.
- [Release notes](https://github.com/deivid-rodriguez/byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/byebug/compare/v11.1.2...v11.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-24 09:42:19 +08: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 585e7bcfe8 DEV: update specs followup to 67e96f6 2020-04-23 16:11:17 -04: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
Gerhard Schlager 67e96f6c54 DEV: discourse-backup-uploads-to-s3 plugin isn't supported anymore 2020-04-23 21:37:38 +02: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
Robin Ward e35286eda2 Ignore the `app` move 2020-04-23 13:43:48 -04: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
Gerhard Schlager 060eb06a4f
Replace Travis build status with Github Actions status 2020-04-23 18:34:25 +02:00
Arpit Jalan 39be639c37 FIX: update GitHub screen_name on login via GitHub 2020-04-23 20:54:26 +05:30
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
discoursehosting 094ddb1c1f
VBulletin5 importer improvements (#9477)
- no more hard coded contenttypes
- permalinks for topics, categories, subcategories
- better uploads handling
- tag support
2020-04-22 22:04:59 +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
Jarek Radosz 8adccaf98c
DEV: Use dynamic/static fabricator attrs correctly (#9519) 2020-04-22 20:49:53 +02: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
Robin Ward 80a572d3b7 FIX: Multisite spec was failing in parallel environment
We were not adding the test number to the path in all places.
2020-04-22 14:05:39 -04:00
Rafael dos Santos Silva b810fc282d FEATURE: Digital Ocean Spaces compatibility for Object Storage
DO does not implement tagging support for S3 objects. Removing our default
empty tag fixes compatibility.

The expire_missing_assets rake task can't be used with that service still,
but this patch allows normal operation.
2020-04-22 13:57:14 -03: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
Neil Lalonde 58bdc04aac
Version bump to v2.5.0.beta3 2020-04-22 10:51:19 -04:00
dependabot-preview[bot] 4d45602517
Build(deps): Bump mini_racer from 0.2.9 to 0.2.10 (#9507)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/discourse/mini_racer/releases)
- [Changelog](https://github.com/rubyjs/mini_racer/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_racer/compare/v0.2.9...v0.2.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-22 10:26:31 -04:00
dependabot-preview[bot] 32f3f1c14b
Build(deps-dev): Bump mock_redis from 0.22.0 to 0.23.0 (#9506)
Bumps [mock_redis](https://github.com/sds/mock_redis) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/sds/mock_redis/releases)
- [Changelog](https://github.com/sds/mock_redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sds/mock_redis/compare/v0.22.0...v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-22 10:26:09 -04:00