⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249202 in webkit


Ignore:
Timestamp:
Aug 28, 2019, 9:42:40 AM (7 years ago)
Author:
Jonathan Bedard
Message:

results.webkit.org: Auto-expand single configurations
https://bugs.webkit.org/show_bug.cgi?id=201218

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(TimelineFromEndpoint.toString): Automatically expand timeline when only one
configuration has been specified.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(prototype.ExpandableSeriesComponent): Add options so that the caller can set whether a timeline
is expanded or collapsed by default.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r249200 r249202  
     12019-08-28  Jonathan Bedard  <jbedard@apple.com>
     2
     3        results.webkit.org: Auto-expand single configurations
     4        https://bugs.webkit.org/show_bug.cgi?id=201218
     5
     6        Rubber-stamped by Aakash Jain.
     7
     8        * resultsdbpy/resultsdbpy/view/static/js/timeline.js:
     9        (TimelineFromEndpoint.toString): Automatically expand timeline when only one
     10        configuration has been specified.
     11        * resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
     12        (prototype.ExpandableSeriesComponent): Add options so that the caller can set whether a timeline
     13        is expanded or collapsed by default.
     14
    1152019-08-28  Jonathan Bedard  <jbedard@apple.com>
    216
  • trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js

    r249124 r249202  
    722722                                })));
    723723                    });
    724                     myTimeline = Timeline.ExpandableSeriesWithHeaderExpanderComponent(myTimeline, ...timelinesBySDK);
     724                    myTimeline = Timeline.ExpandableSeriesWithHeaderExpanderComponent(myTimeline, {}, ...timelinesBySDK);
    725725                }
    726726                collapsedTimelines.push(myTimeline);
     
    748748                        exporter: exporterFactory(allResults),
    749749                    })),
     750                {expanded: this.configurations.length <= 1},
    750751                ...collapsedTimelines
    751752            ));
  • trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js

    r249124 r249202  
    476476}
    477477
    478 Timeline.ExpandableSeriesComponent = (mainSeries, subSerieses, exporter) => {
     478Timeline.ExpandableSeriesComponent = (mainSeries, options, subSerieses, exporter) => {
    479479    const ref = REF.createRef({
    480         state: {expanded: false},
     480        state: {expanded: options.expanded ? options.expanded : false},
    481481        onStateUpdate: (element, stateDiff) => {
    482482            if (stateDiff.expanded === false) {
     
    506506}
    507507
    508 Timeline.ExpandableHeaderComponent = (mainLabel, subLabels, exporter) => {
     508Timeline.ExpandableHeaderComponent = (mainLabel, options, subLabels, exporter) => {
    509509    const ref = REF.createRef({
    510         state: {expanded: false},
     510        state: {expanded: options.expanded ? options.expanded : false},
    511511        onStateUpdate: (element, stateDiff) => {
    512512            if (stateDiff.expanded === false)
     
    532532}
    533533
    534 Timeline.ExpandableSeriesWithHeaderExpanderComponent = (mainSeriesWithLable, ...subSeriesWithLable) => {
     534Timeline.ExpandableSeriesWithHeaderExpanderComponent = (mainSeriesWithLable, options, ...subSeriesWithLable) => {
    535535    const ref = REF.createRef({
    536         state: {expanded: false},
     536        state: {expanded: options.expanded ? options.expanded : false},
    537537        onStateUpdate: (element, stateDiff) => {
    538538            if (stateDiff.expanded === false)
     
    559559    }));
    560560    return {
    561         header: Timeline.ExpandableHeaderComponent(`<a class="link-button" href="javascript:void(0)" ref="${ref}">+</a>` + mainLabel, subLabels, composer),
    562         series: Timeline.ExpandableSeriesComponent(mainSeries, subSerieses, composer),
     561        header: Timeline.ExpandableHeaderComponent(`<a class="link-button" href="javascript:void(0)" ref="${ref}">+</a>` + mainLabel, options, subLabels, composer),
     562        series: Timeline.ExpandableSeriesComponent(mainSeries, options, subSerieses, composer),
    563563    }
    564564}
Note: See TracChangeset for help on using the changeset viewer.