Closed Bug 1527834 Opened 8 months ago Closed 8 months ago

Naming in console is confusing

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(2 files)

There's a few place where the name, either of files or properties are confusing.

  • hud.ui refers to WebConsoleFrame, which makes it difficult to link this ui to the file it's defined in.
  • WebConsoleWrapper.hud refers to WebConsoleFrame, which is very confusing, as panel.hud refers to webconsole.js. Furthermore, this hud is passed everywhere in the component tree, adding to the confusion.

I think it would make sense to remove webconsole-frame.js to webconsole-ui.js (and WebConsoleFrame to WebConsoleUi), and WebConsoleWrapper.hud to WebConsoleWrapper.ui.

We take this as an opportunity to migrate the
file to an ES6 class and remove unused code.

This better reflects what the property is (i.e. a
WebConsoleUi instance), and avoid confusion with
the panel's hud (created in webconsole.js).
We take that as an opportunity to clean things up
a bit (e.g. don't access the webConsoleUi through
JsTerm).

Depends on D19781

Attachment #9043867 - Attachment description: Bug 1527834 - Rename WebConsoleWrapper:hud to WebConsoleWrapper:webConsoleUi; r=bgrins. → Bug 1527834 - Rename WebConsoleWrapper:hud to WebConsoleWrapper:webConsoleUI; r=bgrins.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/613d3e6bc2c0
Rename webconsole-frame.js to webconsole-ui.js; r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/13913068fd8e
Rename WebConsoleWrapper:hud to WebConsoleWrapper:webConsoleUI; r=bgrins.
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.