Clean-up load/shutdown/render functions in view-controller.js and aboutaddons.js
Categories
(Toolkit :: Add-ons Manager, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: ntim, Assigned: rpl)
References
Details
Attachments
(10 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
I think this is worth doing after bug 1525179 and all the related clean ups.
In short:
- showView/loadViewInternal are combined into one
gViewController
method - gViewController.initialize/initializeView are combined into an aboutaddons.js method
- shutdown in view-controller.js is moved into the unload listener added in the initialize method
To make sure gViewController
remains an independent component, the view-specific logic from both showView
and loadViewInternal
can be extracted out into a defineView
/registerView
method that's called from aboutaddons.js. The newly combined function would loop through the registered views and call the right view load function. This also allows getting rid of the hardcoded viewTypes
in loadViewInternal
.
gViewController.registerView("discover", (container) => {
let discoverView = new DiscoveryView();
let elem = discoverView.render();
await document.l10n.translateFragment(elem);
container.append(elem);
});
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
Depends on D103262
Updated•4 years ago
|
Reporter | ||
Comment 3•4 years ago
|
||
Depends on D103263
Updated•4 years ago
|
Reporter | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
|
||
Comment 6•4 years ago
|
||
Comment on attachment 9201655 [details]
Bug 1689240 - Make gViewController a custom element.
Revision D104325 was moved to bug 1691271. Setting attachment 9201655 [details] to obsolete.
Reporter | ||
Comment 7•4 years ago
|
||
Reporter | ||
Comment 8•4 years ago
|
||
ni? rpl about taking over in case he has time :)
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
Depends on D104190
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D108510
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D108511
Assignee | ||
Comment 12•4 years ago
|
||
Depends on D108512
Assignee | ||
Comment 13•4 years ago
|
||
Depends on D108513
Assignee | ||
Comment 14•4 years ago
|
||
I'm taking over this bug as agreed with ntim.
Assignee | ||
Comment 15•4 years ago
|
||
This test-only change does fix a TV job failure that I did notice in some of my last push to try
(the one that I did notice was happening on the TV job while running in linux x65 opt build).
Depends on D108514
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a9c8bc14824
https://hg.mozilla.org/mozilla-central/rev/3fbfc79bf96a
https://hg.mozilla.org/mozilla-central/rev/292d29ba4e9d
https://hg.mozilla.org/mozilla-central/rev/5f5a855bce31
https://hg.mozilla.org/mozilla-central/rev/b08cd0d38cb5
https://hg.mozilla.org/mozilla-central/rev/0ce37bd2f2cd
https://hg.mozilla.org/mozilla-central/rev/cecb522cad4f
https://hg.mozilla.org/mozilla-central/rev/40cdb964eb03
https://hg.mozilla.org/mozilla-central/rev/b900e6890599
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Reporter | ||
Comment 21•4 years ago
|
||
Updated•4 years ago
|
Comment 22•4 years ago
|
||
Comment 23•4 years ago
|
||
bugherder |
Description
•