Commit Graph

6475 Commits

Author SHA1 Message Date
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
Guo Xiang Tan
a2babcafd8 DEV: Don't require non production bundler assets in production. 2019-05-02 10:53:12 +08:00
Robin Ward
da0e37512a FIX: Add test to confirm updating category works.
Also replaces a missing translation key that 99.9% of users would never
see.
2019-05-01 11:37:28 -04:00
Vinoth Kannan
7869a10d18 Revert "FEATURE: Added unlisted topics option to advanced search (#7447)"
This reverts commit 539723f8ff since it is failing the build.
2019-05-01 21:06:20 +05:30
David Taylor
0e303c7f5d
FEATURE: Automatically generate optimized site metadata icons (#7372)
This change automatically resizes icons for various purposes. Admins can now upload `logo` and `logo_small`, and everything else will be auto-generated. Specific icons can still be uploaded separately if required.

## Core

- Adds an SiteIconManager module which manages automatic resizing and fallback

- Icons are looked up in the OptimizedImage table at runtime, and then cached in Redis. If the resized version is missing for some reason, then most icons will fall back to the original files. Some icons (e.g. PWA Manifest) will return `nil` (because an incorrectly sized icon is worse than a missing icon). 

- `SiteSetting.site_large_icon_url` will return the optimized version, including any fallback. `SiteSetting.large_icon` continues to return the upload object. This means that (almost) no changes are required in core/plugins to support this new system.

- Icons are resized whenever a relevant site setting is changed, and during post-deploy migrations

## Wizard

- Allows `requiresRefresh` wizard steps to reload data via AJAX instead of a full page reload

- Add placeholders to the **icons** step of the wizard, which automatically update from the "Square Logo"

- Various copy updates to support the changes

- Remove the "upload-time" resizing for `large_icon`. This is no longer required.

## Site Settings UX

- Move logo/icon settings under a new "Branding" tab

- Various copy changes to support the changes

- Adds placeholder support to the `image-uploader` component

- Automatically reloads site settings after saving. This allows setting placeholders to change based on changes to other settings

- Upload site settings will be assigned a placeholder if SiteIconManager `responds_to?` an icon of the same name

## Dashboard Warnings

- Remove PWA icon and PWA title warnings. Both are now handled automatically.

## Bonus

- Updated the sketch logos to use @awesomerobot's new high-res designs
2019-05-01 14:44:45 +01:00
Tim Lange
539723f8ff FEATURE: Added unlisted topics option to advanced search (#7447) 2019-05-01 12:31:13 +10:00
Robin Ward
404b35bd04 FEATURE: Category Reviewable by Group
Allow a group to review content in a particular category.
2019-04-30 15:23:06 -04:00
Neil Lalonde
1ba72ccab8 DEV: add site setting type group_list for a list of groups
Add a js test
2019-04-29 16:15:22 -04:00
Sam Saffron
3b95f34e7b DEV: Rails 6 compatability
Without forcing a reload on start internal state in the accelerator can be
off. In Rails 5 not translation is being called so this is not an issue but
in 6 it is called earlier on.
2019-04-29 17:13:30 +10:00
Sam Saffron
5d96c5cb84 FIX: set upper limit on clean up invalid users (10 years)
Note... this setting is quite new so I am not adding a migration here to
clean up history. Instead next time users save the setting it will complain.

Also explicitly call out that the value 0 is special and used to disable
the job.
2019-04-29 14:51:15 +10:00
Joffrey JAFFEUX
bcca2b5d73
FEATURE: initial implementation of generic filters for reports 2019-04-26 12:17:10 +02:00
Giannis Tsagatakis
1852a95a41 UX: Add transliteration support for the Greek language
The transliteration file is taken from rails-i18n gem
2019-04-25 22:49:21 +02:00
Tarek Khalil
d8ff94ecaa
FEATURE: Ignoring users from the preferences page in a cleaner way (#7289)
* FEATURE: Ignoring users from the preferences page in a cleaner way
2019-04-25 09:26:49 +01:00