Closed Bug 1891792 Opened 6 months ago Closed 2 months ago

Eliminate Inline Event Handlers From FullPageTranslationsPanel

Categories

(Firefox :: Translations, task)

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: nordzilla, Assigned: tschuster, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Description

See Bug 1890547 for more context.
See Bug 1891782 for an example of a similar bug to follow as a guide.

This bug tracks the progress of removing all inline event handlers from the FullPageTranslationsPanel markup.

We need to remove all of the inline event handlers from the FullPageTranslationsPanel markup and instead lazily initialize them in the JS file for the FullPageTranslationsPanel.


Steps to implement


Tests to implement

  • The changes should preserve the exact same behavior as before.
  • Preexisting test coverage is sufficient.
No longer blocks: select_translations_mvp
No longer blocks: 1870298
Assignee: nobody → tschuster
Keywords: good-first-bug

Sorry. I didn't realize that we already had a good-first-bug for this before working on it.

(In reply to Tom Schuster (MoCo) [mostly OOO] from comment #1)

Sorry. I didn't realize that we already had a good-first-bug for this before working on it.

Hey Tom,

That's okay! I actually think I marked it as good-first-bug before I realized about the subtle nuances in the way that oncommand is handled differently for <menulist> elements.

You can refer to my review comment regarding the details, but this bug is actually going to be a bit more involved than simply moving the calls from the markup to the JS.

Gijs just fwiw because I hadn't realized that issue with the command event not triggering on <menulist> items. I will try and see if we overlooked this in another bug before.

Flags: needinfo?(gijskruitbosch+bugs)

Thanks for the heads up. We don't have a lot of menulists in the browser.xhtml code, so I'm not too worried. There's the content select dropdown (which already uses addEventListener), and the webrtc popup dropdowns for cameras/screens/etc. which we haven't touched and also already use event listeners. It wouldn't hurt to doublecheck the patches we've done already, but I'd be surprised if there was anything there.

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by tschuster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/56bb128841f5 Remove inline oncommand event handlers in FullPageTranslationsPanel. r=nordzilla,translations-reviewers https://hg.mozilla.org/integration/autoland/rev/aa42311c2c86 Remove inline onclick event handlers in FullPageTranslationsPanel. r=translations-reviewers,nordzilla
Keywords: leave-open
Regressions: 1911342
Keywords: leave-open
Pushed by tschuster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93ce570e89e2 Remove inline popup event handlers in FullPageTranslationsPanel. r=translations-reviewers,nordzilla
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: