Collections

:information_source: Summary User created collections of linked Topics
:hammer_and_wrench: Repository Link https://github.com/Alteras1/discourse-collections
:open_book: Install Guide How to install plugins in Discourse

Preview

Mobile

Collections

This allows users to create collections of Topics that are visible when viewing said Topics. Collections may include any URL and will be visible on any linked Topic. Collections can be organized into sections, and any changes to a collection is reflected on all linked topics. There is no restriction on the Topic being linked, so users can create a collection across categories/tags.

Title & Description

Optional field available for input. If provided, these will be displayed at the top of the list.

Sections

Optional organizational feature. By adding a section header, the collection can be divided into sections, allowing collapsible sections to be displayed.

Subcollections

Users can also create a subcollection, which is only displayed for a single topic, allowing users to link relevant URLs (i.e. specific posts/external resources) only for the single topic. Any topic URLs added will not be linked.

Permissions

The plugin allows any user to create a collection for their own Topics. By default, users can only link to their own Topics, and must add other users as maintainers, who can add their own Topics to the collection. This setting can be disabled, allowing only specific groups full control over any collection (by default Staff & TL4).

Permissions Demo

Settings

Name Description
collections enabled Enable/disable the plugin. Default: true
collection by topic owner Allow topic OP to create collections. Default: true
collection by topic owner allow groups Restrict topic OP who can create collections. Limits collection by topic owner. Default: TL1
collection modification by allowed groups Groups allowed to create/modify any collection. Default: Admin Moderators TL4.
sections in subcollection Allow section headers in subcollections. Default: true

Alternatives

This plugin is heavily inspired by (and was at one point based on) the Discourse Doc Categories plugin. While the Doc Categories plugin has a good indexing mechanism and the display is great, the design was meant for wiki style pages, where everything is collated in a single category. Similarly, the indexing relies on formatted text input in a separate Topic, which has its own pros & cons.

The DiscoTOC - automatic table of contents theme component also allows for organizing links outside of the post body, but is limited to a single topic.

If your purpose is just a wiki style organization, Discourse Doc Categories would be a better fit. If you just need only some pages to have linked Topics, DiscoTOC - automatic table of contents would be better.

Notes

This was originally designed to support the forum I am apart of migrate over to Discourse. As a writing focused forum, separate topics are maintained by users for different purposes, resulting in a situation where links between topics across categories is practically required. To help facilitate this, I’ve created this plugin to support users self-organize.

There is an alternate timeline where this is just a theme component, where indexing would occur with user inputted divs with URLs to other post. But after developing 90% of the tools, wizards, and code to do it, I realized it just wasn’t worth it and that the user would likely skip over every tutorial written and still complain about why things weren’t working. So that path was ditched. It honestly isn’t a bad solution, as it would be far more lightweight than a plugin, but it would’ve put a lot of unnecessary burden on users to make sure they had the correct formatting on not just one post, but on multiple.

I have currently marked this as experimental, as I’m still not 100% set on the UI features (ie icons) and the permissions system. Also, I need to add automated unit tests.

20 Likes

FYI: all videos were broken :thinking: (iPad)

1 Like

Huh, I thought iOS Safari supported WebM…

I’ve swapped out the videos for MP4. Ty!

5 Likes

It’s possible to enable 'public‘ collections like on Discourse Docs?

1 Like

Sorry if it wasn’t clear, all collections are “public.” All users will see the same collection on the same topic. This plugin is meant to organize topics, not be a kind of private “folder of bookmarks” for users.

5 Likes

Updated the plugin with support for Emojis and Color Squares in sidebar!

5 Likes

This looks really quite amazing. And absolutely brilliant documentation - this has my vote for the best documented Plugin in meta.discourse.org!!

Have you considered extending this so that it also covers topic lists too?

I often find that it would be very helpful having per-category or per-tag collection of links. An example is a private category dedicated to specific group, which also uses some other tools (such as a few folders in Google Docs, a local government portal, an associated chat channel, and a group inbox). It would be ideal to have category moderators control over it.

3 Likes

Thank you very much!

It’s definitely something I’ve considered before, but I don’t think it would fit well with the current design of being a user driven way to organize topics. Not ideal for category/tag level, as it would have to be limited to moderator control. The original use case was to cover linking related topics too big for 1-2 topics, but too small for a tag/category.

Making topic lists display the indexing in the sidebar for categories can be done via Discourse Doc Categories plugin, albeit with a different configuration method. Definitely a hassle having to have two plugins do two very similar things, but I think the original philosophy for each is different enough to warrant the separate approaches.

Adding a compat extension for the Private Topics Plugin is a very cool idea from a user standpoint. I’ll have to consider that…

That just leaves the per-tag level. Making a PR for Discourse Doc Categories (or making a new plugin/TC) for tags is an option tho, but not actively on my mind. Perhaps in the future.

Actually, this would probably work nicely for my use-case. I’m not sure if it is adaptable enough for it though (will play around with it later this week).

Sounds very interesting. What use case do you have in mind?

To regular users, the category with Private Topics enabled would only display their own topics. So I could see this being one of the few places where letting the Collections plugin hoist a collection from the topics level to the category level per user makes sense.

The forum I’m part of actually has a private category for users to use as a personal drafting/testing ground. And they make alot of topics, so user driven topic organization sometimes happen here.

I was really hoping it’s a system of collection where users can create categories and put there topics of their choice, like a gallery. Oh well.

How is this not that?

1 Like

You can’t create categories is my guess.

I really appreciate this Plugin’s drag-and-drop UI for creating arbitrary sequences of Topics like chapters of a book, which can be easily re-arranged.

I’ve initiated a Theme Component to add sequential navigation for Collections such as < Previous and Next > and Paging in a Modal …

Here is my working repository

3 Likes

Much needed, looking into this today and this was the last component it seemed to need.

@Alteras I’m having a bug with the modal close X on the Create Collections modal. It can be hovered and clicked but does not close the modal until a page refresh.

1 Like

Oooo, this is a nice concept. I love the modal for quick viewing the different linked topic posts. Also helps inform users that there is a collection for those who don’t have/keep the sidebar open 24/7.

I’m curious about the decision to swap the contents of the post instead of just redirecting to the user to the topic.

I really like the idea of using < Prev and Next > above the timeline to navigate across topics without needing the sidebar. Maybe it could be with the timeline like the toc, so that it can be easily accessed on long 1st post topics without having to scroll back up… Or maybe just decorate the top/bottom post itself…

If you’re okay with it, I’d like to explore adding some of those ideas directly into the plugin, maybe with extra site settings for admins. Of course I have no objection to having a TC built off of the plugin, more customization to the users. Let me know if you need any help with your TC. You should be able to pull the currently displayed collection information from the ember service service:collection-sidebar without having to parse the DOM.

Hmm… that’s truly odd. I can’t seem to replicate it. I recently made some changes updating the plugin to address some deprecation issues, so that might have affected it? Please check if the plugin is updated. Please also share the details of your setup (browser, mobile/desktop, discourse version).

2 Likes

I’m outdated, maybe that’s why. I was still on the Nov 6 commit.
ETA: Disregard, updating solved.

1 Like

I like the quickness. Not a reasoned design. My initial vision is that the modal pops up a content-focused slideshow.

Since arbitrary ordering of items is the opportunity here, where sequencing is decidedly not tethered to any timeline, my initial aim is to reuse the nested horizontally scrolling menu behaviors from core as we have in the display of User Profiles, e.g. where, beneath the (stationary) Collection Title and Description (if/when present), are two horizontally scrollable/swipeable rows – Section Headers and their associated Topic Titles below those.

Also within the modal is a collapsible (quick slide in/out from left) vertical display replicating the behavior of the left sidebar outside of the modal. I like the idea that what rises up off the page in the modal looks and feels mostly the same as what is seen and experienced (in the centered, non-modal view), including navigation elements, but just surrounding the cooked content.

I’m working also toward re-purposing your provided Subcollections to also display in a modal – iframes in a slider – which can display sequences of external links, and can also re-use internal content (since currently a Topic can only be used in one Collection.)

Please, Go For It !

I can also see adapting this TC, or otherwise providing these types of navs and displays for Doc Categories :page_with_curl:

2 Likes

Now that I have it working (thanks for the head’s up on the update above), a couple things that I found:

  1. Collections button is visible even when the user is not part of the allowed groups. Results in an Internal Server Error (displayed gracefully in a red bar on the modal) when attempting to create a collection.
  2. On the collections sidebar, the button at the bottom offers the original Create Collection option. Have to use the button on the original post in order to manage it, it would be very useful to have a Manage option immediately from the button on the collection sidebar.
  3. Would it be possible to separate Collection and Subcollection permissions? Subcollections could be immensely useful for individuals who would like to collate topics on their own, without the widespread impact a Collection has on all linked topics.

Lastly, how does this plugin handle two collections linking the same topic? Two subcollections? This makes me lean more into suggestion #3 for easier management of overlapping goals for users who like the collections feature.

EDIT: I realized #1 is an error related to Collection modification by allowed groups that allows non-owned topics. Still, a better error message could be useful!

1 Like

So the setting collection modification by allowed groups is meant for staff and users who are highly privileged, i.e. helpers maintaining wikis. Though it seems like I’ll need to fix the errors.

As long as collection modification by allowed groups is set properly high enough, collection and subcollections should only be created/modified by the topic owner (and staff). Topic owners should be able add ordinary users as maintainers to collections or subcollections, who can then add their own topics. I’m not quite sure of what your settings are to warrant separating them.

Two collections cannot link to the same topic. An error should be displayed when attempt to link a topic already in a collection. Similarly, only one subcollection is allowed per topic. This is because the collection are all public and should only be made by topic owners.


Hmmm… I get the feeling that it might be better to make a separate plugin that’s just folders of bookmarks that can be viewed publicly or privately… “Personal Collections?” “Bookmark Library?” “Topic Playlists?” Or maybe I just extend this one. But the underlying code and philosophy would be quite different between the two features… It’s a bit unfortunate the name “Collections” is quite broad and can be interpreted in quite a number of ways.

2 Likes