Introduce "Commands" API, to share code related to fronts/RDP without requiring to use Front instances
Categories
(DevTools :: Framework, task)
Tracking
(Fission Milestone:M7, firefox88 fixed)
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 2 open bugs)
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file, 3 obsolete files)
(deleted),
text/x-phabricator-request
|
Details |
Most panels ends up having a layer on top of Fronts which could easily be considered as Front codebase.
But:
- because front are to be instanciated,
- because they are non serializable object (can't be JSON.stringified or passed as-is in redux stores)
- because backward compat can't always be handled within fronts, but rather outside of them,
- because we sometime have to call many target's fronts
we end up putting lots of RDP-related code, either in middle of the panel codebase (like the inspector), or in Debugger's client modules, or in Netmonitor's connector modules.
This makes it hard to be sure what code should be put on fronts, or in these additional layers.
This also makes it harded to share these additional layers with other panels, as we tend to easier use redux store in them as it feels part of the frontend. We had to workaround about just that in netmonitor, and come up with NetmonitorAPI in order to be able to spawn the Netmonitor's Connector without opening the netmonitor panel.
We would benefit from an official layer, use the same way between panel which would:
- gather all backward compatiblity code
- contain all custom code currently in fronts, so that we no longer have custom front classes. Fronts would still exists, but would be the sole implementation of the specifications.
- dispatch the method call to multiple target's fronts, if that's required
- dispatch the method call to parent pocess front and/or content process front based on server implementation details
On top of all that, this layer should be accessible very easily from any panel, without having any dependency with any panel's code/module. In theory, this layer should work without any UI. Without a toolbox, without any panel, without redux stores.
This layer should be singletons. We should expose global methods, which may receive IDs of remote instances, but methods should be static and be called as such.
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Comment on attachment 9202000 [details]
Bug 1691681 - [devtools] Move getBlockRequest to Network command.
Revision D103203 was moved to bug 1693495. Setting attachment 9202000 [details] to obsolete.
Comment 6•4 years ago
|
||
Comment on attachment 9202001 [details]
Bug 1691681 - [devtools] Use Inspector command for suggestion queries.
Revision D103204 was moved to bug 1693494. Setting attachment 9202001 [details] to obsolete.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Comment on attachment 9203933 [details]
Bug 1691681 - [devtools] Use a DescriptorMixin in order to share a common interface between all descriptor fronts.
Revision D105610 was moved to bug 1695744. Setting attachment 9203933 [details] to obsolete.
Assignee | ||
Comment 8•4 years ago
|
||
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bcff59baec6 [devtools] Introduce "commands" in order to ease calling global commands throught the Watcher. r=nchevobbe,bomsy,jdescottes
Comment 10•4 years ago
|
||
bugherder |
Description
•