Commit Graph

19529 Commits

Author SHA1 Message Date
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
Penar Musaraj
5e546ba7d1 Standardize viewport rules for mobile and desktop
Also removes`maximum-scale` on non-mobile devices, better for accessibility.
2019-05-06 10:28:29 -04:00
Régis Hanol
e2e72f4e8e DEV: rename ReadOnly module to ReadOnlyHeader 2019-05-06 16:07:49 +02:00
Dan Ungureanu
33e06dd796
FIX: Make select all and below skip small actions. (#7425) 2019-05-06 16:22:11 +03:00
Dan Ungureanu
a40dcbde9b
FIX: Do not move hidden post actions. (#7424)
Hidden (staff-only) post actions are whisper posts with no content, that
are later transformed by the client into post actions (discourse-assign
uses this).
2019-05-06 16:21:42 +03:00
Guo Xiang Tan
8217d5be78 UX: Switch mobile header back for 5s when notification comes in. 2019-05-06 16:58:25 +08:00
Sam Saffron
f8eddd40ad PERF: remove avg_time calculations and regular jobs from posts and topics
After careful analysis of large data-sets it became apparent that avg_time
had no impact whatsoever on "best of" topic scoring. Calculating avg_time
was a very costly operation especially on large databases.

We have some longer term plans of introducing other weighting that is read
time based into our scoring for "best of" and "top" topics, but in the
interim to stop a large amount of work that is not achieving any value we
are removing the jobs.

Column removal will follow once we decide on a new replacement metric.
2019-05-06 15:59:01 +10:00
Guo Xiang Tan
ba3cf7109c DEV: Remove unused lines of code. 2019-05-06 13:48:51 +08:00
Sam Saffron
267d129f38 FEATURE: only scroll to bottom for discobot
Non discobot replies on PMs triggering scroll cause confusion.
2019-05-06 10:55:58 +10:00
Robin Ward
99a2a769d4 FIX: Conflict error (version was already used) 2019-05-03 16:36:37 -04:00
Vinoth Kannan
e8fafbc123 List and restore missing post uploads from S3 inventory. 2019-05-04 01:16:20 +05:30
David Taylor
d82da69c2c FIX: Fail gracefully if username parameter is missing when creating user 2019-05-03 17:17:06 +01:00
Robin Ward
15c9b00307 FEATURE: Show edit indicator on review queue
If a flagged post has edits, show the pencil icon and pop up the history
window when clicked.
2019-05-03 11:21:33 -04:00
Joffrey JAFFEUX
5f78bbebe9
FIX: forces a reload of emoji list if clicked on more (#7473)
This is a bit hacky but it's much more simple and reliable than many other solutions and doesnt involve having to manage some variable state.
2019-05-03 16:11:03 +02:00
Régis Hanol
0d41d58d27 FIX: add ReadOnly hear to /srv/status 2019-05-03 12:21:07 +02:00
Sam Saffron
16ef060a76 DEV: correct Rails 6 deprecation
render template is backwards compatible with Rails 5, code is simpler.

Thanks @jhawthorn, this is our last Rails 6 deprecation
2019-05-03 16:20:18 +10:00
Penar Musaraj
b948d97c8f
FEATURE: Show diff of local changes before updating remote theme (#7443) 2019-05-02 21:43:54 -04:00
Sam Saffron
3dc4ab905c DEV: annotate models
(also looks like renaming of bigint(8) -> bigint in annotate
which seems fine)
2019-05-03 08:34:12 +10:00
Robin Ward
3cb0d27d38 DEV: Upgrade our widget handlebars compiler
Now supports subexpressions such as i18n and concat, plus automatic
attaching of widgets similar to ember.
2019-05-02 15:47:57 -04:00
Joffrey JAFFEUX
e696903c31
FIX: uses translatedTitle to check validity of topic footer btn (#7472) 2019-05-02 20:56:27 +02:00
Joffrey JAFFEUX
35212036f2
FIX: ensures click on topic link has link for target and not children (#7471) 2019-05-02 13:43:02 +02:00
Guo Xiang Tan
d252dad4f0 FIX: Can't remove user profile uploads.
Follow up to 24347ace10.
2019-05-02 16:54:10 +08:00
Guo Xiang Tan
ebca588fd0 DEV: Remove unused line of code. 2019-05-02 16:54:10 +08:00
Joffrey JAFFEUX
75591664e7
FIX: better handling of category filter deselection (#7468) 2019-05-02 10:03:12 +02:00
Guo Xiang Tan
d5c9ac7196 PERF: Use cdn when serving site settings upload. 2019-05-02 15:35:07 +08:00
Guo Xiang Tan
24347ace10 FIX: Properly associate user_profiles background urls via upload id.
`Upload#url` is more likely and can change from time to time. When it
does changes, we don't want to have to look through multiple tables to
ensure that the URLs are all up to date. Instead, we simply associate
uploads properly to `UserProfile` so that it does not have to replicate
the URLs in the table.
2019-05-02 14:58:24 +08:00
Sam Saffron
96360a779f DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
Sam Saffron
1be01f8dd4 DEV: Add support for Rails 6
Minor fixes to add Rails 6 support to Discourse, we now will boot
with RAILS_MASTER=1, all specs pass

Only one tiny deprecation left

Largest change was the way ActiveModel:Errors changed interface a
bit but there is a simple backwards compat way of working it
2019-05-02 16:23:25 +10:00
Joe
5a834a05ea
FIX: crawler layout CSS adjustments (#7469)
* Fix header size to fit the viewport

Setting the header to border-box means that the padding is factored in when calculating its width. If this is not done, the header width would be 100% of the viewport width + any padding when set on it. That causes some parts of the header to be rendered off-screen and causes horizontal scrolling.

* prevent code in posts from causing horizontal overflow

We are currently not wrapping code in posts in the crawler view. This affects both unformatted code and inline code blocks. This commit forces such code to wrap in order to prevent horizontal overflow which the Google bot complains about since it causes some content to be rendered outside of the viewport for the mobile crawler.
2019-05-02 13:00:29 +08:00
Sam Saffron
157dc5e298 FEATURE: disable native share API on non tablets/phones
Native share API works fantastically on phones/tablets but on full desktop
it is confusing.
2019-05-02 13:18:29 +10:00
Robin Ward
885f1e7e5f FIX: Allow category group reviewers to edit queued posts
They can edit title, body and tags. Category is disabled for now as it
could lead to some odd security issues.
2019-05-01 14:48:49 -04:00
Robin Ward
0f01c9d25f FIX: Posts in the approval queue were sometimes dropping category 2019-05-01 14:40:38 -04:00
Arpit Jalan
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
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
Joffrey JAFFEUX
ae493f4722
UX: fills picker with emoji autocomplete state on more click (#7466) 2019-05-01 16:19:45 +02:00
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
Vinoth Kannan
9c78c18256 Check both site and global setting for s3 enabled value. 2019-05-01 10:49:53 +05:30
Arpit Jalan
c6409fd2cc FIX: pass correct date arguments to server when exporting CSV 2019-05-01 10:46:30 +05:30
Arpit Jalan
002e1f560a FIX: initialize empty object if no custom filters are present 2019-05-01 10:27:19 +05:30
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
Robin Ward
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
Roman Rizzi
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
Robin Ward
812905cbb6 FIX: Recursively delete nested replies
Previously we were only deleting top level replies
2019-04-30 12:54:53 -04:00
David Taylor
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
David Taylor
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
Joffrey JAFFEUX
8e68244eea
FIX: prevents google to track certain pages (#7463) 2019-04-30 15:57:51 +02:00
Joffrey JAFFEUX
726dd0fe37 Revert "FIX: prevents google to track certain pages (#7455)"
This reverts commit c863e62998.
2019-04-30 10:17:12 +02:00
Guo Xiang Tan
587cfd4545 DEV: Use frozen_string_literal: true on models/theme.rb. 2019-04-30 16:02:55 +08:00
Joffrey JAFFEUX
c863e62998 FIX: prevents google to track certain pages (#7455) 2019-04-30 13:59:55 +08:00