Changeset 179729 in webkit


Ignore:
Timestamp:
Feb 5, 2015 5:14:40 PM (9 years ago)
Author:
rniwa@webkit.org
Message:

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.

Location:
trunk/Websites/perf.webkit.org
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/perf.webkit.org/ChangeLog

    r179710 r179729  
     12015-02-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Move commits viewer to the end of details view
     4        https://bugs.webkit.org/show_bug.cgi?id=141315
     5
     6        Reviewed by Andreas Kling.
     7
     8        Improved the way list of commits are shown per kling's request.
     9
     10        * public/v2/app.js:
     11        (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
     12
     13        * public/v2/chart-pane.css: Updated the style for the commits viewer.
     14
     15        * public/v2/commits-viewer.js:
     16        (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
     17        (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
     18
     19        * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
     20        moved the commits viewers out of the details tables so that they don't interleave revision data.
     21
    1222015-02-05  Ryosuke Niwa  <rniwa@webkit.org>
    223
  • trunk/Websites/perf.webkit.org/public/v2/app.js

    r179710 r179729  
    767767            status: this._computeStatus(currentPoint),
    768768            currentValue: chartData.formatter(currentMeasurement.mean()),
    769             oldValue: oldMeasurement && selectedPoints ? chartData.formatter(oldMeasurement.mean()) : null,
     769            oldValue: oldMeasurement ? chartData.formatter(oldMeasurement.mean()) : null,
    770770            buildNumber: buildNumber,
    771771            buildURL: buildURL,
  • trunk/Websites/perf.webkit.org/public/v2/chart-pane.css

    r179710 r179729  
    176176}
    177177
    178 .analysis-chart-pane .details table {
     178.analysis-chart-pane table {
    179179    margin: 0.5rem;
    180180}
     
    193193}
    194194
    195 .chart-pane .details-table {
     195.chart-pane .details-table,
     196.chart-pane .commits-viewer {
    196197    font-size: 0.8rem;
    197198    width: 100%;
     
    204205}
    205206
    206 .chart-pane .details-table td table {
     207.chart-pane .details-table th {
     208    width: 30%;
     209    text-align: right;
     210    font-weight: normal;
     211    padding: 0;
     212}
     213
     214.chart-pane .details-table td {
     215    width: 70%;
     216}
     217
     218.chart-pane .details-table .bugs th {
     219    font-weight: bold;
     220}
     221
     222.chart-pane .details-table th:after {
     223    content: " : ";
     224}
     225
     226.chart-pane .details-table .status th {
     227    visibility: hidden;
     228}
     229
     230.chart-pane .details-table .status td {
     231    font-size: 1rem;
     232}
     233
     234.chart-pane .commits-viewer caption {
     235    border-top: solid 1px #ccc;
     236    font-weight: normal;
     237    text-align: left;
     238    padding: 0.2rem;
     239    padding-left: 0.5rem;
     240    cursor: pointer;
     241}
     242
     243.chart-pane .commits-viewer caption:before {
     244    display: inline-block;
     245    width: 0.8rem;
     246    content: "\25BE"; /* Down arrow */
     247}
     248
     249.chart-pane .commits-viewer.hidden caption:before {
     250    display: inline-block;
     251    width: 0.8rem;
     252    content: "\25B8"; /* Right arrow */
     253}
     254
     255.chart-pane .commits {
     256    border-bottom: solid 1px #ccc;
     257    margin-bottom: 0.2rem;
     258}
     259
     260.chart-pane .commits-viewer {
    207261    border-collapse: collapse;
    208262}
    209263
    210 .chart-pane .details-table td table td {
     264.chart-pane .commits-viewer td,
     265.chart-pane .commits-viewer th {
    211266    word-break: break-word;
    212267    border-top: solid 1px #ccc;
    213     border-bottom: solid 1px #ccc;
    214268    padding: 0.2rem;
    215269}
    216270
    217 .chart-pane .details-table td table td a {
    218     text-decoration: none;
    219 }
    220 
    221 .chart-pane .details-table th {
    222     width: 7rem;
    223     text-align: right;
    224     font-weight: normal;
    225     padding: 0;
    226 }
    227 
    228 .chart-pane .details-table .bugs th {
    229     font-weight: bold;
    230 }
    231 
    232 .chart-pane .details-table th:after {
    233     content: " : ";
    234 }
    235 
    236 .chart-pane .details-table .status th {
    237     visibility: hidden;
    238 }
    239 
    240 .chart-pane .details-table .status td {
    241     font-size: 1rem;
     271.chart-pane .commits-viewer th {
     272    width: 20%;
     273    font-weight: normal;
     274}
     275
     276.chart-pane .commits-viewer td {
     277    width: 60%;
    242278}
    243279
  • trunk/Websites/perf.webkit.org/public/v2/commits-viewer.js

    r177424 r179729  
    33    revisionInfo: null,
    44    commits: null,
     5    visible: true,
    56    commitsChanged: function ()
    67    {
     
    3132        })
    3233    }.observes('repository').observes('revisionInfo').on('init'),
     34    actions: {
     35        toggleVisibility: function ()
     36        {
     37            this.toggleProperty('visible');
     38        }
     39    }
    3340});
  • trunk/Websites/perf.webkit.org/public/v2/index.html

    r179710 r179729  
    270270                </tr>
    271271            </tbody>
     272            <tbody>
    272273            {{#if details.buildNumber}}
    273274                <tr>
     
    294295                    </td>
    295296                </tr>
    296                 <tr>
    297                     <td colspan="2">{{commits-viewer repository=repository revisionInfo=this}}</td>
    298                 </tr>
    299297            {{/each}}
     298            </tbody>
    300299        </table>
     300        <div class="commits">
     301            {{#each details.revisions}}
     302                {{commits-viewer repository=repository revisionInfo=this caption=name}}
     303            {{/each}}
     304        </div>
    301305    </div>
    302306    </script>
     
    304308    <script type="text/x-handlebars" data-template-name="components/commits-viewer">
    305309    {{#if commits}}
    306         <table>
    307             <tbody>
    308                 {{#each commits}}
    309                     <tr>
    310                         <td>
    311                             {{#if url}}
    312                                 <a {{bind-attr href=url}} target="_blank">{{author}}</a>
    313                             {{else}}
    314                                 {{author}}
    315                             {{/if}}
    316                         </td>
    317                         <td>{{message}}</td>
    318                     </tr>
    319                 {{/each}}
    320             </tbody>
     310        <table {{bind-attr class=":commits-viewer visible::hidden"}}>
     311            {{#if caption}}
     312                <caption {{action toggleVisibility}}>{{caption}} commits</caption>
     313            {{/if}}
     314            {{#if visible}}
     315                <tbody>
     316                    {{#each commits}}
     317                        <tr>
     318                            <th>
     319                                {{#if url}}
     320                                    <a {{bind-attr href=url}} target="_blank">{{revision}}</a>
     321                                {{else}}
     322                                    {{revision}}
     323                                {{/if}}
     324                            </th>
     325                            <th>{{author}}</th>
     326                            <td>{{message}}</td>
     327                        </tr>
     328                    {{/each}}
     329                </tbody>
     330            {{/if}}
    321331        </table>
    322332    {{/if}}
Note: See TracChangeset for help on using the changeset viewer.