debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[outline] the outline view should select the current paused function

Open jasonLaster opened this issue 8 years ago • 4 comments

It would be really cool if the outline view were a bit more responsive.

There are two things we can do:

  1. have a soft grey highlight when you click in a function in the editor
  2. have a blue background "selected state" when you're paused in a function in the editor

I think this would really help make the outline view more useful as a way of seeing where you are...

jasonLaster avatar Nov 16 '18 20:11 jasonLaster

diff --git a/src/components/PrimaryPanes/Outline.js b/src/components/PrimaryPanes/Outline.js
index 2a2d4357a..e70a02c7c 100644
--- a/src/components/PrimaryPanes/Outline.js
+++ b/src/components/PrimaryPanes/Outline.js
@@ -142,12 +142,16 @@ export class Outline extends Component<Props, State> {
   }

   renderFunction(func: FunctionDeclaration) {
+    const { selectedLocation } = this.props;
     const { name, location, parameterNames } = func;

+    // likely can import from somewhere
+    const isSelected = contains(location, selectedLocation);
+
     return (
       <li
         key={`${name}:${location.start.line}:${location.start.column}`}
-        className="outline-list__element"
+        className={classnames("outline-list__element", { isSelected })}
         onClick={() => this.selectItem(location)}
         onContextMenu={e => this.onContextMenu(e, func)}
       >

jasonLaster avatar Jan 07 '19 21:01 jasonLaster

/claim

nyrosmith avatar Jan 07 '19 21:01 nyrosmith

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Jan 07 '19 21:01 claim

Firefox Developer Tools (including Debugger tool) development is now entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger

Please reopen this report in Bugzilla if it's still valid.

Honza

janodvarko avatar Feb 26 '21 14:02 janodvarko