Follow Plugin 👨

(Angus McLeod) #1

GitHub-Mark-32px Repository: get the code here

sandbox Example: see it in action here

:heart: Donate: support it here

:man_technologist: Maintainers: @angus

This plugin was originally this spec and made possible with generous sponsorship from @Genyus @wishspinner @p16. Thanks guys!

Overview

This plugin allows you to follow other users, list the latest topics involving them and receive notifications when they post.

Features

  • Profile

    • “Follow” toggle in the user’s profile and user card.

    • New profile tab (“Network”) listing:

      • Users you’re following
      • Users following you
    • New profile statistics (listed on the profile and user card), toggled by a site setting:

      • Number of users you’re following
      • Number of users following you
  • Topic List . If you follow other users you see a topic list with the latest activity of users you are following. This topic list will have all the same functionality as other Discourse topic lists.

  • Notifications . Notifications for activity of users you follow are similar in structure to following a category:

    • Notifications are triggered when:

      1. A user you’re following creates a new topic
      2. A user you’re following replies
      3. A user follows you
    • Initially there is only one notification level, akin to “Watching” a category, which includes all of the above triggers. More notification levels, in particular “Watching First Post” (i.e. only 1 & 3) will soon be added.

    • Notifications include:

      • An in-app notification
      • An email, according to the user’s email settings
      • A push notification, according to the user’s push notification settings

Examples

Follow Topic List

Profile Lists

37 Likes
Combined Post List
Notified user's name is the notifier
Estimated timeline on a project?
(David Kingham) #2

This is great, no issues so far. Will we be getting topic list previews for the ‘Following’ route?

2 Likes
(Alex) #3

When clicking on a poster’s user card in a topic, there are too many buttons, the follow button gets flooded and sent off the screen. (mobile)

1 Like
(Eduardo Braga) #4

so useful that discourse itself should offer :disappointed_relieved:

3 Likes
(Alex) #5

Another UI issue: the follower button is slightly smaller/thinner than the message button which doesn’t appear right.

(Diego Barreiro) #6

It would be great if the number of followers and following for an user were displayed here:

As well as in the Users chart, in order to sort by Followers/Following:

5 Likes
(Angus McLeod) #7

Thanks for the feedback everyone!

Maybe @merefield can handle the TLP integration

There are no user cards on mobile in Discourse. Are you using a theme?

Again, it looks like you’re using a theme which is adding additional CSS to your buttons. The follow button uses standard Discourse classes and has standard Discourse dimensions. See e.g. https://discourse.angusmcleod.com.au

As to your issue with the incorrect user appearing in notifications, that is more concerning however I haven’t been able to reproduce this on my own instance (can you repro it there?). What other plugins are you using?

Is anyone else experiencing an issue with mixed up usernames in notifications with this plugin installed?

Great suggestions :+1: I will add these in soon.

6 Likes
(Alex) #8

Mobile user cards are a theme component that are now in core (or planned to be). It’s implemented in meta.

Regarding the notification issue, these are my plugins:

(DiscourseMetrics.com) #9

Did you figure this out @nexo? I’m seeing the same issue, the only plugins I have that overlap with yours are:
docker_manager
discourse-whos-online
discourse-quick-messages
procourse-static-pages
discourse-data-explorer
discourse-follow

But I also have a few custom plugins that may be causing this.

I tried disabling the follow-plugin in the settings but am still seeing the same issue with users liking their own posts.

(Alex) #10

You have to completely uninstall the follow plugin.

1 Like
(Angus McLeod) #11

@DiscourseMetrics @nexo Found the bug :+1:

Apologies and thanks for your patience!

6 Likes
(DiscourseMetrics.com) #12

Brilliant, will test it now :slight_smile: No apologies needed!

1 Like
(Diego Barreiro) #13

Yep, this fixes the issue!


It no longer sais “:+1: Diego”

2 Likes
(Diego Barreiro) #14

There’s another little bug in this plugin
If you are an admin, and you follow another user, you also get notifications of the followed user PMs

1 Like
(david) #15

Oh my, yes. I just saw that on my forum earlier, too.

(Angus McLeod) #16

Thanks for reporting @barreeeiroo and @YTPMania_Forums.

I’ve slotted in time to work on this next monday: Admin getting incorrect follow notifications - Work - Angus' Sandbox

5 Likes
(Bart) #17

We have started testing this plugin and it works great so far! There’s the risk of getting too many notifications though - perhaps it would be good if we could select what level of notification you want:

New topics only
New topics and replies

3 Likes
(Angus McLeod) #18

As promised, this has been fixed. @barreeeiroo @YTPMania_Forums please update and try it out.

Yup, the plugin was built to accomodate a notification level system like the Discourse notification level system. Currently all follow notification levels are set “watching”. “watching_first_post” is already there in the backend, but the frontend for selecting it is not yet built. I’ve slotted in some time to work on this as part of my open source work.

Suggestions on how the user following notifications frontend should work are appreciated, i.e. where does the follow notification toggle go?

cc @p16 @Genyus @wishspinner

7 Likes
#19

@angus should we add the settings under Preferences > Notifications > Social ?

1 Like
(DiscourseMetrics.com) #20

Anyone have a Data Explorer query to see who is the most followed members? :slight_smile:

3 Likes