Commit Graph

34938 Commits

Author SHA1 Message Date
Robin Ward
356e2a4b4a FIX: Linting 2019-10-29 13:31:44 -04:00
Robin Ward
230541c975 REFACTOR: Use Ember modules for @ember/service 2019-10-29 13:29:08 -04:00
Robin Ward
a99c705c21 REFACTOR: Replace Ember.controller.inject with import
Puts it more in line with updated ember code
2019-10-29 13:17:38 -04:00
Mark VanLandingham
0a499966e9
DEV: Refactor setting component save callback (#8261)
* DEV: Refactor setting component save callback

* refactor site-setting component around new callback

* add callback to theme-translation component

* remove the save callback altogether
2019-10-29 12:01:45 -05:00
Daniel Waterworth
29e41dc511 Revert "DEV: Mark flaky tests as pending"
This reverts commit 0c47529713.
2019-10-29 13:32:42 +00:00
Daniel Waterworth
2e979a4681 DEV: Passing the list options to page_params is unnecessary
They are always merged with the result before being used.
2019-10-29 12:03:24 +00:00
Krzysztof Kotlarek
c5bcad10a6
FIX: more flaky jobs_base_spec.rb (#8259)
This commit is follow up of 417be323a2

We need more steps to properly switch from multi-site to single-site
2019-10-29 21:32:43 +11:00
Bianca Nenciu
1531644288
DEV: Add test (#8250)
Follow-up to 2863e7c181.
2019-10-29 12:12:09 +02:00
Bianca Nenciu
ff9345fbb0
DEV: simplify logic (#8249)
Anonymous users are only possible if allow_anonymous_posting is true,
which means that 'user.is_anonymous' check implies that
allow_anonymous_posting is true.
2019-10-29 12:10:27 +02:00
Daniel Waterworth
0c47529713 DEV: Mark flaky tests as pending 2019-10-29 10:00:00 +00:00
Daniel Waterworth
2989276c06 DEV: url_for on a String returns the string unchanged
...which makes it quite unnecessary.
2019-10-29 08:56:46 +00:00
Krzysztof Kotlarek
417be323a2 FIX: flaky jobs_base_spec.rb (#8258)
I was searching for a reason for randomly failing jobs_base_spec.rb. The reason was that after restorer_spec, the database is not restored to default.
After restorer spec RailsMultisite::ConnectionManagement.all_dbs is returning array of ['default', 'second']

Then base job execution is evaluated twice
```
dbs = RailsMultisite::ConnectionManagement.all_dbs
dbs.each do |db|
     execute(opts)
end
```
2019-10-29 18:25:00 +11:00
Sam Saffron
492742837e PERF: stop destroying drafts on client when posting replies
The server already ensures it advances draft keys when a post is created
this means this code that used to delete drafts is simply introducing
composer delays with no benefit.
2019-10-29 17:07:33 +11:00
Sam Saffron
b92e4465f7 DEV: stop depending on hover for image resize icons
We no longer defer render the resize links, so we no longer need all these
hover events to test it.

Corrects broken test.
2019-10-29 16:01:15 +11:00
Sam Saffron
001c593155 FIX: place image scale buttons unconditionally
Defer placing scale buttons causes "scale image" buttons to be missing if
you manage to scroll mouse to the area where the image is prior to image
rendering.

This fix ensures scale buttons are always rendered leaving all the hiding
and styling entirely to CSS.

This also corrects a bug where scaling toolbar was missing on mobile
2019-10-29 15:52:17 +11:00
Jeff Atwood
6d381b33a4 copyedits on moderator welcome PM 2019-10-28 17:19:42 -07:00
Neil Lalonde
f686ab988f FIX: close modals on ESC key and clicking outside 2019-10-28 17:23:30 -04:00
Jeff Wong
64d51ab45e DEV: add UNICORN_BIND_ALL
listen on local interface by default.
2019-10-28 14:11:19 -07:00
Neil Lalonde
4935c9f1f8 DEV: replace inline RTL attributes with classes in digest.html.erb 2019-10-28 16:36:55 -04:00
romanrizzi
197ad8cd6e DEV: Run a faster test when warming up 2019-10-28 17:19:55 -03:00
Kris
bacc114462 UX: Convert alert & modal close to buttons for improved accessibility 2019-10-28 16:04:29 -04:00
Oliver Walker
3b72a36c5d create plugin outlet and pass model to above-review-filters (#8257) 2019-10-28 15:44:13 -04:00
David Taylor
071a82efe3 FIX: Correct error when sending PM to email address 2019-10-28 18:32:43 +00:00
Daniel Waterworth
918bb76f76 DEV: No need to look up a category repeatedly by its slug 2019-10-28 18:30:40 +00:00
Simon Cossar
79c2138955
Fix github oneboxes for RTL locales (#8245) 2019-10-28 11:09:42 -07:00
Mark VanLandingham
4eb54f08b2
FEATURE: Site setting/UI to allow users to set their primary group (#8244)
* FEATURE: Site setting/ui to allow users to set their primary group

* prettier and remove logic from account template

* added 1 to 43 to make web_hook_user_serializer_spec pass
2019-10-28 12:46:27 -05:00
Daniel Waterworth
0e1c5c6bba FIX: Prefer Category.find_by_slug over Category.find_by(slug: ...)
It handles encoded slugs properly and ignores subcategories.
2019-10-28 17:05:21 +00:00
Leo McArdle
e7ff6809a3 FEATURE: add SES spam header to recognised spam headers (#8254) 2019-10-28 12:46:53 -04:00
Jarek Radosz
5776251cdd
DEV: Remove an obsolete "preferences/about-me" route (#8251)
User's title and bio can be changed on the "preferences/account" page.
2019-10-28 17:29:14 +01:00
Daniel Waterworth
790e1b7191 FIX: TopicQuery category lookup by slug
If we are searching for categories by their slugs, it doesn't make sense
to include subcategories since a slug, by itself, does not necessarily
uniquely identify a subcategory.

Similarly, the empty string as a slug is not a good category identifier.
2019-10-28 15:29:26 +00:00
Mark VanLandingham
437edfc415
FEATURE: Welcome moderator message - add copy! (#8246) 2019-10-28 08:58:45 -05:00
David Taylor
6de49b88df FIX: Respond to user search correctly when category_id is blank
Previously it would search for category_id=0, which does not exist. With the new permission checks, this returns a 404
2019-10-28 13:18:47 +00:00
David Taylor
f0617f96ed DEV: Update users controller spec following user_search update 2019-10-28 12:32:56 +00:00
David Taylor
eec464d8d1 SECURITY: Check permissions when autocompleting mentions 2019-10-28 11:01:47 +00:00
Joffrey JAFFEUX
88df84bf2b
FIX: theme component setting was not getting updated in the UI (#8247) 2019-10-28 10:33:31 +01:00
Sam Saffron
af841fa883 DEV: update rack-mini-profiler
This includes an important new feature, we pre-compile templates so CSPs
that disable eval can still apply to our sites.
2019-10-28 16:46:13 +11:00
Sam Saffron
3d85cc1e69 PERF: run expensive clean up uploads less frequently
Previously every hour we would run a full scan of the entire DB searching
for expired uploads that need to be moved to the tombstone folder.

This commit amends it so we only run the job 2 times per clean_orpha_uploads_grace_period_hours

There is a upper bound of 7 days so even if the grace period is set really
high it will still run at least once a week.

By default we have a 48 grace period so this amends it to run this cleanup
daily instead of hourly. This eliminates 23 times we run this ultra expensive
query.
2019-10-28 11:14:52 +11:00
Dan Ungureanu
8ca5aad1e2
FIX: Reload plugin translations in development (#8243)
The default locale is :en_US, which is just a thin layer over :en. In
other words, :en_US has the :en locale as a fallback. When "en.yml" is
edited, only the :en locale is refreshed and :en_US becomes stale.

This commit ensures that there is a dependency on the fallback locales
too.
2019-10-26 12:55:54 +03:00
Neil Lalonde
4c2d6e19ba PERF: cache new users counts in summary emails
The query to count how many new users there are since a given date
is expensive. It's the least personalized stat and the one we fallback
to last when no better number can be found for the target user.
Give up accuracy so we can aggressively cache the user counts
that appear in this email.
2019-10-25 16:33:36 -04:00
romanrizzi
d76d0e75ec DEV: Move warmup inside docker rake task 2019-10-25 16:31:05 -03:00
romanrizzi
4f452f0205 DEV: Add variable to warmup tmp folder and obtain accurate results when profiling specs 2019-10-25 10:52:23 -03:00
Roman Rizzi
070a3dcf9b
FIX: When running the wizard and using a custom theme, fallback to the color_scheme name if the base_scheme_id is nil (#8236) 2019-10-25 09:29:51 -03:00
Sam Saffron
5ae35f9906 FIX: allow storage of non unique rows in oauth2_user_infos
Certain DBs have duplicates already, if we want to ensure uniqueness here
we need to decide first how to clean up existing data and confirm all the
plugins expect this.
2019-10-25 11:57:34 +11:00
Sam Saffron
c9714fcbf8 FIX: update rack-mini-profiler
1.1.0 had regressions where rack mini profiler would break the site for IE11
users cause the payload had errors.

1.1.2 fixes that.
2019-10-25 11:17:44 +11:00
Krzysztof Kotlarek
ae108b363f
FIX: Hide muted subcategories (#8239)
That bug was mentioned in [meta](https://meta.discourse.org/t/muting-categories-hides-them-muting-subcategories-should-too/131316)

Problem is that subcategories are always visible in `/categories` path even if muted.

Categories/subcategories are loaded in at least two places
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/models/site.js.es6#L146
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L46

I discussed that with @jjaffeux and we thought that maybe it would be a good idea to filter that on frontend level
2019-10-25 10:08:13 +11:00
Robin Ward
7b04bb7290 Add event for when a post is flagged
This allows plugins to track events such as analytics.
2019-10-24 16:48:18 -04:00
tshenry
5d1b34e1b9
Minor Copy Change
Context: https://meta.discourse.org/t/email-with-correct-incoming-email-address-in-bcc-is-being-rejected/131003/2
2019-10-24 11:16:31 -07:00
Robin Ward
7744b636e9 FIX: Handle nil case for avatar, just in case 2019-10-24 14:02:51 -04:00
Robin Ward
8b4e71cb21 FIX: Allow avatar downloads to follow redirects 2019-10-24 14:01:54 -04:00
Robin Ward
2c0efac25e FIX: Broken certificates 2019-10-24 12:39:58 -04:00