Skip to content

Commit 4aa1a4e

Browse files
dansanduleacbulldozer-bot[bot]
authored andcommitted
Debugger improvements (#93)
Decision tree changes: Display more information about the selected node (incoming/result state, and evaluated level indent for level nodes), and performance improvements. Evaluated indent is useful in order to quickly show where indent might change (though it might not get added to the state's current indent if we're inlining). Additionally, we record each exploration's incoming state, as this might differ from the level node's incoming state (because different explorations, depending on whether they try to inline or not, change the indent in different ways). ![image](https://user-images.githubusercontent.com/222827/70151009-ddce0180-16a2-11ea-804c-8ae9b2780446.png)
1 parent 5428ff0 commit 4aa1a4e

10 files changed

Lines changed: 391 additions & 176 deletions

File tree

‎debugger/src/App.css‎

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -42,70 +42,6 @@
4242
display: none;
4343
}
4444

45-
/* DecisionTree */
46-
47-
.TreeAndDoc {
48-
display: flex;
49-
flex-direction: row;
50-
width: 100%;
51-
height: 1000px;
52-
max-height: 1000px;
53-
}
54-
55-
.TreeAndDoc > * {
56-
flex-grow: 1;
57-
flex-basis: 50%;
58-
/** necessary to prevent overflow */
59-
max-width: 50%;
60-
}
61-
62-
.TreeAndDoc .DecisionTree {
63-
margin: 10px 0;
64-
overflow: scroll;
65-
}
66-
67-
/**
68-
* Since the Treebeard tree has a different background, we want to make sure it always takes up the space or else
69-
* it looks ugly.
70-
*/
71-
.TreeAndDoc .DecisionTree > ul {
72-
min-height: 100%;
73-
}
74-
75-
.TreeAndDoc .InlineDocs {
76-
display: flex;
77-
flex-direction: column;
78-
overflow: scroll;
79-
}
80-
81-
.TreeAndDoc .InlineDocs .InlineDoc {
82-
flex-grow: 1;
83-
flex-basis: auto;
84-
}
85-
86-
.HighlightInlineDoc {
87-
flex-grow: 0;
88-
flex-shrink: 1;
89-
}
90-
91-
/* InlineDoc */
92-
93-
.InlineDoc .doc-level.referenced {
94-
border-radius: 2px;
95-
background-color: hsla(56, 100%, 51%, 0.4);
96-
}
97-
98-
/** Inside a referenced level, highlight direct children very specifically. */
99-
.InlineDoc .doc-level.referenced > .highlight {
100-
background-color: hsl(120, 61%, 80%);
101-
}
102-
103-
/** Inside a referenced level, highlight nested inner levels with progressively more red to indicate depth. */
104-
.InlineDoc .doc-level.referenced .doc-level {
105-
background: hsla(0, 40%, 50%, 0.15);
106-
/*outline: 2px solid hsla(0, 40%, 0%, 0.3);*/
107-
}
108-
10945
/* Ops */
11046

11147
.Ops span.token:hover {

‎debugger/src/TreeAndDoc.css‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.TreeAndDoc {
2+
display: flex;
3+
flex-direction: row;
4+
width: 100%;
5+
height: 1000px;
6+
max-height: 1000px;
7+
}
8+
9+
.TreeAndDoc > * {
10+
flex-grow: 1;
11+
flex-basis: 50%;
12+
/** necessary to prevent overflow */
13+
max-width: 50%;
14+
}
15+
16+
.TreeAndDoc > .column1 {
17+
margin: 10px 0;
18+
display: flex;
19+
flex-direction: column;
20+
}
21+
22+
.TreeAndDoc .DecisionTree {
23+
overflow: scroll;
24+
flex-grow: 1;
25+
}
26+
27+
/**
28+
* Since the Treebeard tree has a different background, we want to make sure it always takes up the space or else
29+
* it looks ugly.
30+
*/
31+
.TreeAndDoc .DecisionTree > ul {
32+
min-height: 100%;
33+
width: fit-content;
34+
min-width: 100%;
35+
}
36+
37+
.TreeAndDoc .InlineDocs {
38+
display: flex;
39+
flex-direction: column;
40+
overflow: scroll;
41+
}
42+
43+
.TreeAndDoc .InlineDocs .InlineDoc {
44+
flex-grow: 1;
45+
flex-basis: auto;
46+
}
47+
48+
.HighlightInlineDoc {
49+
flex-grow: 0;
50+
flex-shrink: 1;
51+
}
52+
53+
/* InlineDoc */
54+
55+
.InlineDoc .doc-level.referenced {
56+
border-radius: 2px;
57+
background-color: hsla(56, 100%, 51%, 0.4);
58+
}
59+
60+
/** Inside a referenced level, highlight direct children very specifically. */
61+
.InlineDoc .doc-level.referenced > .highlight {
62+
background-color: hsl(120, 61%, 80%);
63+
}
64+
65+
/** Inside a referenced level, highlight nested inner levels with progressively more red to indicate depth. */
66+
.InlineDoc .doc-level.referenced .doc-level {
67+
background: hsla(0, 40%, 50%, 0.15);
68+
/*outline: 2px solid hsla(0, 40%, 0%, 0.3);*/
69+
}
70+
71+
.TreeAndDoc .node-info {
72+
overflow-x: scroll;
73+
min-height: 100px;
74+
max-height: 100px;
75+
}
76+
77+
.TreeAndDoc .node-info td {
78+
padding: 0 5px;
79+
}
80+
81+
.TreeAndDoc .explorationNode-description {
82+
text-decoration: underline;
83+
}

0 commit comments

Comments
 (0)