Closed Bug 1316797 Opened 8 years ago Closed 8 years ago

Refactor HighlightersOverlay and TooltipsOverlay into separate modules

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox52 fixed)

RESOLVED FIXED
Firefox 52
Tracking Status
firefox52 --- fixed

People

(Reporter: gl, Assigned: gl)

Details

Attachments

(1 file, 2 obsolete files)

The purpose of this bug is to refactor style-inspector-overlays.js and separate out HighlightersOverlay and TooltipsOverlay into their own individual file/module. This will keep files smaller in size and easier to manage and edit. In addition, this will make it easier to add new features in HighlightersOverlay to take care of handling multiple grid highlighters on the page.
Attached patch 1316797.patch [1.0] (obsolete) — Splinter Review
Attachment #8809740 - Flags: review?(jdescottes)
Attachment #8809740 - Flags: review?(jdescottes)
Attached patch 1316797.patch [2.0] (obsolete) — Splinter Review
Attachment #8809740 - Attachment is obsolete: true
Attachment #8809744 - Flags: review?(jdescottes)
Comment on attachment 8809744 [details] [diff] [review]
1316797.patch [2.0]

Review of attachment 8809744 [details] [diff] [review]:
-----------------------------------------------------------------

Nice refactor Gabriel! 
Works for me with my comments addressed and if try is green.

::: devtools/client/inspector/shared/highlighters-overlay.js
@@ +9,5 @@
>  // The style-inspector overlays are:
>  // - tooltips that appear when hovering over property values
>  // - editor tooltips that appear when clicking color swatches, etc.
>  // - in-content highlighters that appear when hovering over property values
>  // - etc.

Update this comment and remove references to the tooltip overlays.

@@ +47,5 @@
>    /**
>     * Add the highlighters overlay to the view. This will start tracking mouse
>     * movements and display highlighters when needed
>     */
> +  addToView() {

Not against the shorthand style, but it's inconsistent with the rest of the files in this folder. Unless there is a reason to use it only here, I would switch back to the previous style.

::: devtools/client/inspector/shared/tooltips-overlay.js
@@ +8,5 @@
>  
>  // The style-inspector overlays are:
>  // - tooltips that appear when hovering over property values
>  // - editor tooltips that appear when clicking color swatches, etc.
>  // - in-content highlighters that appear when hovering over property values

Update this comment and remove references to the highlighter overlays.
Attachment #8809744 - Flags: review?(jdescottes) → review+
Fixed comments and reverted shorthands.
Attachment #8809744 - Attachment is obsolete: true
Attachment #8809844 - Flags: review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/3530eb420c7f2ec8510304e7e30aee8fe07c23e7
Bug 1316797 - Refactor HighlightersOverlay and TooltipsOverlay into separate modules r=jdescottes
https://hg.mozilla.org/mozilla-central/rev/3530eb420c7f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: