Open Bug 1568499 Opened 6 years ago Updated 3 years ago

Check if we could merge WebConsole, WebConsoleUI and WebConsoleWrapper

Categories

(DevTools :: Console, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

Details

Here's the current state of the webconsole panel hierarchy:

  • WebConsolePanel has a hud property, which is a WebConsole instance
  • WebConsole has a ui property which is a WebConsoleUI instance
  • WebConsoleUI has a wrapper property which is a WebConsoleWrapper instance
  • WebConsoleWrapper renders the React app

If seems like we could collapse WebConsole, WebConsoleUI and WebConsoleWrapper, as it's unclear why each of these are separated.

This is probably a relic of ancient time when we transitioned to the new console frontend.
Everything could be under the WebConsole (and the BrowserConsole, which extends BrowserConsole), making the code easier to follow.

This could also help clarify some of our interaction and methods, which are often only piping things to other instance methods.

Big +1! A side effect would be that we would no longer have "hud", which is very cryptic and doesn't help understanding that it is actually a reference to WebConsole/BrowserConsole!
If that's any helpful, we could start with merging just WebConsole/BrowserConsole and WebConsoleUI, so that at least, we no longer have this hud thing.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.