Commit Graph

32756 Commits

Author SHA1 Message Date
0f01c9d25f FIX: Posts in the approval queue were sometimes dropping category 2019-05-01 14:40:38 -04:00
92cc57b5da FIX: make 'stats' method compatible with multisite.
a8f410a9c56c87b20449436a3b807955b8284b15
2019-05-01 23:34:18 +05:30
8bedb6a4a3 fix the build 2019-05-01 23:12:50 +05:30
b5ea50a154 FIX: use full screen login for new-topic route (#7467)
DEV: add javascript tests for new-topic and new-message routes

DEV: fix an existing test that was being skipped
2019-05-01 22:54:29 +05:30
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
7869a10d18 Revert "FEATURE: Added unlisted topics option to advanced search (#7447)"
This reverts commit 539723f8ffd6506fe3db24ed880471251b287c61 since it is failing the build.
2019-05-01 21:06:20 +05:30
ae493f4722 UX: fills picker with emoji autocomplete state on more click (#7466) 2019-05-01 16:19:45 +02:00
6fdbf15d6b DEV: Remove Danger from travis build 2019-05-01 15:15:28 +01:00
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
9c78c18256 Check both site and global setting for s3 enabled value. 2019-05-01 10:49:53 +05:30
c6409fd2cc FIX: pass correct date arguments to server when exporting CSV 2019-05-01 10:46:30 +05:30
002e1f560a FIX: initialize empty object if no custom filters are present 2019-05-01 10:27:19 +05:30
539723f8ff FEATURE: Added unlisted topics option to advanced search (#7447) 2019-05-01 12:31:13 +10:00
0876248130 dev: Reenable skipped test 2019-04-30 18:09:17 -03:00
404b35bd04 FEATURE: Category Reviewable by Group
Allow a group to review content in a particular category.
2019-04-30 15:23:06 -04:00
dd29af4475 REFACTOR: {{avatar}} and {{date}} helpers in vdom templates
This is a step towards a nicer flag display under posts.
2019-04-30 15:22:38 -04:00
404666c9e9 DEV: Export the default behaviour of a topic-list-item so it can be reused by the discourse-assign plugin (#7433) 2019-04-30 15:36:54 -03:00
e0db323efb Remove whitespace and revert unintended change 2019-04-30 15:07:03 -03:00
84a3459af6 DEV: Mark flaky tests as pending 2019-04-30 15:01:21 -03:00
812905cbb6 FIX: Recursively delete nested replies
Previously we were only deleting top level replies
2019-04-30 12:54:53 -04:00
5edb5c8b03 FIX: Mark invited admins as 'approved' (#7459)
This prevents invited admins appearing as no-op reviewables in the queue when invite_only or require_approval is enabled.
2019-04-30 17:26:39 +01:00
583226d295 FIX: Linking to /new-topic from /latest
`/new-topic` redirects back to `/latest`, so the ember router considers this to be a 'refresh'. This triggers the `resetParams()` logic, which would cause the transition to abort, and the composer would never open.

This commit fixes the `resetParams()` logic so that it uses the default values, instead of setting everything to `null`. Therefore the transition is no longer aborted, and the composer opens successfully.

Unfortunately I have not been able to reproduce the issue in a QUnit test.
2019-04-30 16:25:25 +01:00
8e68244eea FIX: prevents google to track certain pages (#7463) 2019-04-30 15:57:51 +02:00
2ebe9e3a8b Bump onebox version 2019-04-30 10:07:48 -03:00
bc8b7b13ef DEV: Recompile theme fields after db:migrate 2019-04-30 11:52:30 +01:00
726dd0fe37 Revert "FIX: prevents google to track certain pages (#7455)"
This reverts commit c863e62998a76d79d1b87260ee550326f5478ea6.
2019-04-30 10:17:12 +02:00
587cfd4545 DEV: Use frozen_string_literal: true on models/theme.rb. 2019-04-30 16:02:55 +08:00
c863e62998 FIX: prevents google to track certain pages (#7455) 2019-04-30 13:59:55 +08:00
1fdeec564b PERF: Move where clause up to speed up CalculateAvgTime daily job (#7462)
Cuts down affected posts earlier in the query, so the generated plan
deals with less rows, and runs faster.

https://meta.discourse.org/t/post-calculate-avg-time-taking-up-a-long-time/49750/13?u=falco
2019-04-30 13:34:46 +10:00
dca7f8ecf2 FIX: Loading more broken on groups page.
Regressed in 1f17d52f552d01cb5ea628294d1b25666631fa87.
2019-04-30 10:35:17 +08:00
75a6c440f7 DEV: Spec clarification example (#7458) 2019-04-30 09:41:24 +08:00
7b1783bae8 FIX: cache_critical_dns was never caching pg replica (#7461)
* it's DISCOURSE_DB_REPLICA_HOST not DISCOURSE_DB_BACKUP_HOST
2019-04-30 08:42:51 +08:00
4ea21fa2d0 DEV: use #frozen_string_literal: true on all spec
This change both speeds up specs (less strings to allocate) and helps catch
cases where methods in Discourse are mutating inputs.

Overall we will be migrating everything to use #frozen_string_literal: true
it will take a while, but this is the first and safest move in this direction
2019-04-30 10:27:42 +10:00
0a5a6dfded DEV: stop mutating inputs as a side effect
We had quite a few cases in core where inputs are being mutated as a side
effect of calling a method.

This handles all the cases where specs caught this.

Mutating inputs makes code harder to reason about. Eg:

```
frog = "frog"
jump(frog)
puts frog
"fly" # ?????
```

This commit is part of a followup commit that adds # frozen_string_literal
to all our specs.
2019-04-30 10:25:53 +10:00
442111af91 DEV: remove a couple of warnings from spec 2019-04-30 08:41:28 +10:00
a00354f11f Prettier site-settings/group-list.js.es6 2019-04-29 16:26:13 -04:00
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
526e76ced2 FIX: Use PostgreSQL 'ON CONFLICT' to deal with race condition
On busy sites, concurrent requests to insert into post_timings can
occur, which was dealt with using Ruby exceptions.

This moves the handling to PostgreSQL which makes it a bit faster,
and prevents a spam of ERROR in the database logs.
2019-04-29 16:34:42 -03:00
bfadb1fabc FIX: use more specific target for ".tag-box"
This avoids tags named "box" from receiving styling aimed at this specific element on the tag list page.
2019-04-29 13:55:40 -04:00
f8f7091e57 FIX: staff-only tags visible on /tags page when restricted to a category
If a tag group is set to only be visible to staff, and is restricted
to a category that is visible by everyone, the tags in the group were
being shown on the /tags page. They weren't visible anywhere else.
This commit fixes it so they don't show on the /tags page.
2019-04-29 12:38:28 -04:00
56f6065393 FIX: Generate ASCII slug with default locale 2019-04-29 18:29:58 +02:00
b75720d911 FIX: skip click-tracking for mentions 2019-04-29 12:05:47 -04:00
876c4f20b3 FIX: Remove duplicate Emoji names from blurb
The blurb contained the value of the alt and title attribute of Emojis. Both values are always the same.
2019-04-29 17:26:39 +02:00
71d19f6e1f FIX: Reduce mentions in blurbs to @username or @groupname
The link to the user profile or group is useless and the URL encoded username or group name looks awful for Unicode names
2019-04-29 17:26:39 +02:00
MMX
5d4aa256be FIX: category logo upload error in Discuz importer.(#7453) 2019-04-29 17:01:15 +02:00
5768011cad FIX: prevents exception in the composer with regexp flags 2019-04-29 16:58:17 +02:00
629ae7a5b7 FIX: Revert tracking links in quotes 2019-04-29 10:30:04 -04:00
aef35faefc FIX: Open links in external tabs. (#7444) 2019-04-29 10:27:29 -04:00
ca9fd95a08 FIX: Respect "open external links in new window" in quotes and edit history 2019-04-29 10:13:53 -04:00
7a27c93c03 FIX: URL encode username and first letter in avatar URL
And it adds specs as a follow-up to aadb7da7
2019-04-29 15:08:14 +02:00