Closed Bug 1534400 Opened 11 months ago Closed 10 months ago

Gutter hover shouldn't display if source is blackboxed

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: davidwalsh, Unassigned)

Details

Attachments

(1 file)

Since we don't allow adding breakpoints to these sources, we shouldn't show the hover; it could mislead the user.

Hi David,

Can I try this one?
Is this going to be updated in the mozilla-central or the github debugger repository?

Thanks!

Sure Mellina! This was what I was going to try:

diff --git a/src/components/Editor/Editor.css b/src/components/Editor/Editor.css
index d7b637632..9a0b5af90 100644
--- a/src/components/Editor/Editor.css
+++ b/src/components/Editor/Editor.css
@@ -78,7 +78,7 @@ html[dir="rtl"] .editor-mount {
   pointer-events: none;
 }
 
-:not(.empty-line):not(.new-breakpoint)
+.editor-wrapper:not(.blackboxed) :not(.empty-line):not(.new-breakpoint)
   > .CodeMirror-gutter-wrapper:hover
   > .CodeMirror-linenumber::after {
   content: "";
diff --git a/src/components/Editor/index.js b/src/components/Editor/index.js
index 31113ef04..187a1a6cb 100644
--- a/src/components/Editor/index.js
+++ b/src/components/Editor/index.js
@@ -636,9 +636,13 @@ class Editor extends PureComponent<Props, State> {
   }
 
   render() {
+    const { selectedSource } = this.props;
+
     return (
       <div
-        className={classnames("editor-wrapper")}
+        className={classnames("editor-wrapper", {
+          blackboxed: selectedSource && selectedSource.isBlackBoxed
+        })}
         ref={c => (this.$editorWrapper = c)}
       >
         <div

Hi David,

I have created a revision here. It seems that you were correct! I have inserted your changes, I've tested it and it worked.

Let me know if it works on your side.

Thanks!

Flags: needinfo?(dwalsh)
Flags: needinfo?(dwalsh)
Priority: -- → P3
Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/176f099593fe
Gutter hover shouldn't display if source is blackboxed r=davidwalsh
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.