Commit Graph

6587 Commits

Author SHA1 Message Date
Sam Saffron
62141b6316 FEATURE: enable_performance_http_headers for performance diagnostics
This adds support for DISCOURSE_ENABLE_PERFORMANCE_HTTP_HEADERS
when set to `true` this will turn on performance related headers

```text
X-Redis-Calls: 10     # number of redis calls
X-Redis-Time: 1.02    # redis time in seconds
X-Sql-Commands: 102   # number of SQL commands
X-Sql-Time: 1.02      # duration in SQL in seconds
X-Queue-Time: 1.01    # time the request sat in queue (depends on NGINX)
```

To get queue time NGINX must provide: HTTP_X_REQUEST_START

We do not recommend you enable this without thinking, it exposes information
about what your page is doing, usually you would only enable this if you
intend to strip off the headers further down the stream in a proxy
2019-06-05 16:08:11 +10:00
Arpit Jalan
e7fe7010b8
FIX: use hijack for processing bulk invites (#7679)
FIX: do not store bulk invite CSV file on server
2019-06-04 20:19:46 +05:30
Neil Lalonde
ecc9c76692
FEATURE: dynamically update the topic heat settings monthly (#7670)
The site settings beginning with "topic views heat" and "topic post like
heat" are set to defaults when installing Discourse, but there has not
been a process or guidance for updating these values based on
community activity.

This feature will update them once a month. The low, medium, and
high settings will be based on the minimums of the 45th, 25th, and
10th percentile topics respectively, so that 45% of topics will have
some "heat".

Disable automatic changes with the automatic_topic_heat_values setting.
2019-06-04 10:34:07 -04:00
Joffrey JAFFEUX
4fe885dedf
FIX: corrects description as it's not unique (#7688) 2019-06-04 15:39:09 +02:00
Joffrey JAFFEUX
b79d02ff48
FEATURE: displays average for 2 columns tables which support average 2019-06-04 11:08:26 +02:00
Maja Komel
c9a34aa10c FIX: add title attribute for notifications 2019-06-04 17:02:12 +08:00
Maja Komel
87d3b86484 FIX: better error message when user without permissions replies via email 2019-06-04 16:39:41 +08:00
Jeff Atwood
969d6af88e copyedit on theme wizard step 2019-06-03 09:42:04 -07:00
Penar Musaraj
16982d2a69
Update UI for wizard themes further reading step (#7669) 2019-06-03 10:47:17 -04:00
David Taylor
5e61893cb2 FIX: Display generic descriptor for associated account with no info 2019-06-03 12:14:02 +01:00
David Taylor
7500eed4c0
FEATURE: Multi-file javascript support for themes (#7526)
You can now add javascript files under `/javascripts/*` in a theme, and they will be loaded as if they were included in core, or a plugin. If you give something the same name as a core/plugin file, it will be overridden. Support file extensions are `.js.es6`, `.hbs` and `.raw.hbs`.
2019-06-03 10:41:00 +01:00
Dan Ungureanu
c1e7a1b292 UX: Merge settings related to muted tags. (#7656) 2019-06-03 12:23:23 +10:00
Sam Saffron
ee1e21b401 DEV: continue granting discourse.org pagerank by default
We can discuss on meta if it makes sense to strip this
2019-06-03 12:05:41 +10:00
Kris
98336de266 UX: Cleanup crawler styles, improve schema.org markup (#7668)
* Cleaning up crawler styles, improving some schema.org markup

* Cleaning up crawler styles, improving some schema.org markup

* additional styling

* add space for pagination
2019-06-03 12:03:16 +10:00
Arpit Jalan
b893e9fcbb Fix the build. 2019-06-02 15:20:53 +05:30
Jeff Atwood
b4c1a367ed minor copyedit on watched word review 2019-06-02 01:48:48 -07:00
Jeff Atwood
4dedc23817 increase anon_polling_interval to 30s 2019-05-31 17:05:22 -07:00
Sam Saffron
3b8819f0ab FEATURE: add support for defer topic functionality
This feature allows end users to "defer" topics by marking them unread

The functionality is default disabled. This also introduces the new site
setting default_other_enable_defer: to enable this by default on new user
accounts.
2019-05-31 15:44:35 +10:00
Gerhard Schlager
1af9cfa244 Add comments to help translators with Message Format 2019-05-30 22:22:24 +02:00
Neil Lalonde
dbfdce95c9 Update translations 2019-05-30 10:40:16 -04:00
Bianca Nenciu
8196af165d FIX: Add Chromebook detection. 2019-05-30 16:29:51 +03:00
Dan Ungureanu
8728850452 FEATURE: Mute topics tagged with both muted and unmuted tags. 2019-05-30 07:58:17 +08:00
Guo Xiang Tan
c920f9d137 FIX: Have nginx always pass /uploads/short-url requests to app.
Follow up to f0620e7118
2019-05-29 18:19:15 +08:00
Sam Saffron
b114bcd294 DEV: switch message bus backend to memory for tests
This backend is a bit faster and well tested, this is part of a longer
term plan to have a `backend: :memory, threaded: false` type config for
message bus which we can use in test.

The threading in message bus causes all sorts of surprises in test, it will
be nice not to be beholden to them.
2019-05-29 16:34:55 +10:00
Guo Xiang Tan
f0620e7118 FEATURE: Support [description|attachment](upload://<short-sha>) in MD take 2.
Previous attempt was missing `post_uploads` records.
2019-05-29 09:26:32 +08:00
Penar Musaraj
a93aa5bbce Add "further reading for themes" step to wizard 2019-05-29 08:28:03 +08:00
Penar Musaraj
7c9fb95c15 Temporarily revert "FEATURE: Support [description|attachment](upload://<short-sha>) in MD. (#7603)"
This reverts commit b1d3c678ca.

We need to make sure post_upload records are correctly stored.
2019-05-28 16:37:01 -04:00
Osama Sayegh
f3c07e27d9
FIX: correct translations for logs error rate notice (#7622)
The problem here is that hour and minute were passed to the %{duration} variable which made them impossible to translate in other languages.

I wonder if it's worth having 2 almost identical translations just for "reached" and "exceeded"? Perhaps we could combine them in one copy?
2019-05-28 22:10:51 +03:00
Guo Xiang Tan
b1d3c678ca FEATURE: Support [description|attachment](upload://<short-sha>) in MD. (#7603) 2019-05-28 11:18:21 -04:00
Jeff Atwood
03e98164cb copyedit, remove needless colons 2019-05-28 00:15:47 -07:00
Rafael dos Santos Silva
315a38e0e3 FEATURE: Allow running message_bus in a different redis instance (#7616)
Adds `DISCOURSE_MESSAGE_BUS_REDIS_ENABLED` env var, that when set
to true, will allow Discourse to connect to a different redis
instance for MessageBus needs.

When enabled you can configure the same env vars user for redis,
but prefixed by `MESSAGE_BUS`, eg:

`DISCOURSE_MESSAGE_BUS_REDIS_HOST`
2019-05-28 15:52:43 +10:00
Régis Hanol
9568f25882
TYPO: punctiation -> punctuation
Thanks to @yarons.
2019-05-27 22:57:23 +02:00
Penar Musaraj
dfcc2e7ad8 Revert "FEATURE: Send notification when member was accepted to group. (#7503)"
This reverts commit 42c82d544e.
2019-05-27 15:19:59 -04:00
Robin Ward
d95a68b837 FEATURE: When suspending a user, allow the Delete + Replies action
Previously you could only delete the post
2019-05-27 12:27:16 -04:00
Bianca Nenciu
42c82d544e
FEATURE: Send notification when member was accepted to group. (#7503) 2019-05-27 17:28:41 +03:00
Robin Ward
912f1d83ac UX: Adjust text a little more 2019-05-27 09:06:46 -04:00
Sam Saffron
6580025af9 FEATURE: add backup directory for mmdb files
This new `DISCOURSE_MAXMIND_BACKUP_PATH` can be used a secondary location
for maxmind db. That way a build machine, for example can cache it on the
host and reuse between builds.

Also per 5bfeef77 added proper error raising for download fails from
dedicated rake task

This also moves "refresh_maxmind_db_during_precompile_days" to a global
setting, it did not make sense in a site setting
2019-05-27 16:51:24 +10:00
Osama Sayegh
169cc56bed
Copyedit for broken theme alert 2019-05-27 07:25:39 +03:00
Jeff Atwood
baf7eac704 make privacy/terms on signup form open in new tab 2019-05-26 00:46:37 -07:00
Robin Ward
0725b614c9 UX: Better language about sensitivity 2019-05-24 16:02:00 -04:00
Robin Ward
1e72f44c01 Tweak the default sensitivities 2019-05-24 15:49:29 -04:00
Robin Ward
89b84651c3 Migrate score settings to use sensitivities
We hide scores so these settings no longer made sense.
2019-05-24 15:44:24 -04:00
Robin Ward
fad5d9c49b Use an Enum class for the Reviewable Priority Site Setting 2019-05-24 15:44:24 -04:00
Osama Sayegh
e20c30987c
FEATURE: detect theme errors and catch them (#7589)
* FEATURE: detect theme errors and catch them

* Bump COMPILER_VERSION

* Feedback

* Override eslint no console for one line

* Can't use our ajax method

* remove emoji from translation file
2019-05-24 17:25:55 +03:00
Kris
3388872991 UX: Separate section for 2FA settings, more consistent layout 2019-05-24 08:58:12 +08:00
Robin Ward
e74cd54fc6 REFACTOR: Replace score bonuses with low/med/high priorities
We removed score from the UX so it makes more sense to have sites set
priorities instead of score bonuses.
2019-05-23 11:54:45 -04:00
Gerhard Schlager
98a17edc90 Remove unused translations
The migration for the ToS signup field happend in 2014. Everyone who hasn't updated yet needs to live with the English text "Terms of Service". There's no need to keep these unused translations forever.
2019-05-22 16:15:22 +02:00
Gerhard Schlager
58f72cd439 Remove duplicate translations 2019-05-22 16:15:22 +02:00
Gerhard Schlager
4fce79d4d5 Add missing interpolation key to ToS 2019-05-22 14:40:15 +02:00
Gerhard Schlager
f74565f23b Remove unused translations 2019-05-22 13:35:18 +02:00
AhmadFCheema
32e7f1efb4 Fix typo for cookies_error in client.en.yml (#7580) 2019-05-21 10:21:04 +02:00
Osama Sayegh
c86d2666c4
Pull translations from Transifex (#7578) 2019-05-21 07:18:15 +03:00
Osama Sayegh
0b5924d61e
Refactor keyboard shortcuts modal to fix RTL locales (#7545)
* Refactor keyboard shortcuts modal to fix RTL locales

* Feedback

* Remove lowercase modifier keys
2019-05-21 06:39:32 +03:00
Gerhard Schlager
edc6ac0c66 Update translations 2019-05-21 00:04:37 +02:00
Gerhard Schlager
0afcad148a DEV: Always use %{count} in pluralized strings 2019-05-20 23:26:22 +02:00
Jeff Atwood
555305325a copyedit on likes
since these never appear side by side on the same user page tab, I feel their meaning is clear on each individual tab without being quite so verbose
2019-05-20 09:56:06 -07:00
Gerhard Schlager
b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
Gerhard Schlager
a58aa9b4bf Update translations 2019-05-20 13:42:05 +02:00
Jeff Atwood
f2326ce83f very minor copyedits 2019-05-17 16:59:29 -07:00
David Taylor
5666316285 FEATURE: Display 'last updated' on dashboard, improve release notes link (#7560) 2019-05-17 15:42:45 +10:00
Jeff Atwood
ba84e33b63 copyedits 2019-05-16 17:40:15 -07:00
Neil Lalonde
314a16bd37 Remove unused translation
7eea55d5
2019-05-16 14:41:11 -04:00
Régis Hanol
d51a495dad
COPY: improve 'private_email' site setting description 2019-05-16 11:35:33 +02:00
Sam Saffron
76173dea87 DEV: ensure we never fork v8 contexts from unicorn
v8 forking is not supported and can lead to memory leaks.

This commit handles the most common case which is the unicorn master forking

There are still some cases related to backup where we fork, however those
forks are usually short lived so the memory leak is not severe, burning
the contexts in the master process could break sidekiq or web process that
do the actual forking
2019-05-16 09:50:34 +10:00
Régis Hanol
64e81f0549
FIX: ensure get_a_room link starts with 'base_path translation 2019-05-15 12:41:38 +02:00
Régis Hanol
a0df676194
COPY: improve 'dominating_topic' and 'get_a_room' warnings
cf. https://meta.discourse.org/t/how-to-suppress-the-warning-that-a-user-is-contributing-too-much-to-a-topic/63249/9
2019-05-15 12:21:44 +02:00
David Taylor
33bd47164f DEV: Re-enable uglifier for non-precompiled assets
Keep `harmony` disabled
2019-05-14 10:28:18 +01:00
David Taylor
f12709e24c DEV: Temporarily disable uglifier for non-precompiled assets
This is causing performance issues which require further investigation
2019-05-14 09:34:38 +01:00
Sam Saffron
dafc941a04 FEATURE: allow shadowing all s3 settings
Previously enable s3 uploads and s3 upload bucket were not shadowed.

This caused confusion when people were configuring stuff via env cause most
of s3 settings are shadowed.
2019-05-14 10:24:14 +10:00
Neil Lalonde
6f747c6b71 FIX: don't allow username to be changed to same as password
We were blocking user registrations with same username and password,
but allowing usernames to be changed to be same as password later.
Also disallow names to be the same as password.
2019-05-13 16:43:40 -04:00
David Taylor
2b28abdc21 FIX: Allow underscores in s3_upload_bucket setting
Underscores are not allowed in s3 bucket names, but they should be allowed in the subfolder name
2019-05-13 11:18:24 +01:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Sam Saffron
4e1f25197d FEATURE: allow overriding download of maxmind db via env 2019-05-13 09:58:56 +10:00
Penar Musaraj
a859ddc77e Improve theme/component delete modal warning 2019-05-10 14:14:12 -04:00
Robin Ward
01bd82139f FIX: Invalid URL for queued posts review 2019-05-10 10:00:52 -04:00
Robin Ward
b3873b95d0 FIX: Pluralization error for tag error message 2019-05-10 09:54:54 -04:00
Robin Ward
b380ed5282 FEATURE: Claim Reviewables by Topic
This is a feature that used to be present in discourse-assign but is
much easier to implement in core. It also allows a topic to be assigned
without it claiming for review and vice versa and allows it to work with
category group reviewers.
2019-05-09 13:40:36 -04:00
Sam Saffron
88249932a0 PERF: remove SQL notifiers for every SQL execution
Benchmarking:

```
Benchmark.ips do |b|
  b.report("simple") do
    User.first
  end
end

ActiveSupport::Notifications.notifier.listeners_for("sql.active_record").clear

Benchmark.ips do |b|
  b.report("simple") do
    User.first
  end
end

```

```
sam@arch discourse % RAILS_ENV=production ruby script/micro_bench.rb

Before

Calculating -------------------------------------
              simple      3.289k (± 4.4%) i/s -     16.575k in   5.049771s
After

Calculating -------------------------------------
              simple      3.491k (± 3.6%) i/s -     17.442k in   5.002226s
````
2019-05-09 17:44:46 +10:00
Jeff Atwood
d1860536bc omit needless words 2019-05-08 23:22:51 -07:00
Sam Saffron
88650a1259 PERF: avoid checking for consecutive replies in test
This check can issue up to 2 queries per post created, we have specific
tests for it so we can avoid.

This also rolls back #4da6ca4d
2019-05-09 13:28:53 +10:00
Penar Musaraj
d9ab722d05 Revert "Revert "PERF: Skip compressing locales for faster rebuilds (#7501)" (#7502)"
This reverts commit 6ea811c923.
2019-05-08 14:55:06 -04:00
Robin Ward
b409dab77f Rename flags_default_topics to reviewable_default_topics
This functionality regressed with the reviewable update. I took the
opporunity to rename it when fixing it for clarity.
2019-05-08 10:07:10 -04:00
Penar Musaraj
5bfe051eb9 Mark discourse user-agent as non-crawler 2019-05-08 09:45:25 -04:00
Maja Komel
77af097ce0 FIX: add short description to title on client side 2019-05-08 15:03:33 +02:00
Arpit Jalan
1569cf85df UX: better permalink feature description/warning. 2019-05-08 18:31:38 +05:30
Jeff Atwood
24346e4612 strengthen warning around crawler whitelist 2019-05-08 04:10:02 -07:00
Joffrey JAFFEUX
6ea811c923
Revert "PERF: Skip compressing locales for faster rebuilds (#7501)" (#7502) 2019-05-08 07:54:21 +02:00
Penar Musaraj
b9d8281818 PERF: Skip compressing locales for faster rebuilds (#7501)
* Do not brotli all locales in precompile

* Try without gzip

* uglify without compressing, always gzip

* skip uglify for unused locales

* FIX: Uglifier needs harmony for ES6 compatibility

* Use node uglifier if available

* Minor refactor
2019-05-08 10:22:19 +10:00
Robin Ward
5af7c90bab FEATURE: Hide Reviewable scores, change score filter to Priority
We found score hard to understand. It is still there behind the scenes
for sorting purposes, but it is no longer shown.

You can now filter by minimum priority (low, med, high) instead of
score.
2019-05-07 14:05:23 -04:00
Blake Erickson
5b5b5a5931 FIX: return an error if a user tries to whisper
This commit fixes a bug where a user creates a whisper post via the api
but is posted as a regular message because they don't have access to
whisper. Now a 403 unauthorized will be returned instead of the whisper
param just being ignored for regular users. Staff users should not be
affected by this change.

https://meta.discourse.org/t/a-whisper-is-posted-as-a-message-if-the-user-is-not-staff-moderator-admin-when-using-the-api/116601
2019-05-07 11:42:26 -06:00
Robin Ward
c403569895 Remove unused translation keys
cc @gschlager
2019-05-07 08:27:30 -04:00
Arpit Jalan
ed70595314 UX: add information about the use of permalinks 2019-05-07 17:13:26 +05:30
Bianca Nenciu
4ff1195537 FEATURE: Use Beacon API for tracking clicks. (#7483) 2019-05-07 16:37:43 +10:00
Guo Xiang Tan
152238b4cf DEV: Prefer public_send over send. 2019-05-07 09:33:21 +08:00
Robin Ward
31e100530f FEATURE: Flag count in post menu
This change shows a notification number besides the flag icon in the
post menu if there is reviewable content associated with the post.
Additionally, if there is pending stuff to review, the icon has a red
background.

We have also removed the list of links below a post with the flag
status. A reviewer is meant to click the number beside the flag icon to
view the flags. As a consequence of losing those links, we've removed
the ability to undo or ignore flags below a post.
2019-05-06 16:13:31 -04:00
Jeff Atwood
7799d29b12 copyedits on approval descriptions 2019-05-04 20:25:46 -07:00
Jeff Atwood
c37d959106 copyedit 2019-05-02 22:52:14 -07:00
Penar Musaraj
b948d97c8f
FEATURE: Show diff of local changes before updating remote theme (#7443) 2019-05-02 21:43:54 -04:00
Jeff Atwood
ce2c19457a omit needless words 2019-05-02 17:29:34 -07:00
Guo Xiang Tan
cf235fbd48 Fix bundler not requiring default group. Follow up to a2babcafd8. 2019-05-02 13:25:17 +08:00