Skip to content

Commit 74d9811

Browse files
authored
Add topics-tag class on infobox topic links. (#8497)
1 parent f15ec13 commit 74d9811

31 files changed

+62
-61
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ d.Node packageInfoBoxNode({
5454
);
5555
}
5656
final dependencies = _dependencyListNode(version.pubspec?.dependencies);
57-
final topics = _topicstNode(version.pubspec?.canonicalizedTopics);
57+
final topics = _topicsNode(version.pubspec?.canonicalizedTopics);
5858

5959
final screenshots = data.scoreCard.panaReport?.screenshots;
6060
String? thumbnailUrl;
@@ -206,7 +206,7 @@ d.Node? _licenseNode({
206206
]);
207207
}
208208

209-
d.Node? _topicstNode(List<String>? topics) {
209+
d.Node? _topicsNode(List<String>? topics) {
210210
if (topics == null || topics.isEmpty) return null;
211211

212212
final nodes = <d.Node>[];
@@ -217,6 +217,7 @@ d.Node? _topicstNode(List<String>? topics) {
217217
final ct = canonicalTopics.asMap[topic];
218218
final description = ct?.description;
219219
final node = d.a(
220+
classes: ['topics-tag'],
220221
href: urls.searchUrl(q: 'topic:$topic'),
221222
text: '#$topic',
222223
title: description,

app/test/frontend/golden/pkg_activity_log_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
396396
</p>
397397
<h3 class="title">Topics</h3>
398398
<p>
399-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
399+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
400400
</p>
401401
<h3 class="title">Documentation</h3>
402402
<p>
@@ -472,7 +472,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
472472
</p>
473473
<h3 class="title">Topics</h3>
474474
<p>
475-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
475+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
476476
</p>
477477
<h3 class="title">Documentation</h3>
478478
<p>

app/test/frontend/golden/pkg_admin_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
681681
</p>
682682
<h3 class="title">Topics</h3>
683683
<p>
684-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
684+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
685685
</p>
686686
<h3 class="title">Documentation</h3>
687687
<p>
@@ -757,7 +757,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
757757
</p>
758758
<h3 class="title">Topics</h3>
759759
<p>
760-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
760+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
761761
</p>
762762
<h3 class="title">Documentation</h3>
763763
<p>

app/test/frontend/golden/pkg_changelog_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
266266
</p>
267267
<h3 class="title">Topics</h3>
268268
<p>
269-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
269+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
270270
</p>
271271
<h3 class="title">Documentation</h3>
272272
<p>
@@ -343,7 +343,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
343343
</p>
344344
<h3 class="title">Topics</h3>
345345
<p>
346-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
346+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
347347
</p>
348348
<h3 class="title">Documentation</h3>
349349
<p>

app/test/frontend/golden/pkg_example_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
263263
</p>
264264
<h3 class="title">Topics</h3>
265265
<p>
266-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
266+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
267267
</p>
268268
<h3 class="title">Documentation</h3>
269269
<p>
@@ -340,7 +340,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
340340
</p>
341341
<h3 class="title">Topics</h3>
342342
<p>
343-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
343+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
344344
</p>
345345
<h3 class="title">Documentation</h3>
346346
<p>

app/test/frontend/golden/pkg_install_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
289289
</p>
290290
<h3 class="title">Topics</h3>
291291
<p>
292-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
292+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
293293
</p>
294294
<h3 class="title">Documentation</h3>
295295
<p>
@@ -366,7 +366,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
366366
</p>
367367
<h3 class="title">Topics</h3>
368368
<p>
369-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
369+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
370370
</p>
371371
<h3 class="title">Documentation</h3>
372372
<p>

app/test/frontend/golden/pkg_score_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
351351
</p>
352352
<h3 class="title">Topics</h3>
353353
<p>
354-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
354+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
355355
</p>
356356
<h3 class="title">Documentation</h3>
357357
<p>
@@ -428,7 +428,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
428428
</p>
429429
<h3 class="title">Topics</h3>
430430
<p>
431-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
431+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
432432
</p>
433433
<h3 class="title">Documentation</h3>
434434
<p>

app/test/frontend/golden/pkg_score_page_with_downloads_chart.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
351351
</p>
352352
<h3 class="title">Topics</h3>
353353
<p>
354-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
354+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
355355
</p>
356356
<h3 class="title">Documentation</h3>
357357
<p>
@@ -428,7 +428,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
428428
</p>
429429
<h3 class="title">Topics</h3>
430430
<p>
431-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
431+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
432432
</p>
433433
<h3 class="title">Documentation</h3>
434434
<p>

app/test/frontend/golden/pkg_show_page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
266266
</p>
267267
<h3 class="title">Topics</h3>
268268
<p>
269-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
269+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
270270
</p>
271271
<h3 class="title">Documentation</h3>
272272
<p>
@@ -343,7 +343,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
343343
</p>
344344
<h3 class="title">Topics</h3>
345345
<p>
346-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
346+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
347347
</p>
348348
<h3 class="title">Documentation</h3>
349349
<p>

app/test/frontend/golden/pkg_show_page_discontinued.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
257257
</p>
258258
<h3 class="title">Topics</h3>
259259
<p>
260-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
260+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
261261
</p>
262262
<h3 class="title">Documentation</h3>
263263
<p>
@@ -332,7 +332,7 @@ <h3 class="title pkg-infobox-metadata">Metadata</h3>
332332
</p>
333333
<h3 class="title">Topics</h3>
334334
<p>
335-
<a href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
335+
<a class="topics-tag" href="/packages?q=topic%3Achemical-element" rel="nofollow">#chemical-element</a>
336336
</p>
337337
<h3 class="title">Documentation</h3>
338338
<p>

0 commit comments

Comments
 (0)