Yes, but only in mock ups:
- The primary place of interaction should be the /categories page, where a star can be clicked to favorite a category. (mockup below).
- I don’t think it should be added to the Notifications page. Favorites will have no effect whatsoever on notifications. I’m opting for the Interface page instead.
SPEC: Favorite Categories
1. Expose a star button on the /categories page
Stars in /categories are /hidden with toggle same as we do with topics:
(Could also see how it looks with stars left-aligned on parent categories as well)
2. Add a Favorites list to
User Preferences : Interface page.
3. Show “Favorites” in category drop-down
If any categories are added to Favorites, a Favorites tab is visible on the topic list page.
If the list is blank, “My Favorites” won’t show.
(Clickable Stars missing in mockup. Also, this screen might not doable.)
- Favourited categories should be listed at the top of /categories and in the categories drop-down.
- User can set “My Categories” as their default index
- Admins can define a “My Categories” preset, so registered users are already set up with some default Favorites.
So glad to hear this, @erlend_sh
I have a few thoughts, which may deserve mock ups, but I’m on my phone right now.
- We’ve hidden the category drop-down. Would really like a way to have a simple top menu tab for the favorites topic list rather than bringing back the whole drop-down.
- Perhaps, rather than a separate categories page for my/categories, the “starred/favorites” categories could be shown together as a separate group at the top of the existing categories page?
- Seems like it’d make sense and be consistent to be able to star/unstar a category from the category topic list page (next to the drop-down where I can watch/mute it, etc).
Maybe achievable with a theme module? I’ve seen similar tricks: Adding Unsolved button to top menu using custom HTML
If not then you should probably roll your own extension or fork of this plugin, because hiding the category drop down is highly non-standard.
So basically the same as the “move favorited categories to top of categories list” stretch goal right?
That’s some prime real estate… I can support it as a stretch goal. I think it should be behind a setting, because this is more in your face than any of the other UI we’re adding. It adds a choice + unknown to what is currently a single option.
The intersections for my/new and my/unread are not important to me, and I kind of doubt they are important to most. Stuff in /unread is likely of interest regardless of the category…
So, my preference would be to keep it simpler for starters and only have a tab for “my categories” that is equivalent to my/latest.
If we need to do this with further customization, that’s OK, but maybe this is an opportunity to reduce scope for this plugin.
I’d agree my/unread is of minimal importance, because as you say:
(but I included it in my mockups for consistency and completeness sake)
I wouldn’t agree that my/new was as unimportant - in fact, I think it’s the most important feature here, since nothing remotely like it exists already: “Show me stuff I haven’t seen, but you know I probably want to”.
This breaks the user expectation of what those tabs do (at least by default): the dropdown on the left filters what appears in the tabs on the right.
Implementing a link to my/latest as a tab through a plugin should be trivial.
Cool. We can revisit how to tweak things to our particular needs at a later time through a plugin or other customization.
I certainly do not want to get in the way of more important progress here.
To test it, please checkout the ‘favorites’ branch of Bianca’s fork of Discourse and the discourse-favorites plugin.
I haven’t been keeping up with a development environment recently. Is there any publicly accessible sandbox with this running? Or will this be enabled on meta at some point? (I can also reach out privately about trying this out on our hosted staging environment).
I’ll try make that happen, but no promises! Everyone’s schedules are a bit more irregular than usual seeing as it’s Christmas.
No rush on my end. I could just wait to try it out here on meta if that is going to happen at some point.
I tried to put the plug-in on the locale, the error is the white screen.
Only by removing the plugin was it possible to look at the logs.
It looks like some functions that I implemented in my fork of Discourse cannot be found. Are you certain that you are using the ‘favorite’ branch of my fork of Discourse?
I am sorry I cannot be more helpful. I am on a train right now. When I get home, I will look into it.
Thank you. I did not notice that there are a lot of changes in the branch itself. I think this is an ordinary plugin.
Hey @erlend_sh - is this likely to be deployed on meta at any point to play around with?
Also, I’m curious about this scenario, @nbianca:
- category is configured not to show up on latest
- user adds category to “favorites”
Will topics from that category show up in their favorites list in that scenario?
The reason I ask is because one use case for this is where many “niche” categories exist that we might not want to “spam” everyone with on latest, but which different folks may want to be able to “opt-in” to see some subset of them in one place.
For now there is a playground instance here:
I can grant you admin access if you want to create more categories to play around with.
Yes they will. In the demo instance I created the “Not on homepage” category that is not on the homepage (latest), but is visible in Favourites (if selected).
Yay! Got a chance to play around a little bit in the sandbox.
@nbianca small bug if you weren’t already aware:
- go to http://18.104.22.168/my/preferences
- click ‘Interface’ on the left
I can see which categories I’ve favorited
No categories are listed.
The favorited categories show up if you refresh the page or navigate directly to http://22.214.171.124/my/preferences/interface
A link to “Favorites” in the hamburger menu
I’d love to see a star on the page for the category topic list itself that I can toggle (eg, this page: http://126.96.36.199/c/not-on-homepage)