Commit Graph

25226 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
0ce9fd12d0 DEV: Remove depreciation warning in user-topics-lists controller.
```
The <(unknown):ember849>#canBulkSelect computed property was just overriden. This removes the computed property and replaces it with a plain value, and has been deprecated.
```

Follow-up to 43058db3ca
2021-07-26 09:14:55 +08:00
Andrei Prigorshnev
f79eb207a6 FIX: Don't show the Tis Weekend option in date pickers on Sundays 2021-07-26 08:57:29 +08:00
Andrei Prigorshnev
814781780d FIX: Don't show the Later This Week option in date pickers on Sundays 2021-07-26 08:55:18 +08:00
Simon Cossar
bbf47345f8
Add min-width rule to fix header display issues on the Android Gmail app (#13827) 2021-07-23 14:21:03 -07:00
Blake Erickson
6ac3f1f7b5
DEV: Return 400 instead of 500 for invalid top period (#13828)
* DEV: Return 400 instead of 500 for invalid top period

This change will prevent a fatal 500 error when passing in an invalid
period param value to the `/top` route.

* Check if the method exists first

I couldn't get `ListController.respond_to?` to work, but was still able
to check if the method exists with
`ListController.action_methods.include?`. This way we can avoid relying
on the `NoMethodError` exception which may be raised during the course
of executing the method.

* Just check if the period param value is valid

* Use the new TopTopic.validate_period method
2021-07-23 14:58:10 -06:00
Andrei Prigorshnev
bd4b87245e
DEV: add more tests for future-date-input-selector (#13836)
This PR contains only tests. These tests are from my old PR with refactoring of future-date-input-selector. That PR was closed because we had some changes in our planes about our time-pickers and additionally these tests were flaky.

Tests in this PR aren't flaky, since they use fake time moments in the future. Tests just document current behaviour of future-date-input-selector.
2021-07-23 22:44:23 +04:00
Robin Ward
7b45a5ce55 FIX: Better and more secure validation of periods for TopicQuery
Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
2021-07-23 14:24:44 -04:00
Kris
c7beb0b9a6
UX: prioritize moderator bg color in PMs (#13833) 2021-07-23 13:06:48 -04:00
Kris
7d9d4bcb6d
FIX: Show bulk button on PMs for all users (#13801) 2021-07-23 12:04:18 -04:00
Bianca Nenciu
2c10809244
FIX: Long poll if window becomes active (#13825)
This commit fixes two bugs. The first one is that onPresenceChange was
called with invalid arguments and it did not register a callback. The
second bug is that it triggered the wrong visibilitychange event. The
function it tried to call does not exist in all versions of MessageBus.
It is safer to trigger an event instead because that exists in all
versions.
2021-07-23 15:52:10 +03:00
Mark VanLandingham
9165f0a0f8
DEV: Export pretty text function for plugin use (#13826) 2021-07-22 14:06:46 -05:00
Andrei Prigorshnev
8bc01c1bb5
DEV: extract leave_group method from the group#remove_member method (#13823)
* Copy remove_member to new `leave` method

* Remove unneeded code from the leave method

* Rearrange the leave method

* Remove unneeded code from the remove_member method

* Add tests

* Implement on the client side
2021-07-22 20:14:18 +04:00
Dan Ungureanu
27211ee7bb
FIX: Ensure browser history contains correct URLs (#13367)
Clicking on an incomplete link to a topic (/t/ID or /t/SLUG) from
another post could replace current history entry or create two: one for
the incomplete URL and another one for the correct one. Going back was
either impossible or took the user to a redirect loop, redirected back
to /t/ID which redirected them again to /t/SLUG/ID.
2021-07-22 18:59:59 +03:00
Andrei Prigorshnev
73e8183ffb
FIX: update the list of users after user joined group (#13822)
* Make UI update after user have joined a public group

* Check if a group exists in the join method
2021-07-22 18:48:26 +04:00
Bianca Nenciu
18c32a809b
FIX: Validate email_accent_bg_color color (#13778)
Using an invalid value was allowed. This commit tries to automatically
fix the color by adding missing # symbol or will show an error to the
user if it is not possible and it is not a CSS color either.
2021-07-22 17:42:47 +03:00
Andrei Prigorshnev
3cf7a3766a
DEV: extract join_group method from groups#add_members method (#13807)
* Copy the add_members method to the new join method

* Remove unneeded code from the join method

* Rearrange the join method

* Remove unneeded stuff from the add_members method

* Extract add_user_to_group method

* Implement of the client side

* Tests

* Doesn't inline users.uniq

* Return promise from join.then()

* Remove unnecessary begin and end

* Revert "Return promise from join.then()"

This reverts commit bda84d8d

* Remove variable already_in_group
2021-07-22 11:11:23 +04:00
Joffrey JAFFEUX
5eb6e9281a
FIX: manually adds frowning_face_with_open_mouth for apple (#13528) 2021-07-21 23:27:20 +02:00
Robin Ward
78ab3f37b8 FIX: Don't proxy /qunit URL when using Ember CLI
This is confusing because you're running the tests on the older version
of Ember. Use `/tests` for Ember CLI, and `/qunit` when using Rails'
asset pipeline (but only if REALLY necessary!)
2021-07-21 15:21:09 -04:00
Penar Musaraj
8a470e508e
UX: Improve quick search suggestions (#13813) 2021-07-21 14:00:27 -04:00
Robin Ward
4f328089d6 FIX: Force timeline/progress to re-insert into DOM on topic change
We have CSS animations which depend on the timeline/progress being
completely cleared when navigating from one topic directly to another.
This always worked because our loading component would clear the entire page
between topics but with our new experimental loading component the DOM was being
re-used.

This patch ensures that the timeline is removed completely from the DOM
if the topic changes.
2021-07-21 12:37:40 -04:00
Kris
5ebae8a64d
need to check if currentUser exists (#13814) 2021-07-21 12:26:28 -04:00
Kris
aa6daeaa3e
FEATURE: New style for personal messages (#13800) 2021-07-21 10:41:04 -04:00
Penar Musaraj
2ce2c83bc9
FIX: Show user filter hints when typing @ in search (#13799)
Will show the last 6 seen users as filtering suggestions when typing @ in quick search. (Previously the user suggestion required a character after the @.)

This also adds a default limit of 6 to the user search query, previously the backend was returning 20 results but a maximum of 6 results was being shown anyway.
2021-07-21 09:14:53 -04:00
Joffrey JAFFEUX
519528daa2
FIX: allows to use icon-picker in wizard (#13786)
- inlines dasherize helper in sk
- uses an ajax helper to load wizard's ajax lib when in wizard
- amends wizard's ajax lib to work with string as first arg
- disabled loading spinner in wizard as it's not available
2021-07-21 13:49:21 +02:00
Bianca Nenciu
4da0a33524
FIX: Allow only groups with flairs to be selected (#13744)
It used the same permission check as for primary groups which is
wrong because not all groups that can be primary have a flair.
2021-07-21 14:41:04 +03:00
Andrei Prigorshnev
d9faae483d
FIX: Consider 100 years suspension as permanent (instead of 500-years suspension) (#13808)
That'll be consistent with recent changes in https://github.com/discourse/discourse/pull/13776
2021-07-21 15:28:47 +04:00
Krzysztof Kotlarek
40f6ceb6f2
FIX: display warning when SSO email is different from invite email (#13804)
In this commit, we skipped frontend validation when email is obfuscated:
https://github.com/discourse/discourse/commit/534008ba24c

However, if email from SSO is different from email from invite, we should still display warning.
2021-07-21 17:03:04 +10:00
mintsaxon
7162ecfb04 FEATURE: Per-category default slow mode duration for topics.
When configured, all topics in the category inherits the slow mode
duration from the category's default.

Note that currently there is no way to remove the slow mode from the
topics once it has been set.
2021-07-21 12:32:07 +08:00
Alan Guo Xiang Tan
0d8144b62b DEV: Improve logging of errors in Jobs::ProcessUserNotificationSchedules
Gives us the actual error and backtrace to work with. Otherwise, the
logging of the error is not useful at all.
2021-07-21 12:20:44 +08:00
Kris
5f6b9e36ed
UX: New text and style for dominating topic message (#13789) 2021-07-20 13:58:38 -04:00
Mark VanLandingham
af5cf5ec2a
FIX: User directory - correct variable names (#13798) 2021-07-20 09:58:54 -05:00
Andrei Prigorshnev
1a8c949900
UX: suspend forever time period messages (#13776)
When the Forever option is selected for suspending a user, the user is suspended for 1000 years. Without customizing the site’s text, this time period is displayed to the user in the suspension email that is sent to the user, and if the user attempts to log back into the site. Telling someone that they have been suspended for 1000 years seems likely to come across as a bad attempt at humour.

This PR special case messages when a user suspended or silenced forever.
2021-07-20 14:42:08 +04:00
Jarek Radosz
351ef6c2cc
UX: Tweak groups page css (#13775)
Improves icon-name alignment.
2021-07-20 12:26:52 +02:00
Bianca Nenciu
3d387d7891
FIX: Serialize flair group ID for preferences page (#13741)
Staff viewing the user preferences page of other users did not see the
selected flair because that information was not serialized for them.
2021-07-20 13:06:40 +03:00
Kris
b335211038
FEATURE: Add input name so 1password ignores input (#13790) 2021-07-20 15:06:05 +10:00
Martin Brennan
0dadd61d27
FIX: Change email from to not have via site_name for group SMTP (#13788)
We now use the group's full name in group SMTP emails, so we are dropping the via #{site_name}. If group owners still want this they can just change the full name of the group.
2021-07-20 11:56:04 +10:00
Penar Musaraj
e3144fc0c7
FIX: Toggle search menu when click the same button (#13781) 2021-07-19 19:01:09 -04:00
Kris
fe5be427c3
Update class name to avoid ad blocker (#13785) 2021-07-19 16:15:09 -04:00
Mark VanLandingham
80950d7b28
DEV: Add chat_mention notification type (#13784) 2021-07-19 14:52:12 -05:00
Michael Brown
aa12d12c0b discourse/discourse change from 'master' to 'main': update fixture data 2021-07-19 11:46:15 -04:00
Michael Brown
5f7e60d9dc discourse/discourse change from 'master' to 'main' 2021-07-19 11:46:15 -04:00
Alan Guo Xiang Tan
1472e47aae
FIX: Remove hardcoded value when displaying incoming messages count. (#13774)
Follow-up to 902d0e1e3a.
2021-07-19 14:59:05 +08:00
Alan Guo Xiang Tan
a1047f5ef4
FEATURE: Add new plugin API to allow plugins to extend Site#categories (#13773) 2021-07-19 13:54:19 +08:00
Kris
8de8989576
UX: consistent share modal & popup, refactoring (#13759) 2021-07-19 09:34:44 +08:00
Osama Sayegh
1c82989f77
FEATURE: Add filter box to the themes/components list (#13767) 2021-07-19 09:33:58 +08:00
Robin Ward
6d999fb087
DEV: Don't use chunked encoding in development mode (#13768)
The express server and http-proxy seem to buffer quite a bit and that
slows down message bus.
2021-07-19 09:31:22 +08:00
Penar Musaraj
4e9b4136b0
FIX: Alignment of user badges in user card (#13770) 2021-07-19 09:30:35 +08:00
Neil Lalonde
b0f06b8ed0
FIX: don't allow category and tag tracking settings on staged users (#13688)
Configuring staged users to watch categories and tags is a way to sign
them up to get many emails. These emails may be unwanted and get marked
as spam, hurting the site's email deliverability.
Users can opt-in to email notifications by logging on to their
account and configuring their own preferences.

If staff need to be able to configure these preferences on behalf of
staged users, the "allow changing staged user tracking" site setting
can be enabled. Default is to not allow it.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2021-07-16 14:50:40 -04:00
Rafael dos Santos Silva
e12b00eab7
FEATURE: Stop checking referer for embeds (#13756)
Flips content_security_policy_frame_ancestors default to enabled, and
removes HTTP_REFERER checks on embed requests, as the new referer
privacy options made the check fragile.
2021-07-16 15:25:49 -03:00
Rafael dos Santos Silva
216dc99f18
FIX: Media optimization setting was misnamed (#13766) 2021-07-16 15:13:16 -03:00
Andrei Prigorshnev
27b97e4f64
DEV: add pick-files-button component (#13764)
* DEV: add pick-files-button component
* Scope querySelector to the component, add removeEventListener, fix formatting
2021-07-16 21:50:50 +04:00
Rafael dos Santos Silva
366238bb81
FIX: Disable the post submit button during image processing properly (#13765)
There was a UI bug when submitting multiple files in the same batch. We
would remove the disabled status of the submit button after the previous
file was sucesfully uploaded and the next one was still mid
optimization.

Reported at https://meta.discourse.org/t/-/194841/15?u=falco
2021-07-16 14:19:59 -03:00
Dan Ungureanu
079d2af55f
FIX: Clear stale status of reloaded reviewables (#13750)
* FIX: Clear stale status of reloaded reviewables

Navigating away from and back to the reviewables reloaded Reviewable
records, but did not clear the "stale" attribute.

* FEATURE: Show user who last acted on reviewable

When a user acts on a reviewable, all other clients are notified and a
generic "reviewable was resolved by someone" notice was shown instead of
the buttons. There is no need to keep secret the username of the acting
user.
2021-07-16 19:57:12 +03:00
Mark VanLandingham
9b15affaae
DEV: Plugin outlet in topic-status component (#13763) 2021-07-16 11:10:35 -05:00
David Taylor
422fa1b1d8 FIX: Use correct setting for DiscourseConnect card background overrides 2021-07-16 16:19:09 +01:00
Penar Musaraj
438a762956
FEATURE: Add assistant to quick search widget (#13650)
Replaces the autocomplete overlay for categories and usernames on the search input and adds suggestions as items in the search results instead. Also adds the same behaviour for @mentions as well as special `in: status: order:` keywords. See PR for more details.
2021-07-16 11:08:20 -04:00
Penar Musaraj
361c8be547
PERF: Add scheduled job to delete old stylesheet cache rows (#13747) 2021-07-16 10:58:01 -04:00
Osama Sayegh
810892139b
FIX: Ascending/descending sorting in the group membership requests page
The `GroupsController#members` endpoint accepts a `desc` parameter to determine how members are sorted, but it's been deprecated in favor of a boolean `asc` parameter. However, in the frontend, specifically the group membership requests page was not updated entirely to use the `asc` param and it still passes a `desc` param when changing how group requests are sorted.

This commit updates the `group-requests` Ember controller so it passes a boolean `asc` param and removes all references of `desc`. The controller view/template has already been updated to use `asc`:

207c3085fc/app/assets/javascripts/discourse/app/templates/group-requests.hbs (L15-L16)
2021-07-16 11:02:24 +03:00
Andrei Prigorshnev
c4d7545f35
FIX: when updating timestamps on topic set a correct bump date (#13746)
There was a bug with changing timestamps using the topic wrench button. Under some circumstances, a topic was disappearing from the top of the latest tab after changing timestamps. Steps to reproduce:
- Choose a topic on the latest tab (the topic should be created some time ago, but has recent posts)
- Change topic timestamps (for example, move them one day forward):
- Go back to the latest tab and see that topic has disappeared.

This PR fixes this. We were setting topic.bumped_at to the timestamp user specified on the modal. This is incorrect. Instead, we should be setting topic.bumped_at to the created_at timestamp of the last regular (not a whisper and so on) post on the topic.
2021-07-16 11:56:51 +04:00
Penar Musaraj
207c3085fc
DEV: Refactor stylesheet live-reloading (#13755)
We have had reports of tabs freezing in Firefox, and reporting an error
in this line. I haven't been able to reproduce, but I suspect the
`forEach` loop is at the heart of the issue, so I have replaced it with
(hopefully) a safer call.

* More refactoring
* Do not reload stylesheets with unchanged filenames
* Select last matching stylesheet
2021-07-16 13:43:31 +10:00
Andrei Prigorshnev
1cadae3879
FIX: simplify and improve choosing favorite badges (#13743)
* No need to return anything except a status code from the server

* Switch a badge state before sending a request and then switch it back in case of an error
2021-07-16 11:13:00 +08:00
David Taylor
444e21b12d
FEATURE: Add 'users.list' API scope (#13742) 2021-07-16 11:10:04 +08:00
Osama Sayegh
7323c65d53
FIX: Debounce group name validation correctly (#13757) 2021-07-16 10:51:13 +08:00
Jarek Radosz
c458cebfc3
FIX: User's "Top badges" grid (#13752)
Fixes a regression introduced in #13719
2021-07-15 21:16:35 +02:00
Penar Musaraj
55bed48917
DEV: Remove stylesheet controller non-prod code (#13745) 2021-07-15 12:52:40 -04:00
Vinoth Kannan
d6fc39c886
FEATURE: update existing users when group default notifications changed. (#13434)
Currently, the changes will only affect the users added after.
2021-07-15 19:53:57 +05:30
Joe
ebce983a26
DEV: pass more arguments to before-create-topic-button (#13740)
This commit passes a few more arguments to the `before-create-topic-button` outlet.

We need these arguments to avoid template overrides in themes.
2021-07-15 21:11:59 +08:00
Andrei Prigorshnev
5cd447695e
FIX: problems with choosing favorite badges (#13731) 2021-07-15 14:51:44 +04:00
Osama Sayegh
31aa701518
FEATURE: Add option to grant badge multiple times to users using Bulk Award (#13571)
Currently when bulk-awarding a badge that can be granted multiple times, users in the CSV file are granted the badge once no matter how many times they're listed in the file and only if they don't have the badge already.

This PR adds a new option to the Badge Bulk Award feature so that it's possible to grant users a badge even if they already have the badge and as many times as they appear in the CSV file.
2021-07-15 05:53:26 +03:00
Kris
0109edb847
UX: stop imgur/google photo mobile onebox overflow (#13738) 2021-07-15 09:14:05 +08:00
Osama Sayegh
2484abddb6
FIX: Assets for the theme tests page are not compressed (#13736)
A couple of weeks we made a change that skipped compressing assets used by the theme qunit page: https://github.com/discourse/discourse/pull/13619. This is a follow-up PR to stop the application helper from generating the assets for the theme qunit page with `.br` or `.gzip` extensions when a site uses S3 as a CDN.
2021-07-14 22:52:35 +03:00
Penar Musaraj
f7ab852e12
FIX: Issues with custom icons in themes (#13732)
Fixes two issues:
- ignores invalid XML in custom icon sprite SVG file (and outputs an error if sprite was uploaded via admin UI)
- clears SVG sprite cache when deleting an `icons-sprite` upload in a theme
2021-07-14 15:18:29 -04:00
Penar Musaraj
7d43e51821
FIX: Remove button to dismiss theme error messages (#13734) 2021-07-14 15:17:32 -04:00
Jarek Radosz
f89b135a21
FIX: user/badges grid fix (#13729)
No more special CSS just for this path.
2021-07-14 16:43:24 +02:00
Bianca Nenciu
2318bd66a7
FIX: Use array to keep best link for each onebox (#13717)
Use a Map to hold the best link element for each Onebox HTML element.

Using an Object did not work as intended because Object can use only
Strings or Symbols as keys. Using HTML elements (representing oneboxes)
as keys most probably converted them to some generic string and sometimes
different Oneboxes were associated same key. It seems to be browser and
content dependent, without any clear indication of what is happening
internally.

This bug caused link counts to show only for the last Onebox because
the best link from the last Onebox was considered for all the other
Oneboxes.
2021-07-14 12:51:55 +03:00
Jordan Vidrine
1fb48fc9a6
A11Y: Add labels where needed (#13686) 2021-07-14 14:19:21 +08:00
Jarek Radosz
a2425487b2
UX: Make sure there's always a margin on badges page (#13693) 2021-07-14 13:45:26 +08:00
Jarek Radosz
c3045e6828
FIX: Don't try to load badges if there none left (#13695)
Converted `actions` hash to `@action` and added:

```
if (!this.canLoadMore) {
  return;
}
```
2021-07-14 14:42:31 +10:00
Martin Brennan
068889cb5f
FIX: Email threads sometimes not grouping for group SMTP (#13727)
This PR fixes a couple of issues related to group SMTP:

1. When running the group SMTP job, we were exiting early if the email was for the OP because of an IMAP race condition. However this causes issues when replying as a new topic for an existing SMTP topic, as the recipient does not get the OP email which can cause threading problems.
2. When sending emails for a new topic spun out like the issue in 1., we are not maintaining the original subject/topic title because that is based on the incoming email record, which we were not doing because the group SMTP email was never sent because of issue 1.
2021-07-14 14:23:14 +10:00
Bianca Nenciu
d11fe6fde5
FIX: Use rem for font sizes in post headings (#13720)
Size of headings increased proportionally with their nesting because
their size was relative to the parent element (used em). This commit
makes headings from posts use rem instead which are relative to the
root HTML element.

<h1><div><h1>test</h1></div></h1> looks the same as <h1>test</h1> now.
2021-07-14 11:15:58 +10:00
Jarek Radosz
15320d432b
DEV: Make badges grid a grid (#13719)
Even grid gaps, more space for text, removed on-hover shadow

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2021-07-13 21:58:51 +02:00
Gerhard Schlager
9c8645b9e1 FIX: Don't downcase "all groups" in dropdown
Because this doesn't make sense in languages other than English
2021-07-13 20:29:07 +02:00
Gerhard Schlager
6805cc287e FIX: Allow uppercase letters in automatic group names
`User.username_exists?` always converts to lowercase during lookup, so this change should be safe.
2021-07-13 20:29:07 +02:00
Bianca Nenciu
5bff65aa69
FIX: Do not show invalid option in flair chooser (#13725)
Both of the commits in this PR are meant to fix the problem of invalid
option being shown in the flair chooser. An invalid option can be shown
if at some point it was a valid one - a group with a flair that was
later changed by an admin and flair was removed. The other option an
invalid option can be selected is if the user had a primary group when
the migration ran and copied the same value to the flair_group_id
column.

* FIX: Set flair_group_id only if group has flair

Follow up to 4ba93aac66.

* FIX: Do not show invalid option in flair chooser

If selected flair group became unavailable because the flair was removed
then the option would still be selected and visible as an ID only.
2021-07-13 19:22:39 +03:00
Mark VanLandingham
5ea98b4df3
DEV: App event when modal is closed (#13722) 2021-07-13 09:57:10 -05:00
Guhyoun Nam
0dc96ce817
FEATURE: Setting to allow moderators to change post ownership (#13708) 2021-07-13 09:40:11 -05:00
David Taylor
800c6e1a68 PERF: Improve topic_user.liked update performance when moving posts
Previously we would re-calculate topic_user.liked for all users who have ever viewed the source or destination topic. This can be very expensive on large sites. Instead, we can use the array of moved post ids to find which users are actually affected by the move, and restrict the update query to only check/update their records.

On an example site this reduced the `update_post_action_cache` time from ~27s to 300ms
2021-07-13 12:30:38 +01:00
David Taylor
3d049245af PERF: Improve post_timing performance when moving posts
Scanning for all possible invalid post_timing records in the destination topics can be a very expensive operation. The main aim is to avoid the data clashing with soon-to-be-moved posts, so we can reduce the scope of the query by targeting only rows which would actually cause a clash. post_timings has an index on (topic_id, post_number), so this is very fast.

On an example site, this reduced the query from ~6s to <10ms
2021-07-13 12:30:38 +01:00
Bianca Nenciu
21cf1b78da
FIX: Various translation string fixes (#13715)
Make small action post description a correct sentence. Replace true and
false in site settings description with enabled and disabled.
2021-07-13 12:52:13 +03:00
Martin Brennan
7911124d3d
FEATURE: Uppy image uploader with UppyUploadMixin (#13656)
This PR adds the first use of Uppy in our codebase, hidden behind a enable_experimental_image_uploader site setting. When the setting is enabled only the user card background uploader will use the new uppy-image-uploader component added in this PR.

I've introduced an UppyUpload mixin that has feature parity with the existing Upload mixin, and improves it slightly to deal with multiple/single file distinctions and validations better. For now, this just supports the XHRUpload plugin for uppy, which keeps our existing POST to /uploads.json.
2021-07-13 12:22:00 +10:00
Kris
e2d04a8592
UX: Improve share modal consistency (#13689) 2021-07-12 20:55:59 -04:00
Roman Rizzi
024911cfc4
UX: Move the skip auth confirmation spinner inside the modal body. (#13710) 2021-07-12 20:21:57 -03:00
Mark VanLandingham
6a9dc556bc
DEV: DiscourseEvent for category updated (#13707) 2021-07-12 14:23:07 -05:00
Jeff Wong
d87a0216bb
FEATURE: Penalty history improvements (#13359)
* FEATURE: add penalty history when silencing a user

Display penalty history (last 6 months) when silencing/suspending a user

* FEATURE: allow default penalty values to be chosen

Adds a site setting that designates default penalty values in hours.

Silence/suspend modals will auto-fill in the default values, but otherwise
will still allow moderators to pick and overwrite values as normal.

First silence/suspend: first value
Second silence/suspend: second value
etc.

Penalty counts are forgiven at the same rate as tl3 promotion requirements do.

Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
2021-07-12 11:36:56 -07:00
Kris
729a9856f8
UX: Add copy button to theme public key (#13690) 2021-07-12 14:34:08 -04:00
Bianca Nenciu
2f5e63fd7f
FIX: Use created_at if last_posted_at is null (#13668)
Topic timeline showed Jan 1970 as last posted time if all posts of a
topic were deleted or whispers.
2021-07-12 19:35:40 +03:00
Arpit Jalan
953fd2cb50
FEATURE: add title tag for group detail page (#13702) 2021-07-12 20:05:57 +05:30
Andrei Prigorshnev
d9eb37be70
UX: improve the link to the preferences page on the new and unread tabs (#13701)
When the New tab and the Unread tab are empty we show educational messages with links to the preferences page. Both links lead to preferences/account page. In fact, settings that changes behaviour of the New and the Unread tab are on the preferences/notifications page. This PR makes links lead there.
2021-07-12 16:52:23 +04:00
Jarek Radosz
efac01d259
FIX: Scroll to top on badge pages (#13694)
…so we don't end up at a random point on the page after a transition.
2021-07-12 10:48:23 +10:00
Kris
aebc6164fc
UX: Add success state to copy button (#13691)
Replaces the message "Topic link copied" with a more intuitive delayed change of the copy button to a success tick.
2021-07-12 10:47:24 +10:00