Skip to:
Content

BuddyPress.org

Opened 4 weeks ago

Last modified 4 weeks ago

#9308 new defect (bug)

Risky: bp-groups-template.php adds ".hidden" class.

Reported by: tschwarz's profile t.schwarz Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc: emaralive

Description

In line 730 of bp-groups-template.php a status class is added to a listed group.

                // Group type - public, private, hidden.
                $classes[] = sanitize_key( $groups_template->group->status );

A class like "hidden" is so generic it may be affected by theme or plugin CSS that may define, rightly or wrongly, a broadly scoped ".hidden"-class that, in turn, may have the unintentional effect of visually hiding groups that should be visible to the user.

I suggest adding a prefix to the status class like "status-" to avoid this problem.

                // Group type - public, private, hidden.
                $classes[] = 'status-' . sanitize_key( $groups_template->group->status );

Change History (2)

#1 @dcavins
4 weeks ago

This is a good point. I think of it as the bootstrap trap, where bootstrap uses the most generic class names possible and conflicts with nearly everything. :)

The downside of this change is that if people are targeting the .hidden class, their styles will miss their targets. I can't think of a way to introduce this change without messing up a few people. I mean, we could add group-status-public and public for a version to allow people who actually read the release notes to make the update smoothly, but that's not a large group of people.

#2 @emaralive
4 weeks ago

  • Cc emaralive added
Note: See TracTickets for help on using tickets.