@@ -7,14 +7,15 @@ import 'dart:convert';
77import 'package:_pub_shared/data/download_counts_data.dart' ;
88import 'package:_pub_shared/format/number_format.dart' ;
99import 'package:pana/models.dart' ;
10- import 'package:pub_dev/frontend/dom/material.dart' ;
1110import 'package:pub_dev/service/download_counts/backend.dart' ;
1211import 'package:pub_dev/shared/utils.dart' ;
1312
1413import '../../../../scorecard/models.dart' hide ReportStatus;
1514import '../../../../shared/urls.dart' as urls;
1615import '../../../dom/dom.dart' as d;
16+ import '../../../dom/material.dart' ;
1717import '../../../static_files.dart' ;
18+ import '../../_consts.dart' ;
1819
1920/// Renders the score page content.
2021 d.Node scoreTabNode ({
@@ -337,14 +338,20 @@ d.Node _likeKeyFigureNode(int? likeCount) {
337338
338339d.Node _downloadCountsKeyFigureNode (int ? downloadCounts) {
339340 if (downloadCounts == null ) {
340- return _keyFigureNode (value: '--' , supplemental: '' , label: 'downloads' );
341+ return _keyFigureNode (
342+ value: '--' ,
343+ supplemental: '' ,
344+ label: 'downloads' ,
345+ title: titleFor30DaysDownloadCounts,
346+ );
341347 }
342348 return _keyFigureNode (
343349 value:
344350 '${compactFormat (downloadCounts ).value }'
345351 '${compactFormat (downloadCounts ).suffix }' ,
346352 supplemental: '' ,
347353 label: 'downloads' ,
354+ title: titleFor30DaysDownloadCounts,
348355 );
349356}
350357
@@ -373,10 +380,13 @@ d.Node _keyFigureNode({
373380 required String value,
374381 required String supplemental,
375382 required String label,
383+ String ? title,
376384 List <String >? classes,
377385}) {
386+ final attributes = title == null ? null : {'title' : title};
378387 return d.div (
379388 classes: ['score-key-figure' , ...? classes],
389+ attributes: attributes,
380390 children: [
381391 d.div (
382392 classes: ['score-key-figure-title' ],
0 commit comments