Awesome questions:
1. Given a card, who's watching it?
2. Given a user, what cards are they watching?
|card|+*watchers — Pointer of account-holders
|type card|+*watchers — notifies when cards of that type change (we think we're ok with losing a way to watch one cardtype card)
when a card is changed:
check its +*watchers and the +*watchers of its type
email to "+*email address" of each account-holder listed
use a changes link that goes to the particular edit that triggered the email
Also see:
Feature: Notifications
Background:
Given I log in as Joe User
Scenario: Anonymous User
Given I log out
When I go to the homepage
Then I should not see "watch"
Scenario: Logged in User
When I go to the homepage
Then In the main card footer I should see "watch"
Scenario: Watching a Card
When I go to the homepage
And In the main card footer I click the watch link
And the page updates
Then In the main card footer I should see "unwatch"
And the card Home+*watchers should contain "Joe User"
Scenario: Unwatching a Card
Given the pointer Home+*watchers contains "Joe User"
And I am on the homepage
When In the main card footer I click the unwatch link
And the page updates
Then In the main card footer I should not see "unwatch"
And the card Home+*watchers should not contain "Joe User"
Scenario: Watching a Cardtypes
When I go to card User
Then In the main card footer I should see "watch User cards"
Scenario: A Card whose Cardtype is Watched
Given the pointer User+*watchers contains "Joe User"
When I go to card Joe User
Then In the main card footer I should see "watching User cards"
Scenario: Watching Cardtypes
Given the pointer Cardtype+*watchers contains "Joe User"
When I go to card User
Then In the main card footer I should see "watching Cardtype cards | watch User cards"
text in right corner of footer:
watch — when not getting emails about changes, click to "get emails about changes to |cardname|"
unwatch — when getting emails about changes — click to "stop getting emails about changes to |cardname|"
quoted appears when hovering over the links
- On cards of a type being watched, corner text is "watching |Cardtype| cards" and |Cardtype| links to the cardtype card.
- On Cardtype cards, corner text is "un/watch |Cardtype name| cards" and "get/stop getting emails about changes to |Cardtype name| cards". (And if "Cardtype" itself is being watched then "watching Cardtype cards | " is prepended)
Tried corner text always being visible, went with having it visible only when hovering over the footer.
Email
From email address defaults to WagnBot's email address. Overridden by *notify+*from
On English (John):
√*watchers+*rform (soft) - Pointer
√*watchers+*options - {"type": "User"}
*watching+*rform (hard) - {"plus": ["*watcher", {"refer_to": "_self"} ] } - awaits accept card defs for type
http://en.dwagn.org/wagn/*account+*rform - add +*watching
Who's watching what - {"referred_to_by": {"right": "*watchers"}, "append": "*watching"}
Extensions
If _user+*notify (Toggle) is off, they don't get email
add a way on account cards' Options tab to turn off receiving emails
Trigger
(This is a new general mechanism for triggering something when a card is edited. This describes a narrow case that would be all we implemented for automtically updating watchlists, as Early Steps wants.)
"authors+*trigger" - something like:
{"update": [ {"left": "_left", "right": "*watchers"}, "_self"] }
Then upon changing "To the Moon+authors", WagnBot adds/removes items that were added/removed on +authors on "To the Moon+*watchers"
Search cards
+*item_watchers — notifies when cards that search returns change (gets searches, but loses ease of notify-me-the-moment-it-changes
e.g. +*type cards+*item_watchers
more raw notes: http://etherpad.com/qC57JZS7F2