Tweaks to the Observatory timeline landing page UI.

Change-Id: Ibe1fe674fc706057bc10d091c8bf0c20b31adaaf
Reviewed-on: https://dart-review.googlesource.com/38381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
Devon Carew 2018-02-06 16:39:23 +00:00 committed by commit-bot@chromium.org
parent e1e7ab1c3d
commit 83ea11b2bb
3 changed files with 34 additions and 29 deletions

View file

@ -3,7 +3,6 @@ analyzer:
dead_code: ignore
unused_local_variable: ignore
exclude:
- lib/src/models/objects/function.dart
- tests/service/bad_reload/v2/main.dart
- tests/service/complex_reload/v2/main.dart
- tests/service/developer_extension_test.dart

View file

@ -1644,6 +1644,9 @@ timeline-dashboard button:disabled:hover {
cursor: default;
}
timeline-dashboard p {
margin-top: 0.4em;
}
memory-dashboard button,
timeline-dashboard button,
@ -1669,11 +1672,21 @@ memory-profile .header_button,
timeline-dashboard .header_button {
padding: 3px 5px;
margin: 0px 1px;
min-width: 130px;
}
memory-profile .header_button,
timeline-dashboard .header_button {
margin-left: 6px;
}
.header_button.left-pad {
margin-left: 75px;
}
memory-profile .header_button:first-child,
timeline-dashboard .header_button:first-child {
margin-left: 5px;
margin-left: 30px;
}
memory-profile .tab_buttons,
@ -1685,7 +1698,8 @@ timeline-dashboard .tab_buttons {
memory-profile .tab_buttons button,
timeline-dashboard .tab_buttons button {
padding: 10px 5px;
padding: 5px 5px;
min-width: 100px
}
memory-profile .tab_buttons button:not(:first-child),
@ -1709,7 +1723,7 @@ memory-dashboard memory-graph {
memory-dashboard memory-profile {
position: absolute;
bottom: 0;
bottom: 20px;
left: 0;
right: 0;
top: 300px;

View file

@ -96,15 +96,16 @@ class TimelineDashboardElement extends HtmlElement implements Renderable {
}
_frame.src = _makeFrameUrl();
_content.children = [
new HeadingElement.h1()
..children = ([new Text("Timeline")]
new HeadingElement.h2()
..children = ([new Text("Timeline View")]
..addAll(_createButtons())
..addAll(_createTabs())),
new Text(_view == _TimelineView.frame
? 'Logical view of the computation involved in each frame. '
'(Timestamps may not be preserved)'
: 'Sequence of events generated during the execution. '
'(Timestamps are preserved)')
new ParagraphElement()
..text = (_view == _TimelineView.frame
? 'Logical view of the computation involved in each frame '
'(timestamps may not be preserved)'
: 'Sequence of events generated during the execution '
'(timestamps are preserved)')
];
if (children.isEmpty) {
children = [
@ -128,32 +129,27 @@ class TimelineDashboardElement extends HtmlElement implements Renderable {
..text = 'Enable'
..title = 'The Timeline is not fully enabled, click to enable'
..onClick.listen((e) => _enable()),
new ButtonElement()
..classes = ['header_button']
..text = ' 📂 Load'
..title = 'Load a saved timeline from file'
..onClick.listen((e) => _load()),
];
}
return [
new ButtonElement()
..classes = ['header_button']
..text = ' ↺ Refresh'
..title = 'Refresh the current timeline'
..text = 'Load from VM'
..title = 'Load the timeline'
..onClick.listen((e) => _refresh()),
new ButtonElement()
..classes = ['header_button']
..text = ' ❌ Clear'
..title = 'Clear the current Timeline to file'
..text = 'Reset Timeline'
..title = 'Reset the current timeline'
..onClick.listen((e) => _clear()),
new ButtonElement()
..classes = ['header_button']
..text = ' 💾 Save'
..classes = ['header_button', 'left-pad']
..text = 'Save to File…'
..title = 'Save the current Timeline to file'
..onClick.listen((e) => _save()),
new ButtonElement()
..classes = ['header_button']
..text = ' 📂 Load'
..text = 'Load from File…'
..title = 'Load a saved timeline from file'
..onClick.listen((e) => _load()),
];
@ -219,13 +215,9 @@ class TimelineDashboardElement extends HtmlElement implements Renderable {
return _postMessage('clear');
}
Future _save() async {
return _postMessage('save');
}
Future _save() => _postMessage('save');
Future _load() async {
return _postMessage('load');
}
Future _load() => _postMessage('load');
Future _postMessage(String method,
[Map<String, dynamic> params = const <String, dynamic>{}]) async {