[outline] the outline view should select the current paused function
It would be really cool if the outline view were a bit more responsive.
There are two things we can do:
- have a soft grey highlight when you click in a function in the editor
- 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...
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)}
>
/claim
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!
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