Skip to content

Commit f2db1c5

Browse files
authored
Downloads chart - small adjustments (#8530)
1 parent 4c262e1 commit f2db1c5

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

app/lib/frontend/templates/views/pkg/score_tab.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ d.Node scoreTabNode({
8080
],
8181
),
8282
_reportNode(report),
83-
if (card.weeklyVersionDownloads != null &&
84-
requestContext.experimentalFlags.showDownloadCountsVersionChart)
85-
_downloadsChart(card.weeklyVersionDownloads!),
8683
if (toolEnvInfo != null) toolEnvInfo,
8784
]),
8885
if (!showPending)
@@ -98,6 +95,9 @@ d.Node scoreTabNode({
9895
d.text(' for details.'),
9996
],
10097
),
98+
if (card.weeklyVersionDownloads != null &&
99+
requestContext.experimentalFlags.showDownloadCountsVersionChart)
100+
_downloadsChart(card.weeklyVersionDownloads!),
101101
]);
102102
}
103103

@@ -207,7 +207,7 @@ d.Node _downloadsChart(WeeklyVersionDownloadCounts weeklyVersionDownloads) {
207207
);
208208

209209
return d.fragment([
210-
d.h1(text: 'Weekly Downloads over the last 40 weeks'),
210+
d.h1(text: 'Weekly downloads'),
211211
versionModes,
212212
container,
213213
]);

pkg/web_app/lib/src/widget/downloads_chart/widget.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void drawChart(
211211
}
212212

213213
final longTick = SVGPathElement();
214-
longTick.setAttribute('class', 'downloads-chart-frame');
214+
longTick.setAttribute('class', 'downloads-chart-axis-line');
215215
longTick.setAttribute('d', 'M$xAxisStart $y L$xAxisEnd $y');
216216
chart.append(longTick);
217217
}
@@ -291,13 +291,4 @@ void drawChart(
291291
legendLabel.getBBox().width +
292292
labelPadding;
293293
}
294-
295-
final frameHeight = legendY + marginPadding + labelPadding;
296-
final frame = SVGRectElement()
297-
..setAttribute('class', 'downloads-chart-frame')
298-
..setAttribute('height', '$frameHeight')
299-
..setAttribute('width', '$frameWidth')
300-
..setAttribute('rx', '15')
301-
..setAttribute('ry', '15');
302-
chart.append(frame);
303294
}

pkg/web_css/lib/src/_pkg.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
margin-left: 10px;
294294
}
295295

296-
.downloads-chart-frame {
296+
.downloads-chart-axis-line {
297297
fill:none;
298298
stroke-width: 1;
299299
stroke: var(--pub-downloads-chart-frame-color);

0 commit comments

Comments
 (0)