Closed Bug 1710245 Opened 3 years ago Closed 3 years ago

Sticky pill selection and erratic focus after "Use Bcc instead" from public bulk mail notification

Categories

(Thunderbird :: Message Compose Window, defect, P2)

Tracking

(thunderbird_esr78 unaffected, thunderbird89 affected)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird89 --- affected

People

(Reporter: thomas8, Assigned: thomas8)

References

(Regression)

Details

(Keywords: regression, ux-mode-error)

Attachments

(2 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1706204 +++

STR

  1. compose, add 15 recipients in To or Cc (with Bcc row initially hidden - default)
    -> Public bulk mail notification appears
  2. Hit Use Bcc instead and observe focus and selection thereafter.
  3. Click into other spots like subject, body, or contacts sidebar, trying to get rid of pills selection.

Actual result (see attached screencast)

  • step 2) moved pills are selected, but focus is in Bcc recipient input - this should never happen. When pills are selected, a pill must have focus - if no pill has focus, there must not be selected pills.
  • step 3) Pill selection stubbornly remains - possible, but not easy enough to get rid off.

If you start out with contacts sidebar and Bcc row already open before the move, same problem of sticky selection, but focus jumps over to the address book context menu button - that's even less useful.

Expected result

  • Last selected pill should have focus after bulk moving recipients. Selection provides action success feedback, focus on last pill makes it easy to deselect via cursor-right into recipient input.

This fixes the sticky recipient pills selection by focusing the last selected pill after the move.
Some other nits fixed.

Attachment #9220978 - Flags: review?(lasana)
Comment on attachment 9220978 [details] [diff] [review]
1710245_publicBulkRecipientsFixFocus.diff

Review of attachment 9220978 [details] [diff] [review]:
-----------------------------------------------------------------

Works for me, just include the type in the jsdoc please.

::: mail/components/compose/content/MsgComposeCommands.js
@@ +5233,2 @@
>   *
> + * @returns {Array} All <mail-address-pill> elements in the "To" and "CC" fields.

Specify the array type here so it's clear what it actually contains (in JS not DOM). It may not do much now, but if we ever get into generating API docs from source or type checking it will be very helpful.
Attachment #9220978 - Flags: review?(lasana) → review+

(In reply to Lasana Murray from comment #2)

Review of attachment 9220978 [details] [diff] [review] ⧉[details] [diff] [review]:

    • @returns {Array} All <mail-address-pill> elements in the "To" and "CC" fields.

Specify the array type here so it's clear what it actually contains (in JS
not DOM). It may not do much now, but if we ever get into generating API
docs from source or type checking it will be very helpful.

I'm not sure what to change here - can you propose a change?
I've tried to follow the documentation:
https://jsdoc.app/tags-returns.html
It's a plain Javascript Array of HTML Custom Elements - so {Array} looks correct, and the description provides the details.

Flags: needinfo?(lasana)

perhaps @returns {Element[]}

(In reply to Thomas D. (:thomas8) from comment #3)

I'm not sure what to change here - can you propose a change?
I've tried to follow the documentation:
https://jsdoc.app/tags-returns.html
It's a plain Javascript Array of HTML Custom Elements - so {Array} looks correct, and the description provides the details.

Oh wow, jsdoc still does not support this yet, my bad.
https://github.com/jsdoc/jsdoc/issues/1073

I use the TypeScript reference because use it in other projects:
https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#type

Your call then, personally I think it's helpful; with the YouCompleteMe extension for Vim I get code completion for example.

Flags: needinfo?(lasana)

(In reply to Lasana Murray from comment #2)

Review of attachment 9220978 [details] [diff] [review] ⧉[details] [diff] [review]:

Thanks for the review!

Works for me, just include the type in the jsdoc please.
> + * @returns {Array} All <mail-address-pill> elements in the "To" and "CC" fields.

(In reply to Magnus Melin [:mkmelin] from comment #4)

perhaps @returns {Element[]}

OK, that looks good - done.

r=lasana from comment 2.

Attachment #9220978 - Attachment is obsolete: true
Attachment #9221532 - Flags: review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/8f9fb6e4b672
Prevent sticky recipients selection by focusing last pill after moving public bulk recipients to Bcc. r=lasana

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

(In reply to Pulsebot from comment #7)

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/8f9fb6e4b672
Prevent sticky recipients selection by focusing last pill after moving public bulk recipients to Bcc. r=lasana

Thank you for pushing this to the repository, that was quick! :-)

Target Milestone: --- → 90 Branch
Blocks: 1716823
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: