Closed Bug 501516 Opened 16 years ago Closed 16 years ago

right click folder -> search causes the search to be in the displayed folder, not the selected one

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: rain1, Assigned: rain1)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

We use gFolderDisplay.displayedFolder at <http://mxr.mozilla.org/comm-central/source/mail/base/content/mailWindowOverlay.js?rev=520d3adf13f9#3381>, which doesn't work out for the context menu.
Summary: right click folder -> search selects displayed folder, not selected one → right click folder -> search causes the search to be in the displayed folder, not selected one
Summary: right click folder -> search causes the search to be in the displayed folder, not selected one → right click folder -> search causes the search to be in the displayed folder, not the selected one
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b4
Attached patch wip without tests (obsolete) — Splinter Review
Assignee: nobody → sid.bugzilla
Status: NEW → ASSIGNED
Attached patch patch, v1 (obsolete) — Splinter Review
Per discussion with Bryan, this includes a fix for multiple search windows as well.
Attachment #394406 - Attachment is obsolete: true
Attachment #394649 - Flags: ui-review?(clarkbw)
Attachment #394649 - Flags: review?(bugmail)
Attachment #394649 - Flags: review?(bienvenu)
Comment on attachment 394649 [details] [diff] [review] patch, v1 asking r? bienvenu for the fix, asuth for tests, and clarkbw for the UX. Bryan, please ui-r- if this doesn't work well.
Whiteboard: [needs review asuth][needs review bienvenu][needs ui-review clarkbw]
Comment on attachment 394649 [details] [diff] [review] patch, v1 > <menuitem id="folderPaneContext-searchMessages" > label="&folderContextSearchMessages.label;" > accesskey="&folderContextSearchMessages.accesskey;" >- command="cmd_search"/> >+ oncommand="gFolderTreeController.searchMessages();"/> This looks wrong.
(In reply to comment #5) > (From update of attachment 394649 [details] [diff] [review]) > > <menuitem id="folderPaneContext-searchMessages" > > label="&folderContextSearchMessages.label;" > > accesskey="&folderContextSearchMessages.accesskey;" > >- command="cmd_search"/> > >+ oncommand="gFolderTreeController.searchMessages();"/> > > This looks wrong. Why? The way I've done is is that the default for MsgSearchMessages() (accel-shift-F or anything else that triggers the cmd_search command) should be the displayed folder, while the default for gFolderTreeController.searchMessages() should be the selected one. This was the best way I could find to express this logic.
Yeah looks good on a second look :) Should probably add a check for canSearchmessages to the context menu setup code though. (Not that that was done earlier either.)
The patch seems to fix the bug for me, but the mozmill test fails. I'm leery now about my mozmill setup, but the other tests you changed seem to work fine. When I run this test, I don't see the folder list expanded, nor does a window open up. TEST-PASS | setupModule TEST-UNEXPECTED-FAIL | test_open_search_window_with_nothing_selected EXCEPTION: Thought we would find row null at 10,0 but we found -1 at: test-folder-display-helpers.js line 620 Error("Thought we would find row null at 10,0 but we found -1") 0 _row_click_helper([object XULElement],null,2) test-folder-display-helpers.js 620 right_click_on_folder([object XPCWrappedNative_NoHelper]) test-folder-display-helpers.js 731 open_search_window_from_context_menu([object XPCWrappedNative_NoHelper]) test-search-window-helpers.js 94 test_open_search_window_with_nothing_selected() test-right-click-to-open-search-window.js 61 frame.js 452 frame.js 504 frame.js 546 frame.js 409 frame.js 557 server.js 164 server.js 168 TEST-UNEXPECTED-FAIL | test_open_search_window_with_existing_single_selection EXCEPTION: Desired selection is: RightClickToOpenSearchWindowA but actual selection is: tinderbox@invalid.com at: test-folder-display-helpers.js line 1553 Error("Desired selection is: RightClickToOpenSearchWindowA but actual selection is: tinderbox 0 assert_folders_selected([object XPCWrappedNative_NoHelper]) test-folder-display-helpers.js 1553 assert_folders_selected_and_displayed([object XPCWrappedNative_NoHelper]) test-folder-display-helpers.js 1602 test_open_search_window_with_existing_single_selection() test-right-click-to-open-search-window.js 72 frame.js 452 frame.js 504 frame.js 546 frame.js 409 frame.js 557 server.js 164 server.js 168 TEST-UNEXPECTED-FAIL | test_open_search_window_with_one_thing_selected EXCEPTION: Desired selection is: RightClickToOpenSearchWindowA but actual selection is: tinderbox@invalid.com at: test-folder-display-helpers.js line 1553 Error("Desired selection is: RightClickToOpenSearchWindowA but actual selection is: tinderbox 0 assert_folders_selected([object XPCWrappedNative_NoHelper]) test-folder-display-helpers.js 1553 assert_folders_selected_and_displayed([object XPCWrappedNative_NoHelper]) test-folder-display-helpers.js 1602 test_open_search_window_with_one_thing_selected() test-right-click-to-open-search-window.js 85 frame.js 452 frame.js 504 frame.js 546 frame.js 409 frame.js 557 server.js 164 server.js 168
Attached patch patch v1.01Splinter Review
oops
Attachment #394649 - Attachment is obsolete: true
Attachment #394909 - Flags: ui-review?(clarkbw)
Attachment #394909 - Flags: review?(bugmail)
Attachment #394909 - Flags: review?(bienvenu)
Attachment #394649 - Flags: ui-review?(clarkbw)
Attachment #394649 - Flags: review?(bugmail)
Attachment #394649 - Flags: review?(bienvenu)
Comment on attachment 394909 [details] [diff] [review] patch v1.01 test passes now...
Attachment #394909 - Flags: review?(bienvenu) → review+
Attachment #394909 - Flags: review?(bugmail) → review+
Comment on attachment 394909 [details] [diff] [review] patch v1.01 fantastic work on the unit tests
Comment on attachment 394909 [details] [diff] [review] patch v1.01 sorry for the delay. thanks!
Attachment #394909 - Flags: ui-review?(clarkbw) → ui-review+
Whiteboard: [needs review asuth][needs review bienvenu][needs ui-review clarkbw] → [needs landing]
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
(In reply to comment #8) > Should probably add a check for canSearchmessages to the context menu setup > code though. (Not that that was done earlier either.) Filed bug 511060.
Keywords: regression
Depends on: 512088
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: