Move commits viewer to the end of details view
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 01:14:40 +0000 (01:14 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 01:14:40 +0000 (01:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141315

Reviewed by Andreas Kling.

Improved the way list of commits are shown per kling's request.

* public/v2/app.js:
(App.PaneController._updateDetails): Always show the old value even when a single point is selected.

* public/v2/chart-pane.css: Updated the style for the commits viewer.

* public/v2/commits-viewer.js:
(App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
(App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.

* public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
moved the commits viewers out of the details tables so that they don't interleave revision data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179729 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v2/app.js
Websites/perf.webkit.org/public/v2/chart-pane.css
Websites/perf.webkit.org/public/v2/commits-viewer.js
Websites/perf.webkit.org/public/v2/index.html

index 0cbb575..f2ac8c0 100644 (file)
@@ -1,5 +1,26 @@
 2015-02-05  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Move commits viewer to the end of details view
+        https://bugs.webkit.org/show_bug.cgi?id=141315
+
+        Reviewed by Andreas Kling.
+
+        Improved the way list of commits are shown per kling's request.
+
+        * public/v2/app.js:
+        (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
+
+        * public/v2/chart-pane.css: Updated the style for the commits viewer.
+
+        * public/v2/commits-viewer.js:
+        (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
+        (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
+
+        * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
+        moved the commits viewers out of the details tables so that they don't interleave revision data.
+
+2015-02-05  Ryosuke Niwa  <rniwa@webkit.org>
+
         New perf dashboard should compare results to baseline and target
         https://bugs.webkit.org/show_bug.cgi?id=141286
 
index 7bc230a..788ac45 100755 (executable)
@@ -766,7 +766,7 @@ App.PaneController = Ember.ObjectController.extend({
         this.set('details', Ember.Object.create({
             status: this._computeStatus(currentPoint),
             currentValue: chartData.formatter(currentMeasurement.mean()),
-            oldValue: oldMeasurement && selectedPoints ? chartData.formatter(oldMeasurement.mean()) : null,
+            oldValue: oldMeasurement ? chartData.formatter(oldMeasurement.mean()) : null,
             buildNumber: buildNumber,
             buildURL: buildURL,
             buildTime: currentMeasurement.formattedBuildTime(),
index d8e113e..314900d 100755 (executable)
     overflow: scroll;
 }
 
-.analysis-chart-pane .details table {
+.analysis-chart-pane table {
     margin: 0.5rem;
 }
 
     overflow: scroll;
 }
 
-.chart-pane .details-table {
+.chart-pane .details-table,
+.chart-pane .commits-viewer {
     font-size: 0.8rem;
     width: 100%;
     table-layout: fixed;
     padding-right: 1px;
 }
 
-.chart-pane .details-table td table {
-    border-collapse: collapse;
-}
-
-.chart-pane .details-table td table td {
-    word-break: break-word;
-    border-top: solid 1px #ccc;
-    border-bottom: solid 1px #ccc;
-    padding: 0.2rem;
-}
-
-.chart-pane .details-table td table td a {
-    text-decoration: none;
-}
-
 .chart-pane .details-table th {
-    width: 7rem;
+    width: 30%;
     text-align: right;
     font-weight: normal;
     padding: 0;
 }
 
+.chart-pane .details-table td {
+    width: 70%;
+}
+
 .chart-pane .details-table .bugs th {
     font-weight: bold;
 }
     font-size: 1rem;
 }
 
+.chart-pane .commits-viewer caption {
+    border-top: solid 1px #ccc;
+    font-weight: normal;
+    text-align: left;
+    padding: 0.2rem;
+    padding-left: 0.5rem;
+    cursor: pointer;
+}
+
+.chart-pane .commits-viewer caption:before {
+    display: inline-block;
+    width: 0.8rem;
+    content: "\25BE"; /* Down arrow */
+}
+
+.chart-pane .commits-viewer.hidden caption:before {
+    display: inline-block;
+    width: 0.8rem;
+    content: "\25B8"; /* Right arrow */
+}
+
+.chart-pane .commits {
+    border-bottom: solid 1px #ccc;
+    margin-bottom: 0.2rem;
+}
+
+.chart-pane .commits-viewer {
+    border-collapse: collapse;
+}
+
+.chart-pane .commits-viewer td,
+.chart-pane .commits-viewer th {
+    word-break: break-word;
+    border-top: solid 1px #ccc;
+    padding: 0.2rem;
+}
+
+.chart-pane .commits-viewer th {
+    width: 20%;
+    font-weight: normal;
+}
+
+.chart-pane .commits-viewer td {
+    width: 60%;
+}
+
 .chart-pane .chart {
     height: 100%;
 }
index f5d1a8c..947c437 100644 (file)
@@ -2,6 +2,7 @@ App.CommitsViewerComponent = Ember.Component.extend({
     repository: null,
     revisionInfo: null,
     commits: null,
+    visible: true,
     commitsChanged: function ()
     {
         var revisionInfo = this.get('revisionInfo');
@@ -30,4 +31,10 @@ App.CommitsViewerComponent = Ember.Component.extend({
                 self.set('commits', []);
         })
     }.observes('repository').observes('revisionInfo').on('init'),
+    actions: {
+        toggleVisibility: function ()
+        {
+            this.toggleProperty('visible');
+        }
+    }
 });
index dd9b486..508e18d 100755 (executable)
                     </td>
                 </tr>
             </tbody>
+            <tbody>
             {{#if details.buildNumber}}
                 <tr>
                     <th>Build</th>
                         {{/if}}
                     </td>
                 </tr>
-                <tr>
-                    <td colspan="2">{{commits-viewer repository=repository revisionInfo=this}}</td>
-                </tr>
             {{/each}}
+            </tbody>
         </table>
+        <div class="commits">
+            {{#each details.revisions}}
+                {{commits-viewer repository=repository revisionInfo=this caption=name}}
+            {{/each}}
+        </div>
     </div>
     </script>
 
     <script type="text/x-handlebars" data-template-name="components/commits-viewer">
     {{#if commits}}
-        <table>
-            <tbody>
-                {{#each commits}}
-                    <tr>
-                        <td>
-                            {{#if url}}
-                                <a {{bind-attr href=url}} target="_blank">{{author}}</a>
-                            {{else}}
-                                {{author}}
-                            {{/if}}
-                        </td>
-                        <td>{{message}}</td>
-                    </tr>
-                {{/each}}
-            </tbody>
+        <table {{bind-attr class=":commits-viewer visible::hidden"}}>
+            {{#if caption}}
+                <caption {{action toggleVisibility}}>{{caption}} commits</caption>
+            {{/if}}
+            {{#if visible}}
+                <tbody>
+                    {{#each commits}}
+                        <tr>
+                            <th>
+                                {{#if url}}
+                                    <a {{bind-attr href=url}} target="_blank">{{revision}}</a>
+                                {{else}}
+                                    {{revision}}
+                                {{/if}}
+                            </th>
+                            <th>{{author}}</th>
+                            <td>{{message}}</td>
+                        </tr>
+                    {{/each}}
+                </tbody>
+            {{/if}}
         </table>
     {{/if}}
     </script>