Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 3 years ago

#5499 closed enhancement (wontfix)

New activity items count into the tag title and on the "load newest" button

Reported by: SGr33n Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Templates Keywords: needs-patch needs-refresh good-first-bug
Cc:

Description

Hi,

This is my enhancement to show the newest activity items count inside the tag title and on the "load newst" button, like on Twitter.

I hope you can use it.

Based on buddypress.js latest svn 8222.

Attachments (3)

buddypress.js (62.3 KB) - added by SGr33n 6 years ago.
buddypress.js (newest activity items count on tag title)
5499.diff (2.3 KB) - added by imath 6 years ago.
5499.02.patch (2.7 KB) - added by imath 5 years ago.

Download all attachments as: .zip

Change History (20)

@SGr33n
6 years ago

buddypress.js (newest activity items count on tag title)

@imath
6 years ago

#1 @imath
6 years ago

Thanks SGr33n just transformed your buddypress.js file into a diff one so that's easier to see the changes you are suggesting.

#2 @imath
6 years ago

  • Version set to 2.0

Just gave it a quick test, this is really nice !! I love it :) Thanks a lot for your contribution.

#3 @SGr33n
6 years ago

Thanks to you for all the work :)

#4 @imath
6 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 2.1

you're welcome, i guess this would need a refresh considering #5505 let's watch it again for 2.1

#5 @SGr33n
6 years ago

Ok, see you on the 5505 bug ticket.

#6 @DJPaul
5 years ago

  • Component changed from Core to Theme
  • Keywords has-patch removed

#7 @imath
5 years ago

  • Keywords has-patch added; needs-refresh removed

Thanks a lot DJPaul for reminding me this ticket :)

@SGr33n

Last time i simply pasted your code and created a patch out of it. Today i've explored it more, and i'm suggesting a slightly different version to arrive at the same goal (for instance i didn't understand why you were storing the number of activities in a cookie as we don't need to carry this info in other pages..). Here's a screenshot so everybody can see how 5499.02.patch is looking like :

https://farm4.staticflickr.com/3905/14733165054_97e21e365b_z.jpg

It gives an information of how much newest activities are waiting to be loaded in the <title> tag and in the load newest link.
If the newest activities are loaded (click on the load newest link or a new update posted), it resets the document title.

It's the kind of small things i just love! What do you think ?

@imath
5 years ago

#8 follow-up: @SGr33n
5 years ago

Really good :D but I was just thinking about the tag title... maybe It's eventually better to preserve it to display the new notifications in some future implementation... if you want... I already made it on my theme :)

#9 @r-a-y
5 years ago

Love it. imath!

maybe It's eventually better to preserve it to display the new notifications in some future implementation

I don't think new notifications will require altering the page <title>. We would just update the notification number in the WP adminbar or something like that.

#10 in reply to: ↑ 8 @imath
5 years ago

Replying to SGr33n:

Really good :D but I was just thinking about the tag title... maybe It's eventually better to preserve it to display the new notifications in some future implementation... if you want... I already made it on my theme :)

Thanks SGr33n & r-a-y for your feedbacks. I agree with r-a-y, i think the "enhancement territory" of new Notifications is not the page title, moreover if we have Activity Heartbeat count in title, being on the activity directory, we might have an overloaded title with Notifications & Newest activities.

About, Notifications (but that's surely another ticket story), i think the "enhancement territory" is more in ajax updating the WP Admin Bar bubbles ;)

#11 @SGr33n
5 years ago

It's right, I made it on my theme just because I deactivated the WP Admin Bar for non admin users (like on earlier BP versions), so I had to recreate it under BuddyPress, but if you have the WP one, you don't need it.

#12 @DJPaul
5 years ago

  • Keywords needs-patch added; has-patch removed

I don't think that this is fully translatable/localisable:

  • <a href="#newest">' + BP_DTheme.newest + ' (' + newest_activities_count + ')</a>
  • prop( 'title', '(' + newest_activities_count + ') ' + document_title)

The first one is fixable if you use a gettext-style placeholder in the string, but I don't know if there is anything we can or worry about for the latter.

#13 @DJPaul
5 years ago

  • Keywords early added
  • Milestone changed from 2.1 to 2.2

#14 @DJPaul
5 years ago

  • Keywords needs-refresh added; early removed
  • Milestone changed from 2.2 to 2.3

#15 @DJPaul
5 years ago

  • Keywords good-first-bug added
  • Milestone changed from 2.3 to Future Release

#16 @DJPaul
3 years ago

  • Component changed from Appearance - Template Parts to Templates

#17 @DJPaul
3 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Let's close this as it's a very old ticket and affects BP-Legacy.

Note: See TracTickets for help on using tickets.