Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4480 closed enhancement (worksforme)

Namespace class names

Reported by: rogercoathup's profile rogercoathup Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.2
Component: Toolbar & Notifications Keywords:
Cc:

Description

Class names (particularly those to which BP is attaching JS functions to generate UI) should be name spaced.
Generic class names like 'confirm' are getting UI elements attached to them in core BP code.

This is wrong! Front end developers should be able to use generic classnames without BP introducing unexpected UI elements.

Details of one example:

BP automatically adds a dialog box confirmation to any <a> tag to which the class 'confirm' is added. This is done in bp-core/bp-corecssjs.php -- function: bp_core_confirmation_js()

To fix this - generic classnames that BP is attaching UI elements to (particularly via core javascripts) should be namespaced.

i.e. use classnames such as 'bp-confirm' instead of 'confirm'

Change History (3)

#1 @DJPaul
12 years ago

  • Component changed from Core to Toolbar/BuddyBar
  • Milestone changed from Awaiting Review to 1.7
  • Version set to 1.2

We won't be revising BP-Default/Legacy's javascript, but any new stuff we write, we will.

#2 @johnjamesjacoby
12 years ago

  • Milestone 1.7 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Arguing against BuddyPress being vague so that others can be vague doesn't make a great case. I agree overall that we should be namespacing things, and that we'll take better care with this in the future.

Since this is an ongoing thing, closing as worksforme.

#3 @DJPaul
8 years ago

  • Component changed from General - Toolbar/BuddyBar to Toolbar & Notifications
Note: See TracTickets for help on using tickets.