Remove "Activity" from group page

Hello there,

When I access a group via menu => groups and then clicking on a group, there is this Activity button that shows the activity of the group’s members. Is it possible as an admit to remove this Activity field?
Forum users that go to the group page to look for information about the group may find it confusing to find information about the members’ activity that is completely unrelated to the group itself.

Thanks for your help!

6 Likes

Yes, use a site customization to hide it via CSS

4 Likes

Very confusing. I didn’t understand whats up not until I created a group. I wish I can create a visible group that will only display the members.

1 Like

Yes, this seems confusing to me as well.

1 Like

What’s confusing about it? You’re looking at all activity of members of the group. That is by definition related to the group.

This won’t be changing. If you wish to hide it, use CSS to do so.

1 Like

If you use groups for permissions for a private category which is kind of the main purpose of a group, it does get a little weird to see all the other posts of group members for other categories.

The last time I tried hiding that Activity tab I could only target the entire set of tabs. Has anyone sorted the CSS for just the Activity tab and care to share?

1 Like

There are not specific classes per button, so hiding it will be hard. I’ll take a look next week and see if I can add some classes quick.

4 Likes

Hi @codinghorror,

Obviously I’m still exploring Discourse, so the confusion is easily all on my end. I suppose I’ve been habituated to linking groups with discussion areas. So, the category is the place where a specific group’s activity takes place. But, obviously the group members might contribute across the site. And this would be helpful for seeing all of the posts from your staff, moderators, or another group of some kind. At this early stage of understanding Discourse, I think if the tab read “Site Activity” that would be more clear.

1 Like

OK @scombs, PR has been submitted. Once the tests pass and it get’s merged, you can hide a tabs with

.group .nav-pills .button-class-here {
    display: none;
}

Valid button classes are members, activity, edit, logs

Edit: PR has been merged.

5 Likes

Good job but I hope it can work for specific groups too. :wink:

At this moment it cannot. We do not have any group-specific classes here. I’ll see what I can do.

OK, group-specific class added.
https://github.com/discourse/discourse/commit/ca3d6921a0376bc765415efd223f7cf64cbe9cae

You can now use:

.group.group-name-here .nav-pills .button-class-here {
    display: none;
}
2 Likes

@jomaxro it looks like the Activity tab is hidden on desktop as expected but still shows on mobile.

I include the CSS in Common (and then on Mobile, just to be sure).

Is there a fix for mobile? Thanks very much.

Try to add another line of CSS preceded by .mobile-view, eg:

.mobile-view .group .group-name-here .nav-pills .button-class-here {display: none;}

Unfortunately, that additional line with .mobile-view didn’t work. I have tried this on multiple browsers.

OK, the classes are different on mobile. Also, it looks like we’re going to need a !important due to the specificity of the existing target.

.group.group-name-here .mobile-nav .button-class-here {
    display: none !important;
}

Also, I had a typo above. no space between .group and .group-name-here.

5 Likes