Commit Graph

34827 Commits

Author SHA1 Message Date
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
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
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
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
6d381b33a4 copyedits on moderator welcome PM 2019-10-28 17:19:42 -07:00
f686ab988f FIX: close modals on ESC key and clicking outside 2019-10-28 17:23:30 -04:00
64d51ab45e DEV: add UNICORN_BIND_ALL
listen on local interface by default.
2019-10-28 14:11:19 -07:00
4935c9f1f8 DEV: replace inline RTL attributes with classes in digest.html.erb 2019-10-28 16:36:55 -04:00
197ad8cd6e DEV: Run a faster test when warming up 2019-10-28 17:19:55 -03:00
bacc114462 UX: Convert alert & modal close to buttons for improved accessibility 2019-10-28 16:04:29 -04:00
3b72a36c5d create plugin outlet and pass model to above-review-filters (#8257) 2019-10-28 15:44:13 -04:00
071a82efe3 FIX: Correct error when sending PM to email address 2019-10-28 18:32:43 +00:00
918bb76f76 DEV: No need to look up a category repeatedly by its slug 2019-10-28 18:30:40 +00:00
79c2138955 Fix github oneboxes for RTL locales (#8245) 2019-10-28 11:09:42 -07:00
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
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
e7ff6809a3 FEATURE: add SES spam header to recognised spam headers (#8254) 2019-10-28 12:46:53 -04:00
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
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
437edfc415 FEATURE: Welcome moderator message - add copy! (#8246) 2019-10-28 08:58:45 -05:00
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
f0617f96ed DEV: Update users controller spec following user_search update 2019-10-28 12:32:56 +00:00
eec464d8d1 SECURITY: Check permissions when autocompleting mentions 2019-10-28 11:01:47 +00:00
88df84bf2b FIX: theme component setting was not getting updated in the UI (#8247) 2019-10-28 10:33:31 +01:00
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
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
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
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
d76d0e75ec DEV: Move warmup inside docker rake task 2019-10-25 16:31:05 -03:00
4f452f0205 DEV: Add variable to warmup tmp folder and obtain accurate results when profiling specs 2019-10-25 10:52:23 -03:00
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
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
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
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
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
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
7744b636e9 FIX: Handle nil case for avatar, just in case 2019-10-24 14:02:51 -04:00
8b4e71cb21 FIX: Allow avatar downloads to follow redirects 2019-10-24 14:01:54 -04:00
2c0efac25e FIX: Broken certificates 2019-10-24 12:39:58 -04:00
85c08b84a5 DEV: Add a short wait to smoke test to prevent rate limiting 2019-10-24 18:36:27 +02:00
d4d2cb124c DEV: Make smoke tests more reliable 2019-10-24 17:51:48 +02:00
452d541b74 DEV: Add env variable to allow easier debugging of smoke tests
Set `DEBUG_NODE=1` when running `rake smoke:test` and use your favorite tool to debug the smoke tests. See https://nodejs.org/en/docs/guides/debugging-getting-started/ for more information.

The debugger will break at the beginning of the smoke tests when the env variable is set.
2019-10-24 17:48:15 +02:00
decbc9194d DEV: Fix basic auth in smoke test 2019-10-24 17:43:26 +02:00
e4718f1910 DEV: Update puppeteer 2019-10-24 17:41:40 +02:00
9592ab57e0 FIX: failing build with prettier (#8241) 2019-10-24 10:16:12 -05:00
da5e9af10a FEATURE: Add remembering topic list for group pms (#8235)
* FEATURE: Add remembering topic list for group pms

* added findOrResetCachedBy helper in topic-list

* Created cached-topic-list.js

* Update app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6

Co-Authored-By: Robin Ward <robin.ward@gmail.com>
2019-10-24 09:27:03 -05:00
f5d6236ad2 DEV: Use before_all to run code before prefabrication
Followup to e9897d295f7eef1be1bb7c414a2fc50c40df468f
2019-10-24 12:27:40 +01:00
690db4fd36 FIX: Show poll voters in Oneboxed posts. (#7768) 2019-10-24 14:00:25 +03:00
e9897d295f DEV: Refactor user search spec to use prefabrication
Break up single large example into multiple examples, using fab! to maintain performance. On my machine, this speeds up the test slightly, and also makes it more readable.
2019-10-24 11:58:33 +01:00
b3cd83460b FIX: check for presence of liked post before creating notification 2019-10-24 14:25:56 +05:30