Modify

Opened 20 months ago

Last modified 14 months ago

#10675 new defect

General Wiki Announcements box should not be shown when user has not set their email

Reported by: rjollos Owned by: rjollos
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: hasienda Trac Release:

Description

The General Wiki Announcements box should not be shown when the user has not set their email.

Screen capture of Announcer panel when email has not been set:


Screen capture of Announcer panel after email has been set:


Attachments (8)

EmailNotSet.png (22.4 KB) - added by rjollos 20 months ago.
EmailSet.png (36.1 KB) - added by rjollos 20 months ago.
t10675-r12359-1.patch (548 bytes) - added by rjollos 20 months ago.
EmailNotSet-AfterPatch.png (19.6 KB) - added by rjollos 20 months ago.
EmailNotSet-AfterPatch-2.png (23.2 KB) - added by rjollos 20 months ago.
t10675-r12359-2.patch (695 bytes) - added by rjollos 20 months ago.
EmailNotSet-AfterPatch-3.png (23.8 KB) - added by rjollos 20 months ago.
t10675-r12359-3.patch (4.9 KB) - added by rjollos 20 months ago.

Download all attachments as: .zip

Change History (13)

Changed 20 months ago by rjollos

Changed 20 months ago by rjollos

Changed 20 months ago by rjollos

Changed 20 months ago by rjollos

comment:1 Changed 20 months ago by rjollos

  • Status changed from new to assigned

The patch is simple. After the patch we see:


I can think of two options to improve on the behavior following the patch:

  • Hide the Announcer panel when there are no boxes present.
  • Show a message to indicate that the user needs to set an email to reveal preference boxes.

Changed 20 months ago by rjollos

Changed 20 months ago by rjollos

Changed 20 months ago by rjollos

comment:2 Changed 20 months ago by rjollos

t10675-r12359-2.patch causes the following message to be displayed when there are no preference boxes to display (e.g. when the email address has not been set):


I prefer the way the patch is currently implemented, but a variation of the patch would show the following:


Some considerations:

  • Later on, when distributors other than email exist, we'll have to change the 'email' not in req.session logic to extend to other distributors. Since that will require major changes to the codebase, it doesn't seem like we need to address that at the moment.
  • It appears that it would make sense to also show a similar message when there are no subscribers listed under the Subscription panel, and that some of the existing notify rules should first be checking that the email has been set for user anonymous. That could also be addressed in a follow-on ticket.

Changed 20 months ago by rjollos

comment:3 Changed 20 months ago by rjollos

t10675-r12359-3.patch implements a functional test harness, and adds functional tests for the two issues addressed in this ticket. I attempted to use as much of Trac's existing functional test infrastructure as possible, which leaves a TODO since I'm not sure yet how inject a derived instance of FunctionalTester into the FunctionalTestSuite class. I suspect we will need to move towards overriding the setUp and tearDown methods of FunctionalTestSuite (which is what the XmlRpcPlugin and AccountManagerPlugin have done - those are the only two plugins on trac-hacks that I can find which have implemented functional tests).

Since the implementation makes use of FunctionalTestEnvironment.post_create, the tests can only be run under Trac 0.11.5dev or later. There is a check in the code to disable the functional tests when the minimum version of Trac is not met. I don't think the version restriction will significantly hinder development, but let's discuss if you think this will be an issue.

comment:4 Changed 20 months ago by rjollos

All the work that I have planned for this ticket has been posted, so this ticket just needs review of the 3 patches.

comment:5 Changed 14 months ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.