Closed Bug 1824692 Opened 2 years ago Closed 1 years ago

Stale and lost 3-pane message selection/preview, interrupted keyboard navigation when applying and removing quick filters

Categories

(Thunderbird :: Folder and Message Lists, defect, P2)

Thunderbird 112
Unspecified
All

Tracking

(thunderbird_esr102 unaffected, thunderbird115+ fixed)

RESOLVED FIXED
116 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird115 + fixed

People

(Reporter: quadronom, Assigned: darktrojan)

References

(Blocks 2 open bugs)

Details

(5 keywords, Whiteboard: [Supernova3p])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0

Steps to reproduce:

Have an email selected, so it shows in the right messsage pane. Then select a quick filter, e.g. "unread". The email will stay in the right pane. Now deselect the filter, without clicking on any other of the emails. The message pane will still show the original selected email, but now it's not longer selected in the left pane, which leads to confusion.

Great find, quadronom!

Confirming for Daily 113.0a1 (2023-03-27) (64-bit), Win10.
Ouch! Message selection/preview is all wrong when filters from quick filter bar get applied or removed (filter buttons or text filter). 102 has the desired behaviour, which is practical and well-considered.

STR

  1. Have a folder with messages 1, 2, 3, 4, 5.
  2. Ensure message 1 to 3 marked read, and message 4 and 5 unread (good luck! Try selecting another unread msg if it won't budge - bug on record).
  3. Select message 3 (read).
  4. Apply Unread filter from quick filter bar, and observe displayed message in message preview (by analogy for text filter)
  5. Without mouse [sic!], try to keyboard-navigate filter results in message list (Arrow down)
  6. Remove Unread filter, observe message displayed (which must be selected since it's displayed), look for selection and try to keyboard-navigate (Arrow down/up)

Actual result

  • after step 4 (apply filter): Stale selection/preview: msg 3 is still shown, but it's not unread, so it's not part of the result set.
  • step 5 (active filter): fail - can't instantly navigate result messages with keyboard (would need to press Tab a dozen times to get there)
  • after step 6 (remove filter): if the user didn't select any search result (in this case because he couldn't), showing the originally selected message again would be fine. However, displayed message isn't selected, thus instant keyboard navigation fails.

Expected result (as in 102):

  • after step 4 (apply filter) If the selected messsage(s) are not contained in quick filter search results, we need to clear the preview.
  • Remember the original selection so that if the user removes the filter without having new message(s) selected, we can go back to the previous selection. However, make sure that no action may apply to a potentially hidden selection which isn't visible because it's filtered away (Just check what 102 does, which looks well considered).
  • step 5 (active filter): for filter results which do not contain the current selection, ensure that all list navigation keys work instantly without hassles. Especially, Arrow down should select the first message for convenience. As an improvement over 102, if possible, we should perhaps focus the first result message (then the first cursor-down should select it). Not selecting/displaying a random result message looks OK, it might be large, spam, private etc., so we don't know if user is happy with auto-showing the first result message.
  • after step 6 (remove filter): if the user didn't select any search result, select and show the message(s) originally selected before quick filtering.
Severity: -- → S2
Status: UNCONFIRMED → NEW
Component: Untriaged → Folder and Message Lists
Ever confirmed: true
Keywords: ux-mode-error
Priority: -- → P2
Summary: Supernova: 3-pane view selection of current email is lost when activating filter → Stale and lost 3-pane message selection/preview when applying and removing quick filters
Whiteboard: [supernova]
Summary: Stale and lost 3-pane message selection/preview when applying and removing quick filters → Stale and lost 3-pane message selection/preview, interrupted keyboard navigation when applying and removing quick filters

duplicate of bug 1820394 ?

Duplicate of this bug: 1820394

(In reply to Wayne Mery (:wsmwk) from comment #2)

duplicate of bug 1820394 ?

Sure, but let's dupe to here as this covers more scenarios.

Blocks: sn-msglist

Another simple STR, adapted and complemented from Bug 1820394 Comment 0:

STR

  1. Select a message with subject "123foo" from the end of a longer message list
  2. Enter characters into the quick filter bar and watch message list selection and message preview: 1 ... 2 .... 3 => 123foo
  3. Change searchword to 123bar
  4. Remove searchword (e.g. via pressing Esc)
  5. Press Esc to close Quick Filter Bar

Actual result

  • after step 2 (search still matches selection): Although the search result still includes previously selected message, it is unexpectedly deselected (but still shown, that's a confusing state!).
  • after step 3 (search does not match selection): When the search result no longer includes the selected message, it is still shown (that's confusing!), in spite of no selection (which is correct).
  • after step 4 (search text removed without selecting another message from search results): nothing is selected.

Expected result

  • TL;DR: Same behaviour as in 102 - we should be as preservative about user's selected message(s) as we can, and ensure uninterrupted keyboard navigation at all times.
  • after step 2 (search still matches selection): No need to deselect matching message(s). If only some selected messages match, deselect only those that don't.
  • after step 3 (search does not match selection): When the search result no longer includes selected message(s), they must be (temporarily) deselected and obviously no longer be shown.
  • after step 4 (search removed without selecting another message from search results): If nothing else has been selected in the meantime, the previously selected message(s) should conveniently be re-selected and displayed again. Same for pressing Esc repeatedly to gradually remove quickfilters of various sorts.
  • Arrow-down behaviour: Furthermore, when there's quick filter results (or all messages shown), always allow direct, easy keyboard navigation into the message list with Arrow down:
    • if there's active filters with results, but no message from result set was selected before, initially do not focus or preselect anything for the user, which may have unwanted side effects. Arrow down should then focus and select the first message for convenience.
    • If there's no active filters, or some message had focus before, Arrow down should focus and select the message which had focus before, otherwise the first one.
    • We should also define the same Arrow down behaviour for when filter facets like Unread have focus.
  • When Esc is pressed to close the quick filter bar (currently only possible when it was shown via Ctrl+Shift+K, but not when shown via menu...), move focus onto the message which last had focus, without changing its selected state.
Duplicate of this bug: 1825948
Duplicate of this bug: 1826584
Whiteboard: [supernova] → [Supernova3p]

Definitely pretty weird.
Almost any combination of filter buttons messes up the focus/navigation/...

Severity: S2 → S3
Keywords: reproducible
OS: Unspecified → All

quadronom, does this still reproduce for you?

Flags: needinfo?(quadronom)

Yes, nothing has changed about this in 114.0b5.

Flags: needinfo?(quadronom)
Assignee: nobody → geoff
Status: NEW → ASSIGNED

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/47909464f989
Preserve selection when applying quick filters. r=mkmelin
https://hg.mozilla.org/comm-central/rev/993f88f31129
Handle pressing Down key from the quick filter bar correctly. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

Comment on attachment 9337163 [details]
Bug 1824692 - Preserve selection when applying quick filters. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): new mail tab
User impact if declined: selection lost when using quick filters
Testing completed (on c-c, etc.): landed a week ago
Risk to taking this patch (and alternatives if risky): some, but worth it

Attachment #9337163 - Flags: approval-comm-beta?

Comment on attachment 9337166 [details]
Bug 1824692 - Handle pressing Down key from the quick filter bar correctly. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): new quick filter bar
User impact if declined: pressing down focusses the wrong thing
Testing completed (on c-c, etc.): landed a week ago
Risk to taking this patch (and alternatives if risky): very low

Attachment #9337166 - Flags: approval-comm-beta?

Comment on attachment 9337163 [details]
Bug 1824692 - Preserve selection when applying quick filters. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9337163 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9337166 [details]
Bug 1824692 - Handle pressing Down key from the quick filter bar correctly. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9337166 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: