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
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
..
adapters FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
components DEV: use the only source for time shortcut options on all date pickers (#16366) 2022-04-21 15:49:11 +04:00
controllers FIX: Show footer at the end of topic list (#16519) 2022-04-20 15:53:06 +02:00
helpers DEV: Add category-color variable (#15807) 2022-02-03 13:16:27 -06:00
initializers FIX: Ensure images do not change height when loading is complete (#16368) 2022-04-05 13:43:17 +01:00
lib DEV: use the only source for time shortcut options on all date pickers (#16366) 2022-04-21 15:49:11 +04:00
mixins DEV: Minor in-progress-uploads refactor (#16430) 2022-04-11 11:50:06 +10:00
models FEATURE: Polymorphic bookmarks pt. 2 (lists, search) (#16335) 2022-04-22 08:23:42 +10:00
pre-initializers FIX: Ensure all/none subcategory filters work correctly with tags 2022-03-22 15:26:00 +00:00
raw-views DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
routes FIX: Show footer at the end of topic list (#16519) 2022-04-20 15:53:06 +02:00
services FIX: Better 0 file size detection and logging (#16116) 2022-03-07 12:39:33 +10:00
styles DEV: Migrate to Ember CLI (#11932) 2021-02-03 14:22:20 -05:00
templates FEATURE: Polymorphic bookmarks pt. 2 (lists, search) (#16335) 2022-04-22 08:23:42 +10:00
widgets DEV: Prioritize full name when display_name_on_posts active (#16078) 2022-04-20 10:07:51 -05:00
app.js DEV: Improve theme error handling UX 2022-02-14 10:11:19 +00:00
index.html FIX: Ember CLI was always loading the admin payload in dev mode 2021-10-05 08:34:10 -04:00
mapping-router.js DEV: Improve and document __container__ workaround in tests (#15498) 2022-01-10 10:34:08 +00:00