Commit Graph

37131 Commits

Author SHA1 Message Date
a511bea4cc FEATURE: admin UI to merge two users. (#9509) 2020-04-22 14:07:51 +05:30
13956017da Update lefthook.
Support for `LEFTHOOK=0` was broken in the old version. See commit 3a6522ed6307e995a86179488b01dab22146502d of lefthook.
2020-04-22 14:58:48 +08:00
ee63c35c35 DEV: use array for matching multiple values 2020-04-22 12:25:59 +05:30
c028e1aca7 FIX: use absolute url for /user_avatar/ links 2020-04-22 12:08:59 +05:30
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
5a98869c5d FIX: If bookmarking discobot posts, skip the reminder modal (#9505)
This is to streamline the new user narrative. only works when creating the bookmark, if editing/deleting the modal is shown. This is done via the plugin initializer.
2020-04-22 13:34:58 +10:00
e18aeb799e FIX: Make sure reminder_type is parsed on bookmark update (#9503)
Otherwise we are trying to update the reminder type with a string which often evaluates to 0 (At Desktop) which causes reminders to come through early.
2020-04-22 10:44:04 +10:00
d1bee13fda test fix 2020-04-21 17:57:25 -04:00
b6489d2690 UX: Replaced locked topic "lock" icon with "comment-slash" icon 2020-04-21 17:34:59 -04:00
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
036236d6d6 FIX: properly add 'two-rows' class to header-topic-info container (#9497) 2020-04-21 13:01:57 -05:00
a97cb2444c UX: Fix broken image placeholder styling 2020-04-21 19:00:47 +01:00
63811707e8 DEV: Remove setupTopicController event 2020-04-21 13:48:33 -04:00
ffa0a18841 Update bookmark step
See https://dev.discourse.org/t/discobot-tutorial-for-bookmarks/27466 for details
2020-04-21 19:35:03 +02:00
c4cc19a2ba Revert "DEV: allow nav items to override computed property values"
This reverts commit 74e4102093c6aa497fe48947afbec9751b21721a.
2020-04-21 09:58:46 -07:00
07e0490fe4 DEV: Update mocha (#9490)
The spec that was blocking the update was fixed in c08753dc3431ce2f85916b5a7e68db52891917d8.
2020-04-21 18:32:42 +02:00
fe579c918f DEV: fix failing test relating to sk click propagation
* followup to 62459c84
2020-04-21 12:01:16 -04:00
1eb9bc4cec DEV: encapsulates _events and clearing it at app-events module level (#9489) 2020-04-21 17:27:17 +02:00
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
62459c845f DEV: allows a sk component to stop click propagation (#9495) 2020-04-21 17:11:40 +02:00
79058a6d99 DEV: makes sk scroll to current selection (#9492) 2020-04-21 16:48:49 +02:00
4f834f0008 DEV: allows click to propagate outside of header but not outside of sk (#9491) 2020-04-21 16:20:05 +02:00
6559ad0d80 FEATURE: Add copy button to codeblocks (#9451) 2020-04-21 08:02:13 -05:00
776caa24c9 DEV: Bump optimist from 3.0.0 to 3.0.1 (#9476)
Bumps [optimist](https://github.com/ManageIQ/optimist) from 3.0.0 to 3.0.1.

Mostly about fixing tests and adding a license file
2020-04-21 15:32:24 +10:00
c08753dc34 DEV: Fix topic_timer_spec (#9483)
File it under "how did it even work".
2020-04-21 14:38:35 +10:00
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
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
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
28c706bd09 DEV: Do less work in docker_test (#9470)
* DEV: Update the working tree just once.

`git pull` was effectively doing `git fetch` and `git merge FETCH_HEAD`, and only then we were checking out the desired branch/commit. This change will skip the the merge step.

* DEV: Don't run lefthook in docker_test
2020-04-21 03:48:58 +02:00
ab52bed014 DEV: Remove the return value of disable_if_low_on_disk_space (#9469)
It was used only in specs.
2020-04-21 03:48:33 +02:00
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
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
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
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
ce9c59309c FIX: Temporarily compatibility for Evented on a Topic Route 2020-04-20 17:14:51 -04:00
5d9f5dd11f REVERT: Fix to app-events to make events not global 2020-04-20 16:57:46 -04:00
091d6dc9fc DEV: Triggering "saw" on every element seems pointless
We don't seem to wire this up to any listeners, so why waste time doing
all this work?
2020-04-20 16:51:36 -04:00
28e9f54e2f DEV: sawTop never seems used in our codebase or any plugins 2020-04-20 16:48:51 -04:00
96d026a329 DEV: Remove EventTarget. Future versions of Ember don't export this.
It was removed altogether from ApplicationRoute, which only triggered
an `activate` event which never seems to be used.

We can replace it with Evented which is still present.
2020-04-20 16:45:01 -04:00
afe1407c75 Build(deps): Bump aws-sdk-s3 from 1.61.2 to 1.62.0 (#9479)
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.61.2 to 1.62.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits/v1.62.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 16:06:38 -04:00
06796bec8b FIX: Set category description to first posts cooked value (#9478) 2020-04-20 14:51:49 -05:00
25bed4f643 FIX: Concurrency issues with making topic embedded posts visible 2020-04-20 15:11:59 -04:00
e997a1f315 FIX: Don't make topics visible unless the posts are regular 2020-04-20 14:56:21 -04:00
98729c8e6e FIX: Allow embed updates of just the title 2020-04-20 14:31:24 -04:00
56a23c68f1 FIX: Embedded topics couldn't update their titles 2020-04-20 14:27:43 -04:00
8f5314bf98 FIX: An opts hash was not, in fact, optional :) 2020-04-20 14:17:13 -04:00
ea8b40a53b FEATURE: Add created_at column to user_badges (#9463)
* FEATURE: Add created_at column to user_badges

This makes scraping for newly granted badges easier.

Patch from @eviltrout applied.

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-04-20 10:03:25 -07:00
f63ac79b9d Build(deps-dev): Bump ruby-prof from 1.3.1 to 1.3.2 (#9474)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.3.1...1.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 12:34:53 -04:00
e5233f5ce6 DEV: Add class to header-topic-info widget (#9475) 2020-04-20 10:34:05 -05:00
0a3cc22cec FIX: Wizard was creating duplicate Light theme if Light was selected (#9464) 2020-04-20 08:31:43 -05:00