Skip to:

Opened 6 years ago

Last modified 6 years ago

#7793 new defect (bug)

Manage Activity contexts in a more declarative way in bp.Nouveau.Activity

Reported by: imath's profile imath Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Templates Keywords: needs-patch


This ticket is to follow-up Boone's idea for next release.

I copy/paste the content of his commment below :

  1. The application always knows its currentPostContext (or something like that). These would be, at a glance, all, friends, groups, favorites, mentions, group. When initially setting up the application, this should be set (as part of setupGlobals() maybe), and whenever you click to a different tab, it should be changed.
  1. Somewhere in the application we have a list of postContexts, each of which is an object that has some boolean/text properties (things like object and scope as they are sent to objectRequest()) but also callback support for things like prependNewItems. That is: instead of having a single prependNewItems() callback with a bunch of context-related logic inside of it, we have each context declare its own simple callback. Shared logic (like textContainsCurrentSearchTerm() or textContainsSelfMention() or whatever) can be broken into standalone methods.
  1. Then the inline check is something like if ( currentContext.prependNewItems( text ) ), much like you've written it. We'd also use it when assembling objectRequest params, and maybe other stuff too.

Change History (1)

#1 @DJPaul
6 years ago

  • Milestone changed from 3.1 to Awaiting Contributions
Note: See TracTickets for help on using tickets.