Difference between revisions of "User:Mikey/project3"

From CDOT Wiki
Jump to: navigation, search
(Created page with '== Project Name == [https://bugzilla.mozilla.org/show_bug.cgi?id=286760 Bug 286760 - Ending a mail address with a space in address book displays it wrong when composing] == Proj...')
 
(Project News)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Project Name ==
 
== Project Name ==
[https://bugzilla.mozilla.org/show_bug.cgi?id=286760 Bug 286760 - Ending a mail address with a space in address book displays it wrong when composing]
+
[https://bugzilla.mozilla.org/show_bug.cgi?id=528508 Bug 528508 - In folder tabs, indicate unread count in tab title]
  
 
== Project Description ==
 
== Project Description ==
This project involves fixing a problem with saved email addresses ending with trailing spaces in the address book causing sent messages to be lost. For example, the user will enter a new contact entry with an email address followed by a space, such as "test@example.com " (minus the quotes) and saves it. In the compose window, they will select the email address that they just saved and send their message, but this message will not be delivered to the recipient.
+
This project involves adding a new feature to the folder tabs' titles. This feature will indicate the title, but, as well, the unread messages in the folders. For example, if the inbox folder is currently being viewed and contains nine unread messages, it would show "Inbox (9)". In addition, the number wrapped in brackets would be bolded.
  
 
== Project Leader(s) ==
 
== Project Leader(s) ==
Line 9: Line 9:
  
 
== Project Contributor(s) ==
 
== Project Contributor(s) ==
 +
...
  
Nobody yet : [http://mikey-osd600a.blogspot.com/2009/11/week-10-try-out-my-patch-please.html Test out my patch on Thunderbird & SeaMonkey. ]
+
== Project Details ==
 +
When a tab is opened, it must show the title's text followed by the number of unread messages (N). The function,[http://mxr.mozilla.org/comm-central/source/mail/base/content/folderDisplay.js#658 folderDisplay.js]'s FolderDisplayWidget_show, uses the [http://mxr.mozilla.org/comm-central/source/suite/mailnews/tabmail.xml#713 tabmail.xml]'s setTabTitle to assign the title's text to the tab's label attribute. By modifying parts of this code, I can concatenate the (N) with the text.
  
== Project Details ==
+
An issue that will have to be addressed is separating the two parts of the tab's title into different fonts.  
After running the [http://mxr.mozilla.org/seamonkey/source/mailnews/mime/test/unit/test_nsIMsgHeaderParser1.js test] with additional test cases, I found that the trailing spaces given in the email address are not discarded when the email address is concatenated with the full name of the contact. For example, if the name of the contact is John Doe and the email address of the contact is "jdoe@example.com " (minus the quotes)(take note of the trailing space), the result would give "John Doe <jdoe@example.com >" (minus the quotes)(including the trailing space).  
 
  
My take on this is to remove the trailing spaces before the result is returned from the [http://mxr.mozilla.org/seamonkey/source/mailnews/mime/src/nsMsgHeaderParser.cpp#836 msg_quote_phrase_or_addr(...)]. I plan on using the macro, [http://mxr.mozilla.org/seamonkey/source/mailnews/mime/src/nsMsgHeaderParser.cpp#61 TRIM_WHITESPACE(...)], to do this.
+
Another issue that needs to be addressed is updating all tabs using the current folder.
  
 
== Project News ==
 
== Project News ==
  
[https://bug286760.bugzilla.mozilla.org/attachment.cgi?id=413868 0.2 Release]: In the end, I did not use the TRIM_WHITESPACE() macro, because of my small understanding of how it works. Just a little bit of code is added to the msg_quote_phrase_or_addr() function. This bit of code removes trailing spaces from the address given. However, I might be at fault, because this code might not be allowed due to some RFC regulations.
+
<s>[https://bug528508.bugzilla.mozilla.org/attachment.cgi?id=417622 0.3 Release]</s>:  
 +
This patch provides the functionality in concatenating the opened folder tabs' titles with their number of unread messages. As long as the user is on the screen, all tabs displaying the current folder will be updated with the current number of unread messages in the folder. A new function, refreshTabTitles(), in the tabmail.xml - which has similar code as to the setTabTitle() - is used with an event listener whenever the user is on the screen.
 +
 
 +
'''Unresolved Problem'''
 +
 
 +
Many attempts were made in order to make the (N) bold. For example, adding and trying to access a new label to the [http://mxr.mozilla.org/comm-central/source/suite/mailnews/tabmail.xml#920 tabmail's tab] to later apply CSS rules to it. Unfortunately, it could not be solved.
 +
 
 +
 
 +
[https://bug528508.bugzilla.mozilla.org/attachment.cgi?id=418162 0.3 Release]:
 +
Same as my first one - this patch provides the functionality in concatenating the opened folder tabs' titles with their number of unread messages. On initialization of Thunderbird, the tabs will show the opened folder tab's unread mesages (N) by the onTitleChanged() function in the mailTabs.js. In addition, when a user does a change in a folder, such as adding/removing a unread message, (N) will be updated in every opened folder tab's title by the UpdateStatusMessageCount() function in the commandglue.js.
 +
 
 +
'''Unresolved Problem'''
 +
 
 +
To make only the (N) in the tab's title bold is still unresolved.

Latest revision as of 10:26, 17 December 2009

Project Name

Bug 528508 - In folder tabs, indicate unread count in tab title

Project Description

This project involves adding a new feature to the folder tabs' titles. This feature will indicate the title, but, as well, the unread messages in the folders. For example, if the inbox folder is currently being viewed and contains nine unread messages, it would show "Inbox (9)". In addition, the number wrapped in brackets would be bolded.

Project Leader(s)

Michael Dennis

Project Contributor(s)

...

Project Details

When a tab is opened, it must show the title's text followed by the number of unread messages (N). The function,folderDisplay.js's FolderDisplayWidget_show, uses the tabmail.xml's setTabTitle to assign the title's text to the tab's label attribute. By modifying parts of this code, I can concatenate the (N) with the text.

An issue that will have to be addressed is separating the two parts of the tab's title into different fonts.

Another issue that needs to be addressed is updating all tabs using the current folder.

Project News

0.3 Release: This patch provides the functionality in concatenating the opened folder tabs' titles with their number of unread messages. As long as the user is on the screen, all tabs displaying the current folder will be updated with the current number of unread messages in the folder. A new function, refreshTabTitles(), in the tabmail.xml - which has similar code as to the setTabTitle() - is used with an event listener whenever the user is on the screen.

Unresolved Problem

Many attempts were made in order to make the (N) bold. For example, adding and trying to access a new label to the tabmail's tab to later apply CSS rules to it. Unfortunately, it could not be solved.


0.3 Release: Same as my first one - this patch provides the functionality in concatenating the opened folder tabs' titles with their number of unread messages. On initialization of Thunderbird, the tabs will show the opened folder tab's unread mesages (N) by the onTitleChanged() function in the mailTabs.js. In addition, when a user does a change in a folder, such as adding/removing a unread message, (N) will be updated in every opened folder tab's title by the UpdateStatusMessageCount() function in the commandglue.js.

Unresolved Problem

To make only the (N) in the tab's title bold is still unresolved.