This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/models
Martin Brennan 3e4621c2cb
FEATURE: Polymorphic bookmarks pt. 2 (lists, search) (#16335)
This pull request follows on from https://github.com/discourse/discourse/pull/16308. This one does the following:

* Changes `BookmarkQuery` to allow for querying more than just Post and Topic bookmarkables
* Introduces a `Bookmark.register_bookmarkable` method which requires a model, serializer, fields and preload includes for searching. These registered `Bookmarkable` types are then used when validating new bookmarks, and also when determining which serializer to use for the bookmark list. The `Post` and `Topic` bookmarkables are registered by default.
* Adds new specific types for Post and Topic bookmark serializers along with preloading of associations in `UserBookmarkList`
* Changes to the user bookmark list template to allow for more generic bookmarkable types alongside the Post and Topic ones which need to display in a particular way

All of these changes are gated behind the `use_polymorphic_bookmarks` site setting, apart from the .hbs changes where I have updated the original `UserBookmarkSerializer` with some stub methods.

Following this PR will be several plugin PRs (for assign, chat, encrypt) that will register their own bookmarkable types or otherwise alter the bookmark serializers in their own way, also gated behind `use_polymorphic_bookmarks`.

This commit also removes `BookmarkQuery.preloaded_custom_fields` and the functionality surrounding it. It was added in 0cd502a558 but only used by one plugin (discourse-assign) where it has since been removed, and is now used by no plugins. We don't need it anymore.
2022-04-22 08:23:42 +10:00
..
action-summary.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
archetype.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
associated-group.js FEATURE: Experimental support for group membership via google auth (#14835) 2021-12-09 12:30:27 +00:00
badge-grouping.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
badge.js UX: Add image uploader widget for uploading badge images (#12377) 2021-03-17 08:55:23 +03:00
bookmark.js FEATURE: Polymorphic bookmarks pt. 2 (lists, search) (#16335) 2022-04-22 08:23:42 +10:00
category-list.js FEATURE: Introduce 'Subcategories with featured topics' view (#16083) 2022-03-04 21:11:59 +00:00
category.js FIX: Ensure allowed_tags and allowed_tag_groups can be removed (#16454) 2022-04-12 11:14:29 +01:00
composer.js DEV: Prioritize full name when display_name_on_posts active (#16078) 2022-04-20 10:07:51 -05:00
draft.js FEATURE: Cook drafts excerpt in user activity (#14315) 2021-09-14 15:18:01 +03:00
group-history.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group.js FIX: update can_see_members attribute after leaving a group. (#15982) 2022-02-17 23:07:59 +05:30
invite.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
live-post-counts.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
login-method.js UX: Fallback to regular title if screen-reader title is unavailable (#15048) 2021-11-23 11:12:54 +00:00
nav-item.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
pending-post.js FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
permission-type.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-action-type.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-stream.js DEV: Refactor model/post-stream to support any filter. (#16081) 2022-03-03 08:50:47 +08:00
post.js PERF: Update like count in visible posts without an extra GET per like (#14869) 2021-11-10 13:22:26 -03:00
private-message-topic-tracking-state.js FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
published-page.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
rest.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
result-set.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reviewable-history.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reviewable.js FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
session.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
site.js FIX: Include all categories in sortedCategories (#14979) 2021-11-17 00:12:04 +01:00
static-page.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
store.js DEV: Add drop-date to drop-dateless deprecations (#15133) 2021-11-30 17:41:04 +01:00
tag-group.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
tag.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-details.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
topic-list.js DEV: Use Set instead of array-as-an-object (#14511) 2021-10-05 14:35:32 +02:00
topic-timer.js FEATURE: Allow durations < 1 hour and < 1 day for topic timers where duration is specified (auto delete replies, close based on last post) (#11961) 2021-02-05 10:12:56 +10:00
topic-tracking-state.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
topic.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
trust-level.js FIX: Don't store translated trust level names in anonymous cache (#13224) 2021-06-01 22:11:48 +02:00
user-action-group.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
user-action-stat.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-action.js FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
user-badge.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
user-draft.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-drafts-stream.js FEATURE: improve blank page syndrome on the user activity pages (#14311) 2021-09-16 21:35:34 +04:00
user-posts-stream.js DEV: Remove cache option from ajax() (#13142) 2021-05-31 14:41:35 +02:00
user-stream.js FEATURE: improve blank page syndrome on the user activity pages (#14311) 2021-09-16 21:35:34 +04:00
user.js FIX: Allow admins to change user ignore list (#16129) 2022-03-09 14:51:30 +10:00