Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[WhyPaused] Move why paused to the call stack #3111

Description

@jasonLaster

We often hear that the call stack "jumps" when stepping. One reason for this is that when you resume the why paused goes away and then comes back.

Another issue with why paused is that it often doesn't say much. Like when you're paused on a BP you know that... I think it would be nice to move it "into" the call stack component so that it acts as additional context on the frames themselves. Here's a before and after. This is mostly just styling :)

Here's an early patch

diff --git a/src/components/SecondaryPanes/Frames/index.js b/src/components/SecondaryPanes/Frames/index.js
index 2730df9..a0f2bbb 100644
--- a/src/components/SecondaryPanes/Frames/index.js
+++ b/src/components/SecondaryPanes/Frames/index.js
@@ -12,6 +12,11 @@ import type { SourcesMap } from "../../../reducers/sources";
 import _FrameComponent from "./Frame";
 const FrameComponent = createFactory(_FrameComponent);
 
+
+import _WhyPaused from "./WhyPaused";
+const WhyPaused = createFactory(_WhyPaused);
+
+
 import _Group from "./Group";
 const Group = createFactory(_Group);
 
@@ -176,6 +181,7 @@ class Frames extends Component {
     return dom.div(
       { className: "pane frames" },
       this.renderFrames(frames),
+      WhyPaused(),
       this.renderToggleButton(frames)
     );
   }
diff --git a/src/components/SecondaryPanes/WhyPaused.css b/src/components/SecondaryPanes/WhyPaused.css
index d334caa..3e0a5d2 100644
--- a/src/components/SecondaryPanes/WhyPaused.css
+++ b/src/components/SecondaryPanes/WhyPaused.css
@@ -8,6 +8,8 @@
   opacity: 0.9;
   font-size: 12px;
   flex: 0 1 auto;
+
+/* make it centered, not bold, italicized...*/
 }
 
 .theme-dark .secondary-panes .why-paused {
diff --git a/src/components/SecondaryPanes/index.js b/src/components/SecondaryPanes/index.js
index f120ba2..6db5ce8 100644
--- a/src/components/SecondaryPanes/index.js
+++ b/src/components/SecondaryPanes/index.js
@@ -16,9 +16,6 @@ import { isEnabled } from "devtools-config";
 import Svg from "../shared/Svg";
 import { prefs } from "../../utils/prefs";
 
-import _WhyPaused from "./WhyPaused";
-const WhyPaused = createFactory(_WhyPaused);
-
 import _Breakpoints from "./Breakpoints";
 const Breakpoints = createFactory(_Breakpoints);
 
@@ -221,7 +218,6 @@ class SecondaryPanes extends Component {
         style: { overflowX: "hidden" }
       },
       CommandBar(),
-      WhyPaused(),
       this.props.horizontal
         ? this.renderHorizontalLayout()
         : this.renderVerticalLayout()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Priority

    None yet

    Jira

    None yet

    Severity

    None yet

    Estimate

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions