fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-02-08 08:37 am

[dw-free] Options for tracking an entry are getting overwhelming

[commit: http://hg.dwscoalition.org/dw-free/rev/e0fc665cfd05]

http://bugs.dwscoalition.org/show_bug.cgi?id=4320

Sort into categories, reorder options.

Patch by [personal profile] fu.

Files modified:
  • bin/upgrading/en.dat
  • htdocs/manage/tracking/entry.bml
--------------------------------------------------------------------------------
diff -r 08a830db9a65 -r e0fc665cfd05 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Sat Feb 04 19:56:34 2012 +0800
+++ b/bin/upgrading/en.dat	Wed Feb 08 16:38:39 2012 +0800
@@ -3675,6 +3675,8 @@
 
 subscribe_interface.category.track-entry=Track This Entry
 
+subscribe_interface.category.track-journal=Track Entries to this Journal
+
 subscribe_interface.category.track-user=Track This User
 
 subscribe_interface.inbox=Inbox
diff -r 08a830db9a65 -r e0fc665cfd05 htdocs/manage/tracking/entry.bml
--- a/htdocs/manage/tracking/entry.bml	Sat Feb 04 19:56:34 2012 +0800
+++ b/htdocs/manage/tracking/entry.bml	Wed Feb 08 16:38:39 2012 +0800
@@ -50,7 +50,9 @@
     return LJ::error_list("Invalid entry") unless $entry && $entry->valid;
     return LJ::error_list("You are not authorized to subscribe to this entry.") unless $entry->visible_to($remote);
 
+    # comments to this entry
     my $cat_title = 'Track Entry';
+    my $journal_cat_title = 'Track Journal';
     my $categories =
         [
             { $cat_title =>
@@ -71,17 +73,34 @@
                         flags   => LJ::Subscription::TRACKING,
                     ),
                 ],
-            }
+            },
+            {
+                $journal_cat_title => [],
+            },
         ];
 
-    push @{ @$categories[0]->{$cat_title} },
+
+    # journal-wide comments and entries
+
+    # all comments in a community
+    push @{ @$categories[1]->{$journal_cat_title} },
         LJ::Subscription::Pending->new( $remote,
             event   => "JournalNewComment",
             journal => $journal,
             flags   => LJ::Subscription::TRACKING,
         ) if $remote->can_track_all_community_comments( $journal );
 
-    push @{ @$categories[0]->{$cat_title} },
+    # all new entries
+    push @{ @$categories[1]->{$journal_cat_title} },
+        LJ::Subscription::Pending->new( $remote,
+            event   => "JournalNewEntry",
+            journal => $journal,
+            flags   => LJ::Subscription::TRACKING,
+        );
+
+
+    # new entries with a tag
+    push @{ @$categories[1]->{$journal_cat_title} },
         LJ::Subscription::Pending->new( $remote,
             event   => "JournalNewEntry",
             arg1    => '?',
@@ -90,7 +109,8 @@
             flags   => LJ::Subscription::TRACKING,
         );
 
-    push @{ @$categories[0]->{$cat_title} },
+    # new entries by a specific poster
+    push @{ @$categories[1]->{$journal_cat_title} },
         LJ::Subscription::Pending->new( $remote,
             event   => "JournalNewEntry",
             arg2    => $entry->posterid,
@@ -98,12 +118,6 @@
             flags   => LJ::Subscription::TRACKING,
         ) if $journal->is_community;
 
-    push @{ @$categories[0]->{$cat_title} },
-        LJ::Subscription::Pending->new( $remote,
-            event   => "JournalNewEntry",
-            journal => $journal,
-            flags   => LJ::Subscription::TRACKING,
-        );
 
     my $referer = BML::get_client_header('Referer');
     my ( $style ) = ( $referer =~ /\b(style=\w+)/ );
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org