Closed Bug 1691681 Opened 4 years ago Closed 4 years ago

Introduce "Commands" API, to share code related to fronts/RDP without requiring to use Front instances

Categories

(DevTools :: Framework, task)

task

Tracking

(Fission Milestone:M7, firefox88 fixed)

RESOLVED FIXED
88 Branch
Fission Milestone M7
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)

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: nobody → poirot.alex
Status: NEW → ASSIGNED
Depends on: 1692874
Whiteboard: dt-fission-m3-triage
Blocks: 1693269
Blocks: 1693491
Blocks: 1693494
Blocks: 1693499
Blocks: 1693495

This will help expose getCommands method in the next patch.

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.

Attachment #9202000 - Attachment is obsolete: true

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.

Attachment #9202001 - Attachment is obsolete: true
Fission Milestone: --- → M7
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Depends on: 1695744

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.

Attachment #9203933 - Attachment is obsolete: true
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
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Blocks: 1699493
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: