Opened 6 years ago
Closed 2 years ago
#8052 closed enhancement (fixed)
Suggestion for Activity Stream - link to Post
Reported by: | bee360 | Owned by: | imath |
---|---|---|---|
Milestone: | 11.0.0 | Priority: | normal |
Severity: | normal | Version: | 4.1.0 |
Component: | Blogs | Keywords: | dev-feedback has-patch has-unit-tests |
Cc: | sbrajesh |
Description
Hi Team,
When Activity Stream includes to show new blog posting, blog content excerpt will be shown with [...] at the end, not even "read more", etc. (will be great to add ability to config and set the actual word for "read more"). To review the actual post, user would need to click the post subject or the time stamp, which seems not a great experience for users.
That will be definitely a great improvement in user experience if the blog content excerpt turned to be a clickable link to the actual post, which brings similar Facebook experience to click on the wall to reach the post page with comments showing at the bottom.
Thanks for reviewing.
Attachments (2)
Change History (29)
#1
@
6 years ago
- Component changed from Core to Blogs
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to Awaiting Contributions
- Priority changed from strategic to normal
#2
@
3 years ago
I also agree with this suggestion, I raised similar issue for clickable featured images at https://buddydev.com/support/forums/topic/turn-activity-featured-image-into-clickable-links/
#3
@
3 years ago
- Cc sbrajesh added
- Keywords has-patch added; needs-patch removed
Hi,
Here is a patch attached to link the featured image to the blog post.
Is it feasible to have it in the core now?
Thank you
#4
@
3 years ago
- Milestone changed from Awaiting Contributions to 11.0.0
Sure @sbrajesh !
Thanks for the patch. Let's include this into 11.0.
#6
@
3 years ago
@sbrajesh Will the activity (post excerpts) also be turned into clickable links?
Thanks
#8
@
2 years ago
- Keywords 2nd-opinion added; good-first-bug removed
I've just added 8052.2.patch to complement @sbrajesh work with improvements about the activity content generated.
This is what I get without the 8052.2.patch applied:
As you can see, the generated layout is pretty ugly. I believe the image should be on the left side and the text on the right side.
Moreover to take in account a bit more the main purpose of the ticket description, I've added a new ending [...] looking more to what happens when WordPress manages the <!-- more -->
comment. + If a theme is adding some custom "read more text & link" it will also be used into the activity.
Finally I've added the Post title (including a link to the post) at the beginning of the generated activity. This way if a post has not featured image it can be used to open the post page.
This is what I get once the 8052.2.patch is applied:
What's your opinion about these improvements?
#9
@
2 years ago
- Keywords good-first-bug added; 2nd-opinion removed
@imath will this updates also work for other custom activity updates registered by other post types and not just blog posts only.
Example
Activity updates from from custom post types like adverts, events, jobs etc
#10
@
2 years ago
I would prefer the image width to be 100% as I would like the display to be optimized for mobile phone display just like how Instagram photos fill the screen
#11
@
2 years ago
Thanks for your feedbacks.
This layout is specific to new_blog_post
activity type, so it won't be used for custom post types activity types.
I'll see what I can do about the image width.
#12
@
2 years ago
@teeboy4real Forcing BuddyPress to use the full size featured image is something you can already achieve in BuddyPress using the bp_activity_create_summary_extractor_args
filter. See an example of code here: https://gist.github.com/imath/84678e53db7ac2fe36e7ac589cea6c8b
Here's how 8052.2.patch combined with the code from the Gist looks like on desktop:
On a mobile:
#13
@
2 years ago
@imath thanks for the feedback, I'm really satisfied with the display as they look more engaging.
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
2 years ago
#15
@
2 years ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 13305:
#16
@
2 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
@imath I noticed this with the post title appearing in two places I think the first should be removed since its already added to the new layout.
#17
@
2 years ago
- Keywords dev-feedback added; ui-feedback good-first-bug has-patch removed
Thanks for your feedback @teeboy4real. To be honest, I also thought about it but when I've looked at how we build this Post Link in bp_blogs_format_activity_action_new_blog_post()
I've hesitated and I'm still doing so. The goal of these "format_activity" functions was to improve multilingual community sites as these are fired at run time (compared to having the action inside the activity db table). We currently use an activity meta to retrieve the post title for this link, this activity meta is updated each time the post is updated etc... So there's a lot of code involved there. I'm fine with making this move as it's precisely avoiding all this code and it should avoid some DB queries. But I'd like some other team members opinion about it as it's a wider change.
#18
@
2 years ago
@imath I think the alternative would be to add a CSS class to the first post title so it can be hidden via CSS
Display; none
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
2 years ago
#20
@
2 years ago
Hi @r-a-y, I'd be very interested to have your opinion about the change I'm suggesting to do in #comment:17 🙏 😁. Thanks in advance for your help.
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
2 years ago
This ticket was mentioned in PR #27 on buddypress/buddypress by @imath.
2 years ago
#22
- Keywords has-patch has-unit-tests added
Stop using the post link into the new_blog_post
activity action.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8052
#24
@
2 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Hello @imath
Can you add the same design support for activities created by custom post types so the styling can be uniform.
I use a classified plugin (wpadverts.com) with a buddypress addon but the activity styling is different from post activities
This code was sent to change the advert activity
/* Change buddypress wpadverts activity display format */ add_filter( "wpadverts_bp_activity_add_params", function( $args, $post_id ) { $content = ""; /** Insert Ad Content */ $content .= "<br/>". get_the_excerpt( $post_id ) . "<br/>"; /** Insert Ad Price */ $content .= "<b>". adverts_get_the_price( $post_id ) . "</b>"; /** Insert Ad Image */ $image_id = adverts_get_main_image_id( $post_id ); if( $image_id ) { $content .= sprintf( '<img src="%s" alt="" /> ', adverts_get_main_image( $post_id ) ); } $args["content"] = $content; return $args; }, 10 , 2);
Kindly see link below for more info
#25
@
2 years ago
Hi @teeboy4real I’m not sure I understand the code part.
If it’s can BuddyPress include a filter to a plugin extending BuddyPress ? It’s weird, just like if I would ask WordPress to extend BuddyPress ??
I’ll check what we’re doing to let plugins manage the activity output but if it’s « use a callback function », then the best placed is the Plugin author…
#26
@
2 years ago
Hi @imath,
My focus is for buddypress to provide a guideline or filter for uniform design styling to activities created from custom post types.
Activities of posts, ads, events, jobs etc should appear similar.
Hope my suggestion makes any sense
Thanks
#27
@
2 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Ok, let's see how this new design is welcomed for the Post post type and think about how to reach your statement in next release, considering not every post type supports the featured image feature etc.. , story about it continues there: #8779
For the post post type, the goal was reached so I'm closing this ticket.
This is a great idea.