Commit Graph

21990 Commits

Author SHA1 Message Date
Sam Saffron
8dccf0521c
Revert "PERF: stop firing superfluous onSelectionChange"
This reverts commit fa96054acf.

Sadly this fails a test case, we may have to hunt up all the
parentElements to check for the cooked class to perform the
bypass
2020-04-23 18:16:13 +10:00
Sam Saffron
fa96054acf
PERF: stop firing superfluous onSelectionChange
onSelectionChanged fires a debounced event that calls window.getSelection()

window.getSelection() is reasonably expensive. There is no reason to do any
of this work if we have an input field focused, that is not how quote works
2020-04-23 17:51:23 +10:00
Joffrey JAFFEUX
7132c50f3b
FIX: prevents constant composer reloading (#9528) 2020-04-23 07:54:29 +02:00
Sam Saffron
d69ec186b9
Revert "DEV: DiscourseEvents fired when users are added/removed from groups (#9522)"
This reverts commit 54ec9f7009.

The commit clashes with a previous implementation of the same event
2020-04-23 15:06:55 +10:00
Krzysztof Kotlarek
52c1d7337e
FEATURE: don't display new/unread notification for muted topics (#9482)
* FEATURE: don't display new/unread notification for muted topics

Currently, even if user mute topic, when a new reply to that topic arrives, the user will get "See 1 new or updated topic" message. After clicking on that link, nothing is visible (because the topic is muted)

To solve that problem, we will send background message to all users who recently muted that topic that update is coming and they can ignore the next message about that topic.
2020-04-23 14:57:35 +10:00
Mark VanLandingham
54ec9f7009
DEV: DiscourseEvents fired when users are added/removed from groups (#9522) 2020-04-23 14:53:31 +10:00
Joffrey JAFFEUX
3bbd8b1258
UX: rework date time input range (#9524) 2020-04-22 22:17:53 +02:00
Blake Erickson
9cbbaf4237 FIX: Don't throw 500 for invalid website url input
It's possible to cause a 500 error by putting in weird characters in the
input field for updating a users website on their profile.

Normal invalid input like not including the domain extension is already
handled by the user_profile model validation. This fix ensures a server
error doesn't occur for weird input characters.
2020-04-22 13:57:56 -06:00
Joffrey JAFFEUX
00f632fb0d
REFACTOR: s/translatedfilterPlaceholder/translatedFilterPlaceholder (#9521) 2020-04-22 20:39:55 +02:00
Joffrey JAFFEUX
4c248fc5c4
UX: do not attempt to full width sk on mobile (#9520) 2020-04-22 20:39:45 +02:00
Robin Ward
e4a0e0bead FIX: Ignore removed column 2020-04-22 14:27:01 -04:00
Vinoth Kannan
df0c386f8a
UX: drop the automatic_membership_retroactive column from groups model. (#9430) 2020-04-22 22:07:39 +05:30
Kris
bf0c055a9a UX: add comment-plus icon for reopening topics 2020-04-22 12:29:27 -04:00
Krzysztof Kotlarek
81c216e04c
FIX: composer problem on the categories page (#9508) 2020-04-22 09:24:54 -07:00
Mark VanLandingham
04fb37c7a4
DEV: Export openNewCategoryModal from discovery-categories (#9501) 2020-04-22 11:03:28 -05:00
Eric Mueller
45f3517ef6
FEATURE: add class to <aside> quote block when quoting an ignored user (#9511)
* add class to <aside> quote block when quoted an ignored user

* Changed from single to double quotes
2020-04-22 12:00:44 -04:00
Robin Ward
13f2723dcb FIX: Don't log an error to logster if a topic could not be updated.
If for some reason an update did not go through (for example,
concurrently updating the same topic twice), we were logging something
like:

```
create_errors_json called with unrecognized type: #<Topic
```

This happened because we knew an error occurred but the active record
object had no errors attached.

This patch fixes the issue by attaching a proper error message in the
event that this happens.
2020-04-22 11:56:04 -04:00
Justin DiRose
b7dea0d5c1
FIX: Copy button was displayed on quoted codeblock (#9514) 2020-04-22 15:57:25 +02:00
Vinoth Kannan
e5c44f6dcf UX: display 'merge' button in all non-staff user profiles. 2020-04-22 17:42:09 +05:30
Daniel Waterworth
c8fed90e4e FIX: Handle sub-sub-category paths without an id 2020-04-22 12:19:54 +01:00
Vinoth Kannan
ceee855d00 minor code improvement
a511bea4cc
2020-04-22 16:40:59 +05:30
Joffrey JAFFEUX
5fb5807098
FIX: caret icon should inherit its color (#9513) 2020-04-22 13:10:02 +02:00
Joffrey JAFFEUX
4889dbde49
FIX: differentiate sk outline handling on single/multi (#9512) 2020-04-22 13:02:20 +02:00
Dan Ungureanu
4e5f9d4cd1
DEV: Drop 'key' column from user_api_keys (#9388) 2020-04-22 12:13:19 +03:00
Joffrey JAFFEUX
5c45363e67
UX: better outline support in sk components (#9510) 2020-04-22 10:54:02 +02:00
Dan Ungureanu
e733701887
FEATURE: Make report filters reusable (#9444)
This commit also adds 'include subcategories' report filter
2020-04-22 11:52:50 +03:00
Vinoth Kannan
a511bea4cc
FEATURE: admin UI to merge two users. (#9509) 2020-04-22 14:07:51 +05:30
Arpit Jalan
ee63c35c35 DEV: use array for matching multiple values 2020-04-22 12:25:59 +05:30
Arpit Jalan
c028e1aca7 FIX: use absolute url for /user_avatar/ links 2020-04-22 12:08:59 +05:30
Martin Brennan
628ba9d1e2
FEATURE: Promote bookmarks with reminders to core functionality (#9369)
The main thrust of this PR is to take all the conditional checks based on the `enable_bookmarks_with_reminders` away and only keep the code from the `true` path, making bookmarks with reminders the core bookmarks feature. There is also a migration to create `Bookmark` records out of `PostAction` bookmarks for a site.

### Summary

* Remove logic based on whether enable_bookmarks_with_reminders is true. This site setting is now obsolete, the old bookmark functionality is being removed. Retain the setting and set the value to `true` in a migration.
* Use the code from the rake task to create a database migration that creates bookmarks from post actions.
* Change the bookmark report to read from the new table.
* Get rid of old endpoints for bookmarks
* Link to the new bookmarks list from the user summary page
2020-04-22 13:44:19 +10:00
Kris
b6489d2690 UX: Replaced locked topic "lock" icon with "comment-slash" icon 2020-04-21 17:34:59 -04:00
David Taylor
f51b48b421
PERF: Improve lazy-load performance in Safari
Safari starts loading images as soon as attributes are modified. Modern browsers all prefer the srcset attribute over src, so we should remove srcset last, and add it first.
2020-04-21 19:05:33 +01:00
Mark VanLandingham
036236d6d6
FIX: properly add 'two-rows' class to header-topic-info container (#9497) 2020-04-21 13:01:57 -05:00
David Taylor
a97cb2444c
UX: Fix broken image placeholder styling 2020-04-21 19:00:47 +01:00
Robin Ward
63811707e8 DEV: Remove setupTopicController event 2020-04-21 13:48:33 -04:00
Jeff Wong
c4cc19a2ba Revert "DEV: allow nav items to override computed property values"
This reverts commit 74e4102093.
2020-04-21 09:58:46 -07:00
Joffrey JAFFEUX
1eb9bc4cec
DEV: encapsulates _events and clearing it at app-events module level (#9489) 2020-04-21 17:27:17 +02:00
Justin DiRose
c9cdd12e97
FIX: Improve selector for copy codeblock button (#9493)
Previous selector implementation was not accounting for codeblocks in
nested elements, like lists.
2020-04-21 10:12:56 -05:00
Joffrey JAFFEUX
62459c845f
DEV: allows a sk component to stop click propagation (#9495) 2020-04-21 17:11:40 +02:00
Joffrey JAFFEUX
79058a6d99
DEV: makes sk scroll to current selection (#9492) 2020-04-21 16:48:49 +02:00
Joffrey JAFFEUX
4f834f0008
DEV: allows click to propagate outside of header but not outside of sk (#9491) 2020-04-21 16:20:05 +02:00
Justin DiRose
6559ad0d80
FEATURE: Add copy button to codeblocks (#9451) 2020-04-21 08:02:13 -05:00
Martin Brennan
d123138d3a
FIX: Only confirm bookmark delete if a reminder has been set (#9484)
We do not need a secondary bootbox confirm if the bookmark has no reminder, because nothing really will be lost in that case.
2020-04-21 14:29:12 +10:00
Jarek Radosz
a781ef7662
FIX: Reject invalid Category slugs (#9473)
Previously it would sanitize given slug and then save the resulting empty slug.
2020-04-21 03:50:50 +02:00
Jarek Radosz
17cf300b71
DEV: Use more specific error responses (#9472)
* DEV: Use `render_json_error` (Adds specs for Admin::GroupsController)
* DEV: Use a specific error on blank category slug (Fixes a `render_json_error` warning)
* DEV: Use a specific error on reviewable claim conflict (Fixes a `render_json_error` warning)
* DEV: Use specific errors in Admin::UsersController (Fixes `render_json_error` warnings)
* FIX: PublishedPages error responses
* FIX: TopicsController error responses (There was an issue of two separate `Topic` instances for the same record. This makes sure there's only one up-to-date instance.)
2020-04-21 03:50:20 +02:00
Jarek Radosz
5a81e3999c
DEV: Remove bypass_bump from CookedPostProcessor (#9468)
It was only passing it along to `PullHotlinkedImages` and that class have not used that arg since April 2014 (c52ee665b4)
2020-04-21 03:48:19 +02:00
Jarek Radosz
9a6e4b1fa1
FIX: Make InlineUploads handle more URL formats (#9467)
It previously failed to match URLs with characters other than `[a-zA-z0-9\.\/:-]`. This meant that `PullHotlinkedImages` would sometimes download an external image and then never use it in any posts.
2020-04-21 03:47:48 +02:00
Krzysztof Kotlarek
e9f7262813
FIX: when category or tag is muted, update user (#9456)
Currently, when category or tag is muted, only after hard refresh, these new muted categories are really muted. Without a hard refresh, you will still receive "new topic" messages.

Therefore, when tag or category is muted, we should update the user object right away.
2020-04-21 08:33:55 +10:00
Jeff Wong
74e4102093 DEV: allow nav items to override computed property values
Plugins need to override extra nav-items. Make sure these properties are
override-able.

See:
https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
2020-04-20 15:21:58 -07:00
Robin Ward
ce9c59309c FIX: Temporarily compatibility for Evented on a Topic Route 2020-04-20 17:14:51 -04:00