Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6e2b03a

Browse files
committed
Fix UI issues.
1 parent fbfbc8f commit 6e2b03a

File tree

3 files changed

+39
-56
lines changed

3 files changed

+39
-56
lines changed

‎src/ui/index.html

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111
</head>
1212

1313
<body>
14-
<div class="panel root-panel"></div>
1514
<div class="control-panel">
1615
<label class="label problem-label" for="problem-select">Problem:</label>
1716
<select id="problem-select">
1817
</select>
1918
<button id="run-button">▶ Run</button>
2019
<button id="save-button">Save</button>
2120
</div>
22-
<div class="panel">
21+
<div class="panel"id="root-panel">
2322
<!-- Left Panel -->
2423
<div id="left-panel" class="panel panel-col">
2524
<div class="tab-panel panel-item-fixed-height">
@@ -59,61 +58,16 @@
5958
</div>
6059
<div id="tab-test-results" class="tab-test-results tab-content tab-bottom-right content">
6160
<div class=" bottom-right-content" id="test-results-content">
62-
<p>Duration: 21 ms</p>
63-
<p>Status: Ok</p>
64-
<p>Testcase Name: All</p>
65-
<hr>
66-
67-
<p>Testcase Name: All</p>
68-
<p>Status: Success</p>
69-
<hr>
70-
71-
<p>Testcase Name: All</p>
72-
<p>Status: Success</p>
73-
<hr>
74-
75-
<p>Testcase Name: All</p>
76-
<p>Status: Success</p>
77-
<hr>
78-
79-
<p>Testcase Name: All</p>
80-
<p>Status: Success</p>
81-
<hr>
82-
83-
<p>Testcase Name: All</p>
84-
<p>Status: Success</p>
85-
<hr>
86-
87-
<p>Testcase Name: All</p>
88-
<p>Status: Success</p>
89-
<hr>
90-
91-
<p>Testcase Name: All</p>
92-
<p>Status: Success</p>
93-
<hr>
94-
95-
<p>Testcase Name: All</p>
96-
<p>Status: Success</p>
97-
<hr>
98-
99-
<p>Testcase Name: All</p>
100-
<p>Status: Success</p>
101-
<hr>
102-
103-
<p>Testcase Name: All</p>
104-
<p>Status: Success</p>
105-
<hr>
10661
</div>
10762
</div>
108-
<div id="tab-compilation" class="tab-compilation compilation-panel tab-content content active">
109-
<pre class="compilation-content bottom-right-content content" id="compilation-content">ads asasd as das as</pre>
63+
<div id="tab-compilation" class="tab-compilation compilation-panel tab-content content">
64+
<pre class="compilation-content bottom-right-content content" id="compilation-content"></pre>
11065
</div>
11166
</div>
11267
<!-- Right Panel BOTTOM END -->
11368
</div>
11469
<!-- Right Panel END -->
11570
</div>
116-
</div>
11771
</body>
11872

11973
</html>

‎src/ui/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function run() {
118118
var element = document.getElementById("compilation-content");
119119
element.textContent = parseBuildError(stdout);
120120
document.getElementById('tab-compilation').click();
121+
console.error("Error running command, error: ", error);
121122
return;
122123
}
123124
var element = document.getElementById("compilation-content");
@@ -229,7 +230,11 @@ document.addEventListener('DOMContentLoaded', (event) => {
229230
vertical: 'auto',
230231
horizontal: 'auto'
231232
},
232-
automaticLayout: true
233+
automaticLayout: true,
234+
dimension: {
235+
width: 400,
236+
height: 400
237+
}
233238
});
234239

235240
onProblemSelected(problemNames[0]);
@@ -254,13 +259,13 @@ document.addEventListener('DOMContentLoaded', (event) => {
254259
document.addEventListener('DOMContentLoaded', (event) => {
255260
Split(['#left-panel', '#right-panel'], {
256261
minSize: 100,
257-
expandToMin: true,
262+
sizes: [50,50],
258263
gutterSize: 5,
259264
})
260265

261266
Split(['#top-right-panel', '#bottom-right-panel'], {
262267
minSize: 100,
263-
expandToMin: true,
268+
sizes: [75,25],
264269
gutterSize: 5,
265270
direction: 'vertical',
266271
cursor: 'row-resize',

‎src/ui/styles.css

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
--tab-font-color: var(--grey-font-color);
1919

2020
--content-font-family: "Segoe UI";
21+
22+
--scrollbar-foreground: #d4d4d4;
23+
--scrollbarSlider-background: rgba(121, 121, 121, 0.4);
2124
}
2225

2326
body {
@@ -80,6 +83,7 @@ select:hover {
8083
background-color: var(--tab-background);
8184
padding: 5px;
8285
color: var(--tab-font-color);
86+
height: 18px;
8387
}
8488

8589
.tab {
@@ -102,12 +106,10 @@ select:hover {
102106
}
103107

104108
.bottom-right-content {
105-
height: 300px;
106109
overflow-y: auto;
107110
}
108111

109112
.tab-content-left {
110-
height: 100vh;
111113
margin: 5px;
112114
}
113115

@@ -126,7 +128,6 @@ select:hover {
126128
.compilation-content {
127129
background-color: var(--grey-very-dark);
128130
width: 100%;
129-
height: 100%;
130131
white-space: pre-wrap; /* Wraps the text */
131132
word-break: break-all; /* Breaks the words */
132133
margin: 0;
@@ -168,6 +169,12 @@ select:hover {
168169
flex: none;
169170
}
170171

172+
#test-results-content, #user-solution-content {
173+
height: 100%; /* or any fixed height */
174+
width: 100%; /* or any fixed width */
175+
overflow: auto; /* add scrollbars if content overflows */
176+
}
177+
171178
code {
172179
background-color: #ffffff12;
173180
border-color: #f7faff1f;
@@ -179,4 +186,21 @@ code {
179186
line-height: 1rem;
180187
padding: 0.125rem;
181188
white-space: pre-wrap;
182-
}
189+
}
190+
191+
.editor{
192+
height: 100%;
193+
}
194+
195+
html, body {
196+
height: 100%;
197+
}
198+
199+
#test-results-content, #user-solution-content, .tab-test-results, #bottom-right-panel, #root-panel, #tab-compilation, #tab-testcase, #compilation-content {
200+
height: 100%;
201+
overflow: auto;
202+
}
203+
204+
#bottom-right-panel {
205+
overflow: hidden;
206+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /