Some thoughts on notifications

7 views
Skip to first unread message

ptone

unread,
Nov 3, 2009, 3:35:41 PM11/3/09
to Pinax Users
In the primary nav - the tab label for the combined inbox is "Inbox"
However this is not at all the same thing as "Inbox" in the subnav.

I know this is a simple override in templates - but I think its worth
considering a change of the default

This is pretty confusing when you see "Inbox(5)" in the primary, but
"Inbox(0)" in the sub

There might be a number of ways to solve this:

Call the primary tab "Notices" and then rename the "Notices" subtab to
"Activity"

Leave primary as Inbox and rename sub to Messages or (Private
Messages)

Furthermore, the subtab currently named Notices is very verbose - and
while one can choose not to receive email - there isn't currently a
way to silence certain notification types.

So I looked into django-notifications, and there is the start of a
pluggable backend in the "mediums", but it remains to be implemented.

However, I found a way of very easily adding a backwards compatible
way to allow users to add a pref for "on site" notifications.

NOTICE_MEDIA = (
("1", _("Email")),
("2", _("On Site"))
)

NOTICE_MEDIA_DEFAULTS = {
"1": 2, # email,
"2": 1
}

Then right before new notices are sent:

+> on_site = should_send(user, notice_type, "2")
notice = Notice.objects.create(user=user, message=messages
['notice.html'],
notice_type=notice_type, on_site=on_site)

This renders correctly in the settings table, and seems to work
without breaking anything - and without preventing future mediums from
being added.

Speaking of the settings table - this should really be a sub-tab of
the account page shouldn't it?
(with a link from the notices page).

-Preston

skylar....@gmail.com

unread,
Nov 3, 2009, 6:10:31 PM11/3/09
to pinax...@googlegroups.com
I think that you have some really good ideas here. At a minimum I would lik to see the main notices tab go to notices rather than inbox since inevitably the number in the tab is referring to notices rather than mail. This is a really easy change to make but I think that it's worthy as a default.
Sent from my Verizon Wireless BlackBerry

Brian Rosner

unread,
Nov 3, 2009, 6:57:32 PM11/3/09
to pinax...@googlegroups.com

On Nov 3, 2009, at 1:35 PM, ptone wrote:

> In the primary nav - the tab label for the combined inbox is "Inbox"
> However this is not at all the same thing as "Inbox" in the subnav.
>
> I know this is a simple override in templates - but I think its worth
> considering a change of the default
>
> This is pretty confusing when you see "Inbox(5)" in the primary, but
> "Inbox(0)" in the sub

This will be fixed in 0.9 for a slightly different reason. There is a
template dependancy in the default templates on messages which may not
be available in basic_project. I would prefer to just see notices
split out in its own tab thus separating them enough to avoid count
merging.

> Furthermore, the subtab currently named Notices is very verbose - and
> while one can choose not to receive email - there isn't currently a
> way to silence certain notification types.

In theory there is only one type of notification ;-)

Currently, django-notification doesn't distinguish between on_site and
e-mail notification. In most cases they are the same thing. This is
being fixed in my pb branch (http://github.com/brosner/django-notification/tree/pb
) which will land in 0.9.

> Speaking of the settings table - this should really be a sub-tab of
> the account page shouldn't it?
> (with a link from the notices page).

I wouldn't be opposed to this. Though we may have to tweak how that
view works possibly.

Brian Rosner
http://oebfare.com

ptone

unread,
Nov 3, 2009, 8:18:59 PM11/3/09
to Pinax Users

> Currently, django-notification doesn't distinguish between on_site and  
> e-mail notification. In most cases they are the same thing. This is  
> being fixed in my pb branch (http://github.com/brosner/django-notification/tree/pb
> ) which will land in 0.9.

I'm not really informed RE the pinax roadmap - but a 3 line fix that I
think is pretty robust could allow this as an option for pinax .8
timeframe - .9 feels far away.

http://github.com/ptone/django-notification/commit/a49b55c255c5c3a021bcab8f9b09487dce666b2e

It really works and seems to be just that simple ;-)

I'm happy to see that backend progress is being made.
Reply all
Reply to author
Forward
0 new messages