[buddypress-trac] [BuddyPress Trac] #7774: BP Nouveau: the very first activity is not injected into the stream.
buddypress-trac
noreply at wordpress.org
Tue May 1 15:29:57 UTC 2018
#7774: BP Nouveau: the very first activity is not injected into the stream.
--------------------------+---------------------
Reporter: imath | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Templates | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+---------------------
Comment (by boonebgorges):
Thanks, @imath. The basic logic here seems OK to me.
A thought about your headache :) Currently, `prepended` is being
determined in a procedural way, which results in lots of scattered code. I
wonder if some of this might be handled in a more declarative way. Let's
say that, for example, `bp.Nouveau.Activity` had a property or a method
`contexts` or something like that, which might look something like:
{{{
contexts: {
mentions: {
prependNewItems: function() { something that tests whether the new
item has `@me` }
},
my_groups: {
prependNewItems: false
}
sitewide: {
prependNewItems: true
}
}
}}}
and so forth. We could also use this space to define things like
`template` and `object` that are currently handled inline in
`objectRequest`. This might help us simplify the internals (you just check
`getContext().prependNewItems` or whatever) and make the whole thing
easier to reason about and maintain. This is just a thought and is
something that definitely doesn't need to happen for 3.0, but I thought
I'd bring it up to see what you think.
Aside from this the patch looks fine :-D
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7774#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list