Commit Graph

23902 Commits

Author SHA1 Message Date
Guo Xiang Tan 8336c2235e FIX: Missing PG topic title headline when pg headlines is enabled. 2020-12-22 09:09:00 +08:00
David Taylor d25fd34b44
DEV: Remove with_deleted workarounds for old Rails version (#11550)
* DEV: Remove with_deleted workarounds for old Rails version

These workarounds using private APIs are no longer required in the latest version of Rails. The referenced issue (https://github.com/rails/rails/issues/4306) was closed in 2013. The acts_as_paranoid workaround which this was based on was removed for rails > 5.

Switching to using a scope also allows us to use it within a `belongs_to` relation (e.g. in the Poll model). This avoids issues which can be caused by unscoping all `where` clauses.

Predicates are not necessarily strings, so calling `.join(" AND ")` can sometimes cause weird errors. If we use `WhereClause#ast`, and then `.to_sql` we achieve the same thing with fully public APIs, and it will work successfully for all predicates.
2020-12-22 10:38:59 +11:00
Rafael dos Santos Silva 32e7ee4867
FEATURE: Adds support for the WEBP image format (#11532)
Adds support for both still and animated webp images.
Animated images won't be optimized or get thumbnails.

Depends on https://github.com/discourse/discourse_docker/pull/506
and https://github.com/discourse/discourse_docker/pull/507
2020-12-21 20:09:00 -03:00
Rafael dos Santos Silva c4552e9c10
FIX: Autoplay videos must always be muted (#11533)
This automatically adds the muted attribute if it's missing in a video
tag.

Co-authored-by: David Taylor <david@taylorhq.com>
2020-12-21 14:55:00 -03:00
Bianca Nenciu 38950840e0
FIX: Show restricted tags in bulk select (#11531)
Navigating to a category and tag page, selecting topics and attempting
to bulk append a tag showed all but the tags restricted to the category.
2020-12-21 12:26:51 +02:00
Mark VanLandingham d8e2b497f7
DEV: Move rerender on 'do not disturb' change to mixin (#11529) 2020-12-18 10:35:43 -06:00
Mark VanLandingham 649ed24bb4
FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
Bianca Nenciu 806f05f851
FIX: Make find_by_slug_path work with default slugs (#11501)
Default slugs are generated by adding '-category' to category ID.
2020-12-18 16:05:01 +02:00
Roman Rizzi 142e0ae062
Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)"" (#11509)
* Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)"

This reverts commit aa0d4ea764.

* Correctly debounce onScroll function
2020-12-18 10:18:52 -03:00
Arpit Jalan f296ca4b4a
FEATURE: allow plugins to show custom HTML via renderTags (#11520)
This commit allows discourse-assign plugin to show custom HTML via
renderTags even if topic has no tags.
2020-12-18 09:42:42 +05:30
Penar Musaraj 2b8b252249
UX: Move reply filter button on mobile (#11524) 2020-12-18 14:51:13 +11:00
Sam 4558d91bbb
UX: adjust default menu width (#11526)
The notification panel gets resized and the JS uses maxWidth of 320.

This tends to fight with the CSS causing notifications to "jump" a bit when a new one lands.
2020-12-18 14:50:50 +11:00
Joe 4b1d98e878
DEV: Adds raw plugin outlets to topic list headers (#11519) 2020-12-17 23:08:38 +08:00
David Taylor c54217f33d
FIX: Clear in-process theme cache after clearing DB cache (#11517)
If we clear the in-process cache first, it might get re-filled from the
DB before we clear the DB cache. This would be more likely on high-traffic
sites.
2020-12-17 11:02:41 +11:00
Penar Musaraj 9870a0b6a1
FIX: missing default notification level on group creation (#11512) 2020-12-16 15:52:34 -05:00
Bmorrical e7b837e7e1 Have doubled the size of the Watched Words Per Action Limit 2020-12-16 13:37:10 -05:00
Roman Rizzi 4d1bc3a491
FIX: Scroll to the last position when navigating back to the tag topic list. (#11496)
Scrolling was not working as expected after clicking the browser back button and navigating back to the tag topic list. We need to wrap the scroll inside a debounce function to ensure that the "window.pageYOffset" property is populated before our function runs.
2020-12-16 15:23:12 -03:00
Penar Musaraj 230fe0427e
DEV: More events for filtered replies (#11511) 2020-12-16 12:11:01 -05:00
Penar Musaraj d1058f4e4c
UX: Blend header colors (#11422) 2020-12-16 09:38:51 -05:00
Arpit Jalan 1e7d6ebb0f
DEV: no need to iterate through each tag for rendering (#11508)
This commit allows discourse-assign plugin to show assigned user next to
tags.
2020-12-16 18:40:58 +05:30
Penar Musaraj 89bf64c0bf
DEV: Trigger events when filtering replies (#11498) 2020-12-16 16:46:40 +11:00
Kris d870c80516
UX: Don't wrap menu text under icon (#11502) 2020-12-16 16:43:47 +11:00
Kris 9a66f24703
UX: Add title attribute to watched word input (#11505) 2020-12-16 16:43:01 +11:00
Kris f450ab6b5d
UX: Make theme install modal more responsive (#11503)
* UX: Make theme install modal more responsive

* chrome fix
2020-12-16 16:41:36 +11:00
Kris 407591719c
UX: When input placeholders are too long, truncate with ellipsis (#11504) 2020-12-16 16:40:30 +11:00
Krzysztof Kotlarek 6dd3f986b2
FIX: no email when the category is muted and mailing list is on (#11490)
When `mute_all_categories_by_default` setting is enabled we should not send mailing list until category, tag or topic is explicitly watched.
2020-12-16 09:30:21 +11:00
Kris 7588910ee6
UX: remove timeline from print view, fix header in crawler view (#11489) 2020-12-15 16:12:46 -05:00
Robin Ward 745a5d84d2
FEATURE: Allow IP anonymization via admin user controller API (#11497)
* FEATURE: Allow IP anonymization via admin user controller API

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2020-12-15 15:48:16 -05:00
Penar Musaraj 31fe0e91ad
UX: Tweaks to filtered replies (#11485)
Include the enable_filtered_replies_view site setting in the admin UI
Adds title label to in-reply-to widget
Invokes the filtered UI when using replies_to_post_number as a query
parameter
Replaces the "Show All" button icon
Fixes grammar for "Viewing 1 reply to..." label
2020-12-15 11:23:44 -05:00
Kane York 55292cfce1
FIX: Do not forbid tags in /new-topic on mobile (#11486)
Now that mobile has a UI for tags, there is no longer any reason to forbid setting them via URL.
2020-12-14 15:51:40 -08:00
Kris e02c47c4f3
UX: Show required indication consistently on signup (#11477) 2020-12-14 16:35:32 -05:00
Penar Musaraj 0e210df79a
FIX: Show correct avatar in post stream bar (#11481)
Also fixes the displayed count of posts when filtered by user.
2020-12-14 15:24:15 -05:00
Roman Rizzi b45a30c40f
FIX: Users without shared drafts access can still have access to the category. (#11476)
This is an edge-case of 9fb3629. An admin could set the shared draft category to one where both TL2 and TL3 users have access but only give shared draft access to TL3 users. If something like this happens, we need to make sure that TL2 users won't be able to see them, and they won't be listed on latest.

Before this change, `SharedDrafts` were lazily created when a destination category was selected. We now create it alongside the topic and set the destination to the same shared draft category.
2020-12-14 16:08:20 -03:00
Roman Rizzi c7b9f044a4
FEATURE: Automatically disable slow mode. (#11461)
Staff and TL4 users can decide the slow mode duration. We'll internally set a topic timer to disable it.
2020-12-14 14:06:50 -03:00
jbrw 773c51a633
FEATURE: Allow category group moderators to list/unlist topics (#11470)
* FEATURE: Allow categroy group moderators to list/unlist topics

If enabled via SiteSettings, a user belonging to a group which has been granted category group moderator privileges should be able to list/unlist topics belonging to the appropraite category.
2020-12-14 11:01:22 -05:00
Sam cfb81b7895
FIX: show retina avatars on Chrome (#11480)
chromium may report float device pixel ratio below 1.5 that is still clearly retina:

```
window.devicePixelRatio
1.4999998807907104
```

We used to round this down to 1 and not provide these browsers with retina avatars.

New algorithm is much more forgiving, anything over 1.1 gets 2x images, anything over 2.1 gets 3x images.
2020-12-14 09:39:10 +11:00
Kris ae114a6ee8
Revert "UX: When requiring user fields at signup, also mark default fields as required (#11356)" (#11475)
This reverts commit 3ef60686ed.
2020-12-11 12:09:56 -05:00
Robin Ward a51a06115a FIX: Posts with Staff Colors were excluded from the group activity
Now they are included, with the correct color applied.
2020-12-11 11:52:03 -05:00
Penar Musaraj 820b3e672a
DEV: Remove jquery.ba-resize (#11457) 2020-12-11 11:36:32 -05:00
Bianca Nenciu c4319b7b55
FIX: Show 'New' filter when 'none' subcategory set (#11474)
When set to 'none' it did not count topics from any category, but it
should count from the current one.

Follow up to df26d2e72a.
2020-12-11 18:24:32 +02:00
Robin Ward 3b81c2d470 FIX: Normalize links by converting them to lower case
The server side does this so the same link on the client side with any
upper case letters does not warn as a duplicate.
2020-12-11 11:16:51 -05:00
Bianca Nenciu df26d2e72a
FIX: Build correct topic list filter (#11473)
* FIX: 'false' value was treated as a truthy value

For example, latest.json?no_subcategories=false used to have set
no_subcategories to the string value of 'false', which is not false.

* DEV: Remove dead code

* FIX: Redirect to /none under the right conditions

These conditions are:
 - neither /all or /none present
 - only for default filter

* FIX: Build correct topic list filter

/none was never added to the topic list filter

* FIX: Do not show count for subcategories if 'none' category

* FIX: preload_key must contain /none if no_subcategories
2020-12-11 14:20:48 +02:00
David Taylor 36b4712349
FIX: Logout redirect should only be `/login` for login_required sites (#11466)
25563357 moved the logout redirect logic from the client-side to the server-side. Unfortunately the login_required check was lost during the refactoring which meant that non-login-required sites would redirect to `/login` after redirect, and immediately restart the login process. Depending on the SSO implementation, that can make it impossible for users to log out cleanly.

This commit restores the login_required check, and prevents the potential redirect loop.
2020-12-11 09:44:16 +00:00
Kris 236749add2
bulk select posts popup needs a higher z-index (#11472) 2020-12-10 21:32:52 -05:00
Krzysztof Kotlarek 3ea4f36f26
FIX: use sql_fragment instead of sanitize_sql_array (#11460)
This is a follow up to comment under this PR https://github.com/discourse/discourse/pull/11441

Sam suggested using sql_fragment instead of sanitize_sql_array
2020-12-11 10:56:26 +11:00
Roman Rizzi aa0d4ea764
Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)
This reverts commit 8b426431a4.
2020-12-10 16:48:25 -03:00
Penar Musaraj b24a77ff91
DEV: Run post stream scroll events less often (#11463)
See PR for details.
2020-12-10 14:09:11 -05:00
Penar Musaraj 8940e0f163
DEV: Fix position of filtered replies notice on DiscourseHub (#11462) 2020-12-10 13:25:09 -05:00
Jeff Wong 4858ae0b19
DEV: Expose silencer customization options to plugins (#11456)
Passes by_user to :user_unsilenced so plugins can detect whether or not
a silence was done automatically (by system user) or manually (by non-system)

Adds the ability to pass details in the action logger params so custom loggers
can pass their own details eg, in custom silence logs
2020-12-10 09:06:41 -08:00
Penar Musaraj adda53c462
FEATURE: Optional filtered replies view (#11387)
See PR for details
2020-12-10 12:02:07 -05:00
Roman Rizzi 8b426431a4
DEV: Wrap `Ember.run.debounce`. (#11352)
We want to wrap the `Ember.run.debounce` function and internally call `Ember.run` instead when running tests.

This commit changes discourseDebounce to work the same way as `Ember.run.debounce`.

Now that `discourseDebounce` works exactly like `Ember.run.debounce`, let's replace it and only use `DiscourseDebounce` from now on.

Move debounce to discourse-common to be able to reuse it in different bundles

Keep old debounce file for backwards-compatibility
2020-12-10 11:01:42 -03:00
Penar Musaraj fb2e24a77a
UX: Fix unreachable buttons on menus in Safari iOS (#11458)
Safari overlays its own nav at the bottom 10% or so of the screen. This
makes buttons in that area virtually unclickable, so to ensure buttons
there are reachable, we need to add enough bottom padding to menu panels.
2020-12-10 08:11:58 -05:00
Krzysztof Kotlarek da2a61e36c
FIX: correct tracking when mute all categories (#11441)
Currently, we have a solution for muted topics. Basically, when a post is created first we send a `muted` message to users who muted that specific topic:

https://github.com/discourse/discourse/blob/master/app/models/topic_tracking_state.rb#L91

Later, topic tracking state filters if the topic is muted or not before update state:

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/models/topic-tracking-state.js#L58:L67

That solution works quite well.

I wanted to extend it to handle `mute all categories by default` setting as well.

In that case, we should only inform the user about new topic/post when they explicitly want to.

If that setting is enabled, we would send "unmuted" message to a user who watches specific category, topic or tag. In all other cases, don't inform user about new topic as all categories are muted by default.

Meta: https://meta.discourse.org/t/threads-muted-by-mute-all-by-default-are-showing-up-as-new-but-not-visible/168324
2020-12-10 16:49:05 +11:00
Vinoth Kannan eb60fc86dc
PERF: run user merging task in a background job. (#10961)
* PERF: run user merging task in a background job.

Currently, admin page is timing out while merging the users with lots of posts.
2020-12-10 15:52:08 +11:00
Sam Saffron f1288812e8 DEV: comment out flaky test
This is failing inconsistently, remove to stabilize test suite.
2020-12-10 12:17:44 +08:00
tshenry b3bae15f4b
UX: Add full date title to fps-result date (#11455)
This is a tiny change that will allow users to hover the date element of a full page search result to see the raw date. It's not always easy to know what the exact date was "20d" ago, so hopefully this helps when it's relevant.
2020-12-09 15:41:00 -08:00
Kane York 901a45eeb3
FEATURE: Add likes, flags to user data export (#11439)
This commit is dedicated to https://twitter.com/FiloSottile/status/1335666583126073354 for reminding me that like timestamps are valuable data.

Likes additionally include the topic_id and post_number of the acted post, to aid in analysis. Flag export does not include the disposition by staff.
2020-12-09 15:34:13 -08:00
Robin Ward 7988a5f14b FIX: Don't raise an error if a custom emoji image was deleted
This could be catastrophic in production; a missing upload would mean
every request to the site would raise an error.
2020-12-09 15:40:40 -05:00
David Taylor d1d37473d4
FIX: Only block local edits for git-sourced themes (#11450)
Themes uploaded as zip files are given a row in the `remote_themes` table to store metadata, even though they are not truly remote.
2020-12-09 19:41:42 +00:00
Jordan Vidrine 0116897ac9
UI: Category Onebox styling changes (#11448)
This commit adjusts the category one box styling to be more in line with the discourse categories UI.
2020-12-09 11:36:05 -06:00
Gerhard Schlager 538e1142e7
FIX: Prevent error when primary email is missing (#11446) 2020-12-09 18:14:45 +01:00
Mark VanLandingham 521934f163
FIX: Only cache reports with exceptions for 1 minute (#11447) 2020-12-09 10:54:41 -06:00
Gerhard Schlager 06077856ce
FIX: Prevent usage of `composer-action-undefined` CSS class (#11445) 2020-12-09 15:22:53 +01:00
David Taylor 942888a10c
FEATURE: Increase maximum watched word length from 50 to 100 chars (#11437)
This is useful for more complex regex watched words

https://meta.discourse.org/t/166249
2020-12-09 17:45:34 +11:00
jbrw 4c118e4d7a
FIX: Allow for cateogry edit routes of unknown depth (#11426)
* FIX: Allow for cateogry edit routes of unknown depth

* DEV: remove unused files
2020-12-08 16:50:26 -05:00
Kane York 59ef48c0b9
FIX: Remove custom 'error' action on build-category-route/discovery (#11425)
The root cause of the issue was that the route was overriding the 'error' action from the correctly implemented handler in routes/application.js.

Remove the custom handler, and the duplicated template logic for displaying the errorHtml.

Fixes: e16b3da04a
2020-12-08 11:58:36 -08:00
tshenry a446e0fde1
FEATURE: Link to text customization when editing system badges (#11345)
Being that system badges ship with every instance of Discourse, we've opted to define the name, description, and long description in our locales files to promote translation into other languages. When an admin visited the overview page of a system badge in their admin panel, they were met with disabled inputs for these text properties. The problem is that we failed to educate the admin that the text needs to be managed via the site text customization settings. 

This change adds a small "Customize Text" link under theses inputs that takes the admin to the specific site text customization where they can make desired changes.
2020-12-08 11:55:49 -08:00
Penar Musaraj 3e1b84963d
DEV: Remove duplicate (and deprecated) SK option (#11435) 2020-12-08 13:21:02 -05:00
Mark VanLandingham 9f786306bd
FIX: Actually error when topic timer time is in the past (#11434) 2020-12-08 11:13:45 -06:00
Joffrey JAFFEUX b824af02d4
FIX: removes extra slashes from URL (#11433)
This is similar to a fix used in ember core: https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/routing/lib/location/history_location.ts#L140

It will prevent a URL with a double slash to hang and end up in a 404.
2020-12-08 17:47:43 +01:00
Bianca Nenciu 9df2bce538
FIX: Generate correct prev and next topics page URL (#11431)
It did not work well for category + tags pages.
2020-12-08 17:34:28 +02:00
Arpit Jalan f62ea77666
Revert "DEV: no need to iterate through each tag for rendering" (#11432)
This reverts commit a19a3adf9e.

Need to look into failing tests.
2020-12-08 20:35:46 +05:30
Arpit Jalan a19a3adf9e
DEV: no need to iterate through each tag for rendering (#11428)
This commit allows discourse-assign plugin to show assigned user next
to tags.
2020-12-08 18:41:26 +05:30
Sam Saffron 1cf057fb1c DEV: lint file
We enforce ordering of imports in our linter, missed this on a merge
2020-12-08 09:16:28 +08:00
Joffrey JAFFEUX daefa3d25a
UX: makes sk components full width on users admin page (#11413) 2020-12-08 11:18:02 +11:00
Jarek Radosz 6b464d1b8d
FIX: Restore dismissing the first notification (#10433)
* FIX: Restore dismissing the first notification

Reverts the temporary fix (8e4fea897e) and restores the feature introduced in e638d43f0a.

The issue that was the reason for the revert (https://meta.discourse.org/t/logins-redirects-to-missing-notifications-page/149718) was a combination of two bugs:

1. Fixed in this commit - the click listener was accidentally registered also for logged-out users. This meant that the first click on a page always trigger an AJAX call to the notifications endpoint (`/notifications?recent=true&limit=5`), which returned a 403 error. Now, this code is run only when the user is logged in.

2. A still unknown bug that I could not reproduce, which was somehow setting the login redirect cookie to the URL of that previously failed AJAX request.
2020-12-08 11:11:35 +11:00
David Taylor c69bb5d5be
DEV: Always enqueue sidekiq jobs after database transaction commit (#11293)
When jobs are enqueued inside a transaction, it's possible that they will be executed before the necessary data is available in the database. This commit ensures all jobs are enqueued in an ActiveRecord after_commit hook.

One potential downside here is if the job fails to enqueue, the transaction will no longer be aborted. However, the chance of that happening is reasonably low, and the impact is significantly lower than the current issue where jobs are scheduled before their data is ready.
2020-12-08 11:05:01 +11:00
Bianca Nenciu 812d047c60
FIX: Follow open in new tab site setting for bio links (#11418) 2020-12-08 10:56:14 +11:00
Joe 5ab6ef9765
FEATURE: Adds back button to theme editor (#11416) 2020-12-08 10:54:44 +11:00
Kris 3ef60686ed
UX: When requiring user fields at signup, also mark default fields as required (#11356) 2020-12-07 18:26:31 -05:00
Kris 0302de058c
UX: Fix invite checkbox width issue (#11371) 2020-12-07 18:08:04 -05:00
Kane York e16b3da04a
FIX: Stop category 404s from breaking the router (#11424)
The propagated promise failure from model() caused the router to reject future route transitions, even though it correctly routed to the last-resort 404 page.

Co-authored-by: Jeff Wong <awole20@gmail.com>
2020-12-07 14:22:39 -08:00
Krzysztof Kotlarek d5ba854c91
FIX: hide user id when hide_email_address_taken (#11417)
We should always hide user_id in response when `hide_email_address_taken` setting is enabled. Currently, it can be used to determine if the email was used or not.
2020-12-08 08:25:35 +11:00
Penar Musaraj dd9ec827e5
FIX: Adjust reviewable menu placement on mobile (#11420)
Shows the actions dropdown above the triggering button to avoid some
options from displaying below mobile navigation in DiscourseHub.
2020-12-07 13:39:18 -05:00
Penar Musaraj 490e1cfbbb
DEV: Use tag renderer in tags filter dropdown (#11378)
A small change that would allow components to extend the tag
display in the filter dropdown, like they can in other contexts.

Was requested in the tag icons component, see
https://meta.discourse.org/t/tag-icons-component/109757/60?u=pmusaraj

The PR also standardises tag styling in select-kit dropdowns.
2020-12-07 12:10:21 -05:00
David Taylor 8b33e2f73d
FIX: Include locale in cache key for not_found_topics (#11406)
This ensures that users are only served cached content in their own language. This commit also refactors to make use of the `Discourse.cache` framework rather than direct redis access
2020-12-07 12:24:18 +00:00
Bianca Nenciu 154c8c3fef
FIX: Use CDN for custom emojis (#11401) 2020-12-07 13:36:08 +02:00
Bianca Nenciu ed52577e1c
FIX: Group#flair_url must be a real URL (#11400)
It used to be a short URL, but that did not work with the lightbox
in {{image-uploader}}.
2020-12-07 13:35:41 +02:00
Bianca Nenciu da74b3e14b
FEATURE: Add after-topic-list-body plugin-outlet (#11410) 2020-12-07 13:33:24 +02:00
Joffrey JAFFEUX 54519a2976
FIX: do not replace smiling_face by slight_smile (#11412) 2020-12-06 18:28:39 +01:00
Roman Rizzi 4aeb3ef8e0
FIX: Trigger an event when a post is bookmarked. (#11407)
When we renamed BookmarkWithReminder to Bookmark in ca539fd, the bookmark event trigger was removed with the old code, and we forgot to add it again.
2020-12-04 15:09:20 -03:00
Roman Rizzi 4d9686c494
FEATURE: Reviewed by filter. (#11405)
New reviewable filter to only display reviewables handled by a specific user.
2020-12-04 14:09:05 -03:00
Gerhard Schlager 1960fc5333
FIX: Stop using duplicate composer button ID (#11404)
"quote" is used by the button added in `composer-editor`.
bbe5d8d5cf/app/assets/javascripts/discourse/app/components/composer-editor.js (L875-L882)
2020-12-04 00:05:43 +01:00
Krzysztof Kotlarek e4d51e5b0a
FIX: correct link in the notification about moved post (#11399)
Notification is created by a job. If the job is evaluated before changes are committed to a database, a notification will have an incorrect URL.

Therefore, the job should be lodged in enqueue_jobs method which is triggered after the transaction:

```ruby
Topic.transaction do
  move_posts_to topic
end
add_allowed_users(participants) if participants.present? && @move_to_pm
enqueue_jobs(topic)
```

I improved a little bit specs to ensure that the destination topic_id is set. However, that tests are passing even without code improvements. I couldn't find an easy way to "delay" database transaction.

Meta: https://meta.discourse.org/t/bug-with-notifications-for-moved-posts/168937
2020-12-04 08:43:42 +11:00
Gerhard Schlager bcbe2de646
DEV: Make it easier to customize omniauth login complete handler in plugins (#11403)
It also removes the unused `provider` variable and stops Discourse from redirecting to /login after a login.
2020-12-03 22:27:55 +01:00
Mark VanLandingham acbc47ef36
FIX: Load .js files from plugins in qunit testing env (#11304) 2020-12-03 10:25:42 -06:00
Krzysztof Kotlarek 9c5ee4923b
FEATURE: silently close topic (#11392)
New TopicTimer to silently close topic. It will be used by discourse-solved plugin

Meta: https://meta.discourse.org/t/allow-auto-close-for-solved-to-do-so-silently/169300
2020-12-03 10:43:19 +11:00
jbrw 1c87038255
FEATURE: Allow Category Group Moderators to edit topic titles (#11340)
* FEATURE: Allow Category Group Moderators to edit topic titles

Adds category group moderators to the topic guardian’s `can_edit` method.

The value of `can_edit` is returned by the topic view serializer, and this value determines whether the current user can edit the title/category/tags of the topic directly (which category group moderators could already do by editing the first post of a topic).

Note that the value of `can_edit` is now always returned by the topic view serializer (ie, for both true and false values) to cover the case where a topic is moved out of a category that a category group moderator has permissions on, so that when the topic is reloaded the UI picks up that `can_edit` is now false, and thus the edit icon should no longer be displayed.

* DEV: Add a comment explaining why `can_edit` is always returned
2020-12-02 17:21:59 -05:00
Jordan Vidrine 2b66a4364d
Update header_primary in shades of blue (#11391)
This commit changes header_primary to a shade of blue, fixing contrast issues with some text colors in the header.
2020-12-02 09:22:30 -06:00
Arpit Jalan d627cc6233
Fix typo. (#11395) 2020-12-02 19:08:59 +05:30