Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3340 closed enhancement (fixed)

Replace parentheses around nav item numbers with spans

Reported by: davidtcarson's profile davidtcarson Owned by:
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Core Keywords:
Cc:

Description

Throughout the theme and within components, there are numbers displayed next to navigational items to indicate how many items are within a section.

Example from bp-themes/bp-default/groups/index.php:

All Groups (%s)

Instead of using the parentheses, there should be spans like below.

Example:

All Groups <span>%s</span>

From the prospective of a themer, the parentheses are not useful and limit what can be done with CSS.

I'm submitting a patch that replaces the parentheses with spans and adds some CSS that conforms with bp-default.

I'm running BP 1.3-bleeding.

Attachments (5)

spanned.png (10.0 KB) - added by davidtcarson 13 years ago.
Preview of what it looks like / profile page
spanned.2.png (10.0 KB) - added by davidtcarson 13 years ago.
preview
spanned.3.png (10.0 KB) - added by davidtcarson 13 years ago.
preview profile
3340.patch (17.1 KB) - added by davidtcarson 13 years ago.
3340.1.patch (17.8 KB) - added by davidtcarson 13 years ago.
found more parentheses in bp-themes/bp-default/_inc/global.js

Download all attachments as: .zip

Change History (11)

@davidtcarson
13 years ago

Preview of what it looks like / profile page

@davidtcarson
13 years ago

preview

@davidtcarson
13 years ago

preview profile

@davidtcarson
13 years ago

#1 @boonebgorges
13 years ago

I agree that the parentheses kinda stink, and that spans are better. Much bettor for styling, and better for languages where parentheses might not be used in the same way. DJPaul, what's your take?

@davidtcarson
13 years ago

found more parentheses in bp-themes/bp-default/_inc/global.js

#2 @DJPaul
13 years ago

I really like this patch, and it's very handy that you provided screenshots of the proposed change. Thank you, davidtcarson!

I'm about to put it in, but thought I'd mention three changes I made.
1) for the item-list-tabs CSS, I've added another selector so that the "blue" box changes to the same grey colour on mouseover as the other part of that link.
2) I took out the line-height: 111% for the item-list-tabs as I'm wary of using line-height in this way, and because removing it didn't appear to have an impact on the theme.
3) I took out the orange styles because those orange highlights were removed from the activity stream and blog comments after your patch was made :)

If there was a good reason for that line-height which I've missed, davidtcarson, please let us know and we'll put it back. Thanks again.

#3 @DJPaul
13 years ago

Also thanks to karmatosed from having a look at this at WordCamp Portsmouth this weekend from a designer perspective / impact on themes.

#4 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.3

#5 @djpaul
13 years ago

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

(In [4676]) Replace parentheses around nav item numbers with spans. Fixes #3340, big props davidtcarson

#6 @davidtcarson
13 years ago

Thanks for your help, DJPaul. I had always used a translation file to take care of this issue. But I think this update will help bring more consistency to those elements and make styling much more fun.

I left the line-height bit in there because the alignment had looked a bit off on my local install in Safari. But it looks great now without it after updating to the latest.

Note: See TracTickets for help on using tickets.