Commit Graph

23283 Commits

Author SHA1 Message Date
5f7839f0a4 FIX: Allow safari to load and autoplay videos in posts
This improves the reloading workaround in a few ways:
  - Multiple videos in posts are now reloaded. Previously only the first was reloaded.
  - An empty `poster` string is treated the same as a missing attribute
  - If the video is set to autoplay, it will be reloaded (and therefore autoplayed correctly)
2020-08-17 23:48:36 +01:00
e2e51ee348 FIX: Refactor broke wizard 2020-08-17 16:34:12 -04:00
2567bb4a67 DEV: Facilitate replacing category lock icon in components 2020-08-17 16:09:17 -04:00
1a2156a0c2 REFACTOR: Remove Discourse.BaseUrl global 2020-08-17 16:08:40 -04:00
441ac21053 FIX: Broken when iconList missing 2020-08-17 15:49:32 -04:00
5b2c306bb8 REFACTOR: Remove Discourse.HighlightJSPath from globals
Instead we use the session, and pass that along where necessary.
2020-08-17 15:45:44 -04:00
3745f2bb86 FEATURE: Dark mode alternative logos (#10441) 2020-08-17 15:43:20 -04:00
386a9d26ec REFACTOR: Remove Discourse.SvgIconList and Discourse.SvgSpritePath
We use the session instead. This patch also removes some jQuery usage in
favor of regular HTML apis
2020-08-17 15:28:22 -04:00
65649eaef0 User card settings (#10302)
* settings implemented

* prettier

* settings updated

* rubocop

* prettier

* Revert "rubocop"

This reverts commit 7805145a7dc1dbccd9a4378bec3626a81ebaa659.

* Revert "prettier"

This reverts commit 2c53f4fa127a00ee9b3c3ab5b1182036089c286b.

* settings updated and changed

* rubocop

* changes applied

* final changes done

* Server side feature added

* spec changed

* changed user_updater and profile file

* Fix user card specs

* web hook serializer solved

* site-setting changed

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-08-17 12:37:45 -04:00
f2588e1c85 FIX: Clicking on category autocomplete row (#10457) 2020-08-17 11:02:00 -05:00
6d0eb7178d FIX: prevents errors on /tags when a tag constructor exists (#10449)
This is due to js objects having a constructor property:

```
const obj = {};
obj['constructor'] // return [native code] and not undefined
```
2020-08-17 17:40:34 +02:00
c164e9bbe0 DEV: Add computed property to Create Account modal (#10455)
Carry over the regime used in the Login modal to Create Account to
facilitate overriding of the classes set for the d-modal Component
using a new Computed Property having the same naming convention.
2020-08-17 12:31:41 +01:00
872ef82f4d Revert "PERF: Prefer joins over subquery for User#private_posts_for_user."
This reverts commit 05b43e5ae45fed10742de0829e579880098adcf7.
2020-08-17 14:58:47 +08:00
05b43e5ae4 PERF: Prefer joins over subquery for User#private_posts_for_user.
The subquery here prevents the planner from optimizing the query. As
such, we prefer joining against the requried tables instead.
2020-08-17 14:47:48 +08:00
630ec7b49c Enable hamburger menu scrolling on mobile, follow-up to 1972364 2020-08-15 20:31:22 -04:00
58ee947b35 FIX: Mobile group add dropdown was broken
It looks like we removed the bulk add modal but didn't update the mobile
template.
2020-08-14 21:03:41 -04:00
51a6e96b7f FIX: defer topic was broken 2020-08-14 17:25:37 -04:00
afa9a61080 REFACTOR: These Discourse constants do not seem required in vendor 2020-08-14 13:42:15 -04:00
41fd7a8b72 REFACTOR: Add themeSettings to the helperContext to avoid a global 2020-08-14 13:34:21 -04:00
8ac85f54fb DEV: Remove blob: workers from CSP (#10440)
Ace editor is reconfigured to load workers directly from their JS URL. Workers must be on the same origin as the site, so they will not use the CDN.
2020-08-14 18:15:30 +01:00
f52927cd33 REFACTOR: Migrate screenTrack to a service 2020-08-14 13:14:17 -04:00
86aa5d5e48 FIX: application controller is not used by the card 2020-08-14 12:49:53 -04:00
99764d8108 REFACTOR: Don't use container in Scrolling mixin 2020-08-14 12:49:53 -04:00
37c6fef535 REFACTOR: Remove dead code (property was typo'd, no longer used) 2020-08-14 12:49:53 -04:00
01e213c930 REFACTOR: Clean up router usage and private APIs 2020-08-14 12:49:53 -04:00
6a9bde3bf4 REFACTOR: Remove router:main and getOwner 2020-08-14 12:49:53 -04:00
cf466f7b84 REFACTOR: Simplify willTransition 2020-08-14 12:49:53 -04:00
7cc5c5bb31 FIX: DEV: Introduce @bind decorator (#10439)
Fixes a bug in `controllers/insert-hyperlink` where `addEventListener` was called with different (anonymous) functions than the matching `removeEventListener` calls.
2020-08-14 17:13:20 +02:00
8b811533b1 DEV: Improve readability of setting weights in SearchIndexer. 2020-08-14 23:11:41 +08:00
a3e2152265 DEV: Add ember-buffered-proxy import shim (#10438)
Just a bit of 🧹
2020-08-14 17:07:17 +02:00
476d26159a FEATURE: add new user option skip_new_user_tips. (#10437)
And add new site setting `default_other_skip_new_user_tips` in user preferences category.
2020-08-14 19:10:56 +05:30
6287c8e171 FIX: A paste event listener was re-added instead of being removed
cc: @eviltrout 😉
2020-08-14 15:21:27 +02:00
3cf93e9a8f Revert "DEV: Disable ACE editor worker blobs"
This reverts commit d5463d2a4d7999c5157e1f2db0b10f67120e660c.

With S3 assets, CORS prevents loading worker assets directly.
2020-08-14 14:12:11 +01:00
d5463d2a4d DEV: Disable ACE editor worker blobs
This will allow us to remove `blob:` URLs from the worker-src CSP directive
2020-08-14 12:01:46 +01:00
be6a73f654 DEV: Fix package.json issues and reroll yarn.lock 2020-08-14 12:00:35 +02:00
5819c4cb3b PERF: Switch to ActiveRecord's upsert in SearchIndexer.
On insertion, it uses a single query instead of 2.
2020-08-14 16:15:14 +08:00
4670b62969 DEV: IMAP log to database (#10435)
Convert all IMAP logging to write to a database table for easier inspection. These logs are cleaned up daily if they are > 5 days old.

Logs can easily be watched in dev by setting DISCOURSE_DEV_LOG_LEVEL=\"debug\" and running tail -f development.log | grep IMAP
2020-08-14 12:01:31 +10:00
c2f3c0dc44 FIX: generate_topic_thumbnails job infinitely running for corrupted images
It's possible that the original topic image is broken in some form, so
we shouldn't try and generate a topic thumbnail for it. The fix will
prevent the generate_topic_thumbnails job being enqueued every time the
topic is viewed.
2020-08-13 17:08:32 -06:00
d65a839577 FEATURE: allow group membership to unmute categories and tags
For sites that are configured to mute some or all categories and tags
for users by default, groups can now be configured to set members'
notification level to normal from the group manage UI.
2020-08-13 17:20:53 -04:00
18fb34bf2e formatting follow-up to 32102dd 2020-08-13 17:01:22 -04:00
32102ddff3 UX: Use the same formatting for both user and group card bios 2020-08-13 16:55:30 -04:00
b9891e3def FIX: Update preview when autocomplete is clicked (#10430) 2020-08-13 15:42:38 -05:00
d0d651d8bc FIX: Prevent LockOn conflicts (#10422)
If there's already a `LockOn` instance, clear its lock before creating creating a new one. Fixes a shaky viewport effect after certain transitions.

Includes:
* Slight refactor (elementId wasn't an id, but a selector - it included the "#" prefix)
* Add support for a[name=X] anchors in `jumpToPost`
* Scope down anchors to the #main element (Embeded fontawesome sprites are causing conflicts, e.g. when given `bed` anchor, `<a name="bed">` was at odds with `<symbol id="bed" viewBox="0 0 640 512">(…)</symbol>`)
2020-08-13 19:39:40 +02:00
ba3ee3444e FIX: Move queryParams to each discovery controller rather than shared (#10424)
* REFACTOR: `refreshSort` doesn't cause it to sort again, it's misleading

* FIX: Move queryParams to each discovery controller rather than shared

This fixes issues where params previously would not reset between
routes. For example if you added `max_posts=1` to /latest and then went
to a category.

* Add backward compatibility for (action "changeSort") for themes

* FIX: refreshing was not working

* Update app/assets/javascripts/discourse/app/controllers/discovery/topics.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2020-08-13 11:33:46 -04:00
ab5df7b2bd FIX: Preserve anchors in permalink transitions (#10421)
When visiting a permalink with an anchor (e.g. /important-link#notes) the anchor part was being dropped during redirection.

The change doesn't have a test. Functions like scrollToPost or scrollToElement don't have any effect in the test environment.
2020-08-13 16:44:34 +02:00
7a8442435c REFACTOR: LockOn class (#10428)
Mostly de-jQuery-ification. This refactor tries to closely preserve the original behavior.

Changes:
* Store the interval inside the class (allows using `clearLock()` on `LockOn` objects)
* Extract the interval function to a separate method
* Math.max result is never undefined (per MDN: "[Return value] The largest of the given numbers. If at least one of the arguments cannot be converted to a number, NaN is returned.")
* Replace jQuery's `offset()`
* Private methods be private
* Native `scrollTop` (jQuery's just a wrapper for this)
* `addEventListener`/`removeEventListener`
2020-08-13 16:43:05 +02:00
2008ecd68e DEV: Remove incorrect comment in tag/show controller (#10423) 2020-08-13 09:19:09 -05:00
7194b31443 FEATURE: don't notify about changed tags for a private message (#10408)
* FEATURE: don't notify about changed tags for a private message

Only staff members observing specific tag should receive a notification

* FIX: remove other category which is not used

* FIX: improved specs to ensure that revise was succesful
2020-08-13 17:22:34 +10:00
310952fd6a FIX: generate topic excerpt when moving posts to new topic.
Currently, it's not generating the excerpt by default. We have to trigger the "Rebuild HTML" action to do it.
2020-08-13 11:30:14 +05:30
ef461ffd60 FIX: Make sure user preference to open external links in new tab works for bookmark list excerpts (#10409)
Meta post: https://meta.discourse.org/t/bookmark-page-does-not-respect-open-all-external-links-in-new-tab-user-preference/160118
2020-08-13 14:56:13 +10:00