Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7291 closed defect (bug) (fixed)

Inactive group nav on group type screen

Reported by: danbp Owned by: boonebgorges
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch
Cc: danco38@…

Description

2.7 RC2 test

When you click on the group type link displayed on group header, you're send to ../groups/type/TYPE NAME a screen listing all groups belonging to that type.

Problem is with the group nav bar on that screen.

When you click on "All groups" or "My Groups"(if logged-in) nothing happens. The only way to go back to group directory ../group/ is to open the link in a new tab or window.

Attachments (3)

7291.01.patch (668 bytes) - added by r-a-y 3 years ago.
7291.02.patch (733 bytes) - added by r-a-y 3 years ago.
7291.diff (1.1 KB) - added by boonebgorges 3 years ago.

Download all attachments as: .zip

Change History (21)

#1 @r-a-y
3 years ago

I think the same thing happens with Member Types.

I agree that this is a UX issue. Perhaps we can solve this by removing the type filter when clicking on the group tabs?

I'm not going to be available for the next couple of days to look at this, but I do have a few hours today. Will try to put a patch together.

Last edited 3 years ago by r-a-y (previous) (diff)

@r-a-y
3 years ago

#2 @r-a-y
3 years ago

  • Keywords has-patch added

01.patch adds the no-ajax CSS class to directory tabs when a user is on a member type or group type directory filter.

This means that when you click on a directory tab filter, we're bailing from using AJAX and solves the immediate issue.

I'll try to spend some time to re-jig the AJAX directory filter, but this is better than nothing at the moment!

@r-a-y
3 years ago

#3 @r-a-y
3 years ago

When you click on "All groups" or "My Groups"(if logged-in) nothing happens.

Duplicated this. Problem was because the AJAX response was returning a 404 when on a group type filter and clicking on a group tab or selecting a dropdown order option.

This was caused by our bp_do_404() call in the BP_Groups_Component class. 02.patch adds a group directory check to bypass the 404, which allows the AJAX contents to show up again.

The good thing now is the AJAX group tab and select dropdown filter works as expected.

Member type directories still has a problem where the member type filter is enforced even when using an AJAX filter, but this isn't a regression.

Last edited 3 years ago by r-a-y (previous) (diff)

#4 @danbp
3 years ago

I have also MT on the same site, but haven't noticed any issue.

MT's are tabbed and while cliking on whatever MT, i go the right tab and see the correct MT list.
All Members or any type are showed on the same page: /site/members/

The only difference with GT is the slug of the header link: /groups/type/type name.

I'll will test your patch.

Thank you for the quick fix !

#5 @danbp
3 years ago

Patch 0.2 seems to work properly. Merci !

#6 @r-a-y
3 years ago

I have also MT on the same site, but haven't noticed any issue.

Here's what 02.patch does on the Groups Directory:

  1. Navigate to example.com/groups/type/WHATEVER/.
  2. This will filter the Groups Directory to group type whatever.
  3. Now click on the "All Groups" tab. The Groups Directory will show all groups without the group type whatever.

This is what I'm seeing for the Members Directory:

  1. Navigate to example.com/members/type/WHATEVER/.
  2. This will filter the Members Directory to member type whatever.
  3. Now click on "All Members". The Members Directory does not show all members, but still shows members with the type whatever.

What should the correct behavior be?

#7 @danbp
3 years ago

You describe what i suspected since the begin: we don't use the same MT process.
I have no /members/type/whatever/ directory and also, i don't have a MT filter on members directory.

We have also some difference for groups. Whith the patch installed, i can navigate properly from any group to another; The only minor fault, is once you are on Group Type /groups/type/whatever)and you go to All groups, the url doesn't change to /groups/, but the display is correct.

While viewing the one or other directory, i already see and have access to All..., My... and types. And in this(my) case, filtering MT or GT by type is unnecessary as it is made on the tabs.

Also, so far i understood the whole, even if you add a Group Type option to member or group directory, it will only display a list of type using the same pre built sort options "alpha, newest,etc". It would be more interesting, while filtering the directory, that you could search type by type, instead of displaying only all types, eventually sorted by alpha, newest, etc.

What are types for if a visitor can't access them via the directory ?
And what the interest to show him an undistinct type list ?

I know that all this is new. But i also expect some quick enhancements to get it really full of interest.

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


3 years ago

#9 @r-a-y
3 years ago

The only minor fault, is once you are on Group Type /groups/type/whatever)and you go to All groups, the url doesn't change to /groups/, but the display is correct.

01.patch addresses this, but we skip the AJAX goodness though.

I don't mind if we roll with 01.patch. It would make things the same for both member type and group type directories.

This ticket was mentioned in Slack in #buddypress by mercime. View the logs.


3 years ago

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


3 years ago

#12 @hnla
3 years ago

In testing -01 only so far and reading this I'm inclined to think roll with -01 as it does re-set the url even if losing one instance of some Ajax ?"goodness" then re-visit for 2.8.

#13 @hnla
3 years ago

Testing MT using menu links to /members/type/teacher/ etc we have same issue we are not able to return to a all members list so if we go with -01 fix that corrects issue at the sacrifice of Ajax for that initial link back to the tabs interface then we should do so for members as well really.

edit Your -01 patch looks as though it should run same fix for members as for group[s as it's generic to 'types' hmm not sure why it's not doing the same on my install to correct members issue.

Last edited 3 years ago by hnla (previous) (diff)

#14 @hnla
3 years ago

Ok so that's not great if we use the inbuilt template type lists links we add a class 'type' to the body element when we navigate to a 'type' directory, if however I create a manual link to a 'type' url as above for members I don't get the class added which is why the -01 fix doesn't help members. @r-a-y did you add the type class for groups?

Last edited 3 years ago by hnla (previous) (diff)

This ticket was mentioned in Slack in #buddypress by boone. View the logs.


3 years ago

@boonebgorges
3 years ago

#16 @boonebgorges
3 years ago

Thanks for your work here, gents.

I agree that no-ajax is the best solution for the moment. We can try to improve things for 2.8.

The member type directory is not working because, as @hnla notes, it doesn't have the 'type' body class. I think the fact that the group directory does have this type is a bit of a quirk: when viewing example.com/groups/type/foo, bp_current_action() is 'type', while when viewing example.com/members/type/foo, bp_current_action() is empty. Because BP adds the current action to the body class, it ends up being empty in the case of the members directory. It's not a great situation, but I've opted to manually add the 'type' body class to member type directories so that we can be consistent across components.

@hnla @r-a-y if one of you is around, could I get a sanity check?

#17 @hnla
3 years ago

@boonebgorges Yep this was what I figured would be a interim solution, patch tests out, members now tabs back to filtered 'all members' correctly albeit sans Ajax and group types mirror that behaviour.

We'll need to bookmark this to return to though!

#18 @boonebgorges
3 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 11198:

Don't use AJAX to refresh directories when filtered by type.

This is a workaround for a bug that caused the 'type' filter not to be
properly cleared when clicking the All Members or All Groups tab while
viewing a directory.

Props r-a-y, hnla.
Fixes #7291.

Note: See TracTickets for help on using tickets.