Closed Bug 59049 Opened 24 years ago Closed 12 years ago

Disable "Search subfolders" if no subfolders exist

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspitzer, Assigned: ewong)

References

Details

(Whiteboard: [see comment #11 for what todo][good first bug][Halloween2011Bug])

Attachments

(1 file, 2 obsolete files)

here are some suggestions for the "Search subfolders" check box in search.

1)  based on the selection in the picker, we should:

a) if the selection is mail (server or folder) use "subfolders"
b) if the selection is news (server or group) use "subgroups"

if the selection is an object with out children, diable the check box (make it
greyed out.)

"subgroups" is better than "subfolders" but still sub optimal.

jglick, can you come up with a better one?
Status: NEW → ASSIGNED
cc'ing Robin Foster for wording suggestion. "subgroups" seems ok to me. Robin, 
is that the correct spelling?
Yes, "subgroups" spelling is OK.
QA Contact: esther → laurel
taking all of varada's bugs.
Assignee: varada → sspitzer
Status: ASSIGNED → NEW
Product: Browser → Seamonkey
Assignee: sspitzer → mail
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search
Assignee: mail → nobody
Priority: P3 → --
QA Contact: search → message-display
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
Status: NEW → UNCONFIRMED
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but still has no comment since the inception of the SeaMonkey project 5 years ago.

Because of this, we're resolving the bug as EXPIRED.

If you still can reproduce the bug on SeaMonkey 2 or otherwise think it's still valid, please REOPEN it and if it is a platform or toolkit issue, move it to the according component.

Query tag for this change: EXPIRED-20100420
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → EXPIRED
Since we don't show "subgroups" as such, rewording that is useless.

But disabling the subfolder search if not needed still makes sense.
Severity: normal → minor
Component: MailNews: Message Display → MailNews: General
QA Contact: message-display → mail
Hardware: x86 → All
Summary: suggestions for the "Search subfolders" check box in search → Disable "Search subfolders" if no subfolders exist
Whiteboard: [see comment #11 for what todo][good first bug][Halloween2011Bug]
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → ewong
Status: NEW → ASSIGNED
Attachment #600879 - Flags: review?(mnyromyr)
Comment on attachment 600879 [details] [diff] [review]
Disable "Search subfolders" if no subfolders exist. (v1)

Some nits:

>+  if (window.arguments && window.arguments[0]) {

Brace on its own line,please.

>+    selectFolder(window.arguments[0].folder);
>+    updateSubFolder(window.arguments[0].folder);

Probably worth putting window.arguments[0].folder in a variable first and using that then.

>+function updateSubFolder(folderSelect)

Function name should start with an uppercase letter, function parameters should have an a prefix, i.e. aFolderSelect.

>+  var folder = folderSelect;
>+  folder = GetMsgFolderFromUri(folder, true);

Why not just 
  var folder = GetMsgFolderFromUri(aFolderSelect, true);

>+  if (!folder)
>+  {
>+    folder = folderSelect;
>+  }

You're always passing an URI string as folderSelect, so what's the point of this?
If the URI is not tied to a folder, just disable the UI element.

>+  var subFolder = document.getElementById("checkSearchSubFolders");
>+  subFolder.disabled = ! folder.hasSubFolders;

No space after the !, please.
Attachment #600879 - Flags: review?(mnyromyr) → review-
Attachment #600879 - Attachment is obsolete: true
Attachment #603983 - Flags: review?(mnyromyr)
Comment on attachment 603983 [details] [diff] [review]
Disable "Search subfolders" if no subfolders exist. (v2)

>+    var winArgFolder = window.arguments[0].folder;
>+

Superfluous empty line.

>+function UpdateSubFolder(afolderSelect)

Should be aFolderSelect.

>+  var folder = GetMsgFolderFromUri(afolderSelect, true);
>+
>+  var subFolder = document.getElementById("checkSearchSubFolders");
>+  subFolder.disabled = !folder.hasSubFolders;

The empty line and the subFolder variable are not necessary, but the null check for folder is. 
What I meant was to disable the UI element if folder is null or hasn't any subfolders.
Sorry for being unclear.
Attachment #603983 - Flags: review?(mnyromyr) → review-
Attachment #603983 - Attachment is obsolete: true
Attachment #604828 - Flags: review?(mnyromyr)
Comment on attachment 604828 [details] [diff] [review]
Disable "Search subfolders" if no subfolders exist. (v3)

Yep, that's it! :)
r/moa=me.
Attachment #604828 - Flags: superreview+
Attachment #604828 - Flags: review?(mnyromyr)
Attachment #604828 - Flags: review+
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/4b5da7e5d068
Status: ASSIGNED → RESOLVED
Closed: 14 years ago12 years ago
Resolution: --- → FIXED
Blocks: 943096
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: