Modified: trunk/Tools/ChangeLog (249201 => 249202)
--- trunk/Tools/ChangeLog 2019-08-28 16:28:27 UTC (rev 249201)
+++ trunk/Tools/ChangeLog 2019-08-28 16:42:40 UTC (rev 249202)
@@ -1,5 +1,19 @@
2019-08-28 Jonathan Bedard <[email protected]>
+ 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.
+
+2019-08-28 Jonathan Bedard <[email protected]>
+
results.webkit.org: Sanitize all commit arguments on upload
https://bugs.webkit.org/show_bug.cgi?id=201189
<rdar://problem/54564837>
Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js (249201 => 249202)
--- trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js 2019-08-28 16:28:27 UTC (rev 249201)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js 2019-08-28 16:42:40 UTC (rev 249202)
@@ -721,7 +721,7 @@
exporter: exporterFactory(resultsByKey[sdkConfig.toKey()]),
})));
});
- myTimeline = Timeline.ExpandableSeriesWithHeaderExpanderComponent(myTimeline, ...timelinesBySDK);
+ myTimeline = Timeline.ExpandableSeriesWithHeaderExpanderComponent(myTimeline, {}, ...timelinesBySDK);
}
collapsedTimelines.push(myTimeline);
});
@@ -747,6 +747,7 @@
onDotLeave: onDotLeave,
exporter: exporterFactory(allResults),
})),
+ {expanded: this.configurations.length <= 1},
...collapsedTimelines
));
});
Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js (249201 => 249202)
--- trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js 2019-08-28 16:28:27 UTC (rev 249201)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js 2019-08-28 16:42:40 UTC (rev 249202)
@@ -475,9 +475,9 @@
});
}
-Timeline.ExpandableSeriesComponent = (mainSeries, subSerieses, exporter) => {
+Timeline.ExpandableSeriesComponent = (mainSeries, options, subSerieses, exporter) => {
const ref = REF.createRef({
- state: {expanded: false},
+ state: {expanded: options.expanded ? options.expanded : false},
onStateUpdate: (element, stateDiff) => {
if (stateDiff.expanded === false) {
element.children[0].style.display = 'none';
@@ -505,9 +505,9 @@
return `<div class="series">${label}</div>`;
}
-Timeline.ExpandableHeaderComponent = (mainLabel, subLabels, exporter) => {
+Timeline.ExpandableHeaderComponent = (mainLabel, options, subLabels, exporter) => {
const ref = REF.createRef({
- state: {expanded: false},
+ state: {expanded: options.expanded ? options.expanded : false},
onStateUpdate: (element, stateDiff) => {
if (stateDiff.expanded === false)
element.children[1].style.display = "none";
@@ -531,9 +531,9 @@
return {header, series};
}
-Timeline.ExpandableSeriesWithHeaderExpanderComponent = (mainSeriesWithLable, ...subSeriesWithLable) => {
+Timeline.ExpandableSeriesWithHeaderExpanderComponent = (mainSeriesWithLable, options, ...subSeriesWithLable) => {
const ref = REF.createRef({
- state: {expanded: false},
+ state: {expanded: options.expanded ? options.expanded : false},
onStateUpdate: (element, stateDiff) => {
if (stateDiff.expanded === false)
element.innerText = "+";
@@ -558,8 +558,8 @@
})
}));
return {
- header: Timeline.ExpandableHeaderComponent(`<a class="link-button" href="" ref="${ref}">+</a>` + mainLabel, subLabels, composer),
- series: Timeline.ExpandableSeriesComponent(mainSeries, subSerieses, composer),
+ header: Timeline.ExpandableHeaderComponent(`<a class="link-button" href="" ref="${ref}">+</a>` + mainLabel, options, subLabels, composer),
+ series: Timeline.ExpandableSeriesComponent(mainSeries, options, subSerieses, composer),
}
}