File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
site/frontend/src/pages/compare/artifact-size Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,16 @@ function formatValue(value: number | undefined): string {
44
44
return formatSize (value );
45
45
}
46
46
47
+ function formatChangeTitle(
48
+ a : number | undefined ,
49
+ b : number | undefined
50
+ ): string {
51
+ if (! isValidValue (a ) || ! isValidValue (b )) {
52
+ return " " ;
53
+ }
54
+ return (b - a ).toLocaleString ();
55
+ }
56
+
47
57
function formatChange(a : number | undefined , b : number | undefined ): string {
48
58
if (! isValidValue (a ) || ! isValidValue (b )) {
49
59
return " -" ;
@@ -108,12 +118,18 @@ function generateTitle(component: string): string {
108
118
{{ isLibrary(component) ? "Library" : "Binary" }}
109
119
</td >
110
120
<td >
111
- <div class =" aligned" >
121
+ <div
122
+ class =" aligned"
123
+ :title =" a.component_sizes[component].toLocaleString()"
124
+ >
112
125
{{ formatValue(a.component_sizes[component]) }}
113
126
</div >
114
127
</td >
115
128
<td >
116
- <div class =" aligned" >
129
+ <div
130
+ class =" aligned"
131
+ :title =" b.component_sizes[component].toLocaleString()"
132
+ >
117
133
{{ formatValue(b.component_sizes[component]) }}
118
134
</div >
119
135
</td >
@@ -125,7 +141,15 @@ function generateTitle(component: string): string {
125
141
)
126
142
"
127
143
>
128
- <div class =" aligned" >
144
+ <div
145
+ class =" aligned"
146
+ :title ="
147
+ formatChangeTitle(
148
+ a.component_sizes[component],
149
+ b.component_sizes[component]
150
+ )
151
+ "
152
+ >
129
153
{{
130
154
formatChange(
131
155
a.component_sizes[component],
You can’t perform that action at this time.
0 commit comments