Skip to content

Commit 59af4fa

Browse files
author
Daniel Herzog
committed
Fixed the horizontal scrolling, simplified the overflow of the details-container.
1 parent dec976e commit 59af4fa

File tree

3 files changed

+23
-65
lines changed

3 files changed

+23
-65
lines changed

src/network/network_details_templates.js

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,12 @@ templates.details = function(entry, left_val, do_raw)
2323
"handler", "resize-request-detail"
2424
],
2525
["div",
26-
[
27-
templates.details_headline(entry),
28-
["span",
29-
"class", "close-request-detail",
30-
"handler", "close-request-detail",
31-
"tabindex", "1"
32-
]
33-
],
34-
"class", "network-details-header-row"
35-
],
36-
["div",
37-
["div",
38-
this._details_content(entry, do_raw),
39-
"data-object-id", String(entry.id),
40-
"class", "entry-details"
41-
// Todo: currently can't have the setting-changing context menu only on this container
42-
// ,"data-menu", "network-logger-details"
43-
],
44-
"class", "height-holder"
26+
this._details_headline(entry),
27+
this._details_content(entry, do_raw),
28+
"data-object-id", String(entry.id),
29+
"class", "entry-details"
30+
// Todo: currently can't have the setting-changing context menu only on this container
31+
// ,"data-menu", "network-logger-details"
4532
]
4633
],
4734
"class", "network-details-container" + (do_raw? "" : " parsed"),
@@ -57,7 +44,7 @@ templates._details_content = function(entry, do_raw)
5744
];
5845
};
5946

60-
templates.details_headline = function(entry)
47+
templates._details_headline = function(entry)
6148
{
6249
var responsecode = entry.current_responsecode;
6350
if (responsecode && responsecode in cls.ResourceUtil.http_status_codes)

src/network/network_style.css

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -273,61 +273,22 @@
273273
-1px 0 0 rgba(0, 0, 0, 0.05);
274274
}
275275

276-
.network-details-container-overflows
277-
{
278-
overflow: auto;
279-
}
280-
281276
.network_logger .entry-details
282277
{
283278
overflow: auto;
284279
height: 100%;
285-
padding-left: 5px;
286-
box-sizing: border-box;
287-
}
288-
289-
.network-details-container-overflows .entry-details,
290-
.network-details-container-overflows .network-details-header-row,
291-
.network-details-container-overflows .height-holder
292-
{
293-
overflow: visible;
294-
height: auto;
295-
position: static;
296-
padding-top: 0;
297-
}
298-
299-
.height-holder /* todo: probably merge me with entry-details */
300-
{
301-
height: 100%;
302-
width: 100%;
303-
padding-top: 55px;
304-
box-sizing: border-box;
305-
position: absolute;
306-
top: 0;
307-
}
308-
309-
.network-details-header-row
310-
{
311-
position: absolute;
312-
z-index: 3;
313-
width: 100%;
280+
padding: 0 5px;
314281
box-sizing: border-box;
315-
padding: 5px;
316-
padding-right: 45px;
317-
height: 55px;
318282
overflow: auto;
319-
border-bottom: 1px solid #D6D6D6;
320283
}
321284

322-
.network-details-header-row > p
285+
.method-and-url
323286
{
324-
margin-bottom: 3px;
325-
margin-right: 18px;
287+
white-space: pre;
326288
}
327289

328-
.network-details-header-row .method-and-url
290+
.parsed .method-and-url
329291
{
330-
white-space: pre;
331292
word-wrap: break-word;
332293
}
333294

@@ -415,7 +376,7 @@
415376
}
416377

417378
.network-details-container div.header {
418-
margin: 0 -5px; /* todo: 10px -5px looks better to me but is inconsistent with dom panel headers */
379+
margin: 0 0 0 -5px; /* todo: 10px 0 10px -5px; looks better to me but is inconsistent with dom panel headers */
419380
}
420381

421382
.entry-details > h2:first-child,

src/network/network_view.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
358358
document.addEventListener("mousemove", this._on_drag_detail_bound, false);
359359
document.addEventListener("mouseup", this._on_stop_resize_detail_bound, false);
360360
if (!this._resize_interval)
361-
this._resize_interval = setInterval(this._on_drag_interval_bound, 30);
361+
this._resize_interval = setInterval(this._on_drag_interval_bound, 15);
362362

363363
evt.preventDefault();
364364
}
@@ -523,6 +523,13 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
523523
}
524524
}.bind(this);
525525

526+
this._on_header_tooltip_bound = function(evt, target)
527+
{
528+
// Probably make a template do the work. Need to know raw or parsed though, or probably only do it
529+
// on the parsed headers.
530+
531+
}.bind(this);
532+
526533
this._update_mono_lineheight = function()
527534
{
528535
this.mono_lineheight = window.defaults["js-source-line-height"];
@@ -536,6 +543,9 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
536543
this.graph_tooltip.ontooltipenter = this._on_graph_tooltip_enter_bound;
537544
this.graph_tooltip.ontooltipleave = this._on_graph_tooltip_leave_bound;
538545

546+
this.header_tooltip = Tooltips.register("network-header-tooltip", true, false);
547+
this.header_tooltip.ontooltip = this._on_header_tooltip_bound;
548+
539549
this._on_clear_log_bound = function(evt, target)
540550
{
541551
this._service.clear_request_context();

0 commit comments

Comments
 (0)