Author ezio.melotti
Recipients ajaksu2, amk, eric.araujo, ezio.melotti, loewis
Date 2010-06-18.15:41:27
SpamBayes Score 0.000110879
Marked as misclassified No
Here is a new patch to add the 'add me to nosy' button.

While doing the patch I took the following decisions:
1) Add self to nosy is a common operation and it's not easy to do (either click on the field and write the username, or click on "list", fill in the form, search, select the name, apply), so it definitely deserves a button;
2) On the other hand, removing self from nosy is not that common and it's easier to do (select the name and hit delete on the keyboard), so IMHO it doesn't deserve a button;
3) Assign an issue to self is not a common operation and it can be already done quite easily (click, scroll, click), so it doesn't deserve a 'claim' button;

In this way an 'Add me' button will be visible only on the issues where the user is not nosy. If the user decides to add himself to the nosy the button will disappear and the user won't see any other button while visiting the issue again the following times. If the user doesn't care about that issue it will just leave it there. Therefore the impact on the tracker should be minimal.

In the patch I used TAL to create the button only if the user is registered and the name is not in the nosy list. The button has display:none and it's made visible by javascript. This makes sure that if the user doesn't have JS enabled the button won't be available.
I put the JS code to make the button visible and the callback function to add the user to the nosy list in a separate file to keep the JS separate from the HTML.

The following thing should be checked before committing:
1) does the script deserves a whole new js file? if so a more appropriate name should be selected (I used help_controls2.js because there is already an help_controls.js file -- also note that I could use the same file for other patches, I just didn't use help_controls.js because I wasn't sure it was related in any way);
2) is the position and size of the button OK?;
3) when the button is pressed the name is added and then it disappears, causing a minor change in the layout. This should usually be avoided, but IMHO in this case is not a big problem, since I don't see how it can practically affect the usability.
File name Uploaded
issue266.diff ezio.melotti, 2010-06-18.15:41:27
Date User Action Args
2010-06-18 15:41:29ezio.melottisetrecipients: + ezio.melotti, amk, loewis, ajaksu2, eric.araujo
2010-06-18 15:41:29ezio.melottisetmessageid: <>
2010-06-18 15:41:29ezio.melottilinkissue266 messages
2010-06-18 15:41:27ezio.melotticreate