The entire area has been converted to a CE. All the event listeners are now generated from within the `mail-recipients-area`, so all the query selections are containerized. Also, since all the recipient inputs are now generated inside the CE, the `setupAutocompleteInput()` method doesn't need to be called when the compose window is loaded. > We shouldn't really be using ids here. I need those IDs for the input fields. What kind of problem we could stumble upon by using IDs? Do you have a better approach to suggest? > There could (in theory) be any recipient areas in one window, and then you'd be hosed. I'm not sure I understood this, and I can't imagine a scenario where the compose window gets generated without any recipient. **Other questions** * Does this feel weird? Having the pill event listeners handled in the `mail-recipients-area` instead of its own CE? * Should we maybe consider moving the `mail-recipients-area` and the `mail-address-pill` into a dedicated file inside the `components/compose/` folder? Maybe a `MsgComposeWidgets.js` file? Here's a try-run to see how many things got broken by these changes: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=ffe52a16b599a9705a251a6a104bd7a290faf1c5
Bug 1601740 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
The entire area has been converted to a CE. All the event listeners are now generated from within the `mail-recipients-area`, so all the query selections are containerized. Also, since all the recipient inputs are now generated inside the CE, the `setupAutocompleteInput()` method doesn't need to be called when the compose window is loaded. > We shouldn't really be using ids here. I need those IDs for the input fields. What kind of problem we could stumble upon by using IDs? Do you have a better approach to suggest? > There could (in theory) be any recipient areas in one window, and then you'd be hosed. I'm not sure I understood this, and I can't imagine a scenario where the compose window gets generated without any recipient. **Other questions** * Does this feel weird? Having the pill event listeners handled in the `mail-recipients-area` instead of the `mail-address-pill` own CE? * Should we maybe consider moving the `mail-recipients-area` and the `mail-address-pill` into a dedicated file inside the `components/compose/` folder? Maybe a `MsgComposeWidgets.js` file? Here's a try-run to see how many things got broken by these changes: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=ffe52a16b599a9705a251a6a104bd7a290faf1c5