Skip to content

Commit 3f446ca

Browse files
committed
Add hideInteractions as well as hideDefinitions
hideInteractions is special: we don't have a good way to show run results (other than highlighting and gutter marks). So, as soon as run is clicked, it shows interactions again. But this is useful for having e.g. many editors open in different extension tabs, or just embedding a plain editor.
1 parent 8bba2f4 commit 3f446ca

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

src/web/css/shared.css

+10-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ body.hideDefinitions #loader, body.hideDefinitions .replContainer {
2828
width: 100%;
2929
}
3030

31+
body.hideDefinitions .replMain, body.hideDefinitions #handle,
32+
body.hideInteractions .replContainer, body.hideDefinitions #handle {
33+
display: none;
34+
}
35+
36+
body.hideInteractions #loader, body.hideInteractions .replMain {
37+
left: -5px;
38+
width: 100%;
39+
}
40+
3141
body.hideFooter #loader {
3242
bottom: 0px;
3343
}
3444

35-
body.hideDefinitions .replMain, body.hideDefinitions #handle {
36-
display: none;
37-
}
3845

3946
#help-keys {
4047
position: fixed;

src/web/editor.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@
4949
params[parts[0]] = parts[1];
5050
}
5151
});
52-
if(params["hideDefinitions"]) {
53-
document.body.classList.add("hideDefinitions");
54-
}
52+
if(params["hideDefinitions"]) { document.body.classList.add("hideDefinitions"); }
53+
if(params["hideInteractions"]) { document.body.classList.add("hideInteractions"); }
5554
var footerStyle = params["footerStyle"] || "normal";
5655
switch (footerStyle) {
5756
case 'hide':

src/web/js/beforePyret.js

+4
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,10 @@ $(function() {
14391439
triggerOnLoad
14401440
};
14411441

1442+
// We never want interactions to be hidden *when running code*.
1443+
// So hideInteractions should go away as soon as run is clicked
1444+
CPO.events.onRun(() => { document.body.classList.remove("hideInteractions"); });
1445+
14421446
let initialState = params["get"]["initialState"];
14431447

14441448
if (typeof acquireVsCodeApi === "function") {

0 commit comments

Comments
 (0)