Skip to content

Commit cbd7814

Browse files
authored
New Libraries page in release report (boostorg#1864)
1 parent 21cea10 commit cbd7814

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

libraries/forms.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,9 @@ def get_stats(self):
748748
lambda x: x.get("top_contributors_release").count()
749749
<= AUTHORS_PER_PAGE_THRESHOLD,
750750
)
751+
new_libraries = libraries.exclude(
752+
library_version__version__release_date__lte=prior_version.release_date
753+
).prefetch_related("authors")
751754
top_contributors = self._get_top_contributors_for_version(version)
752755
# total messages sent during this release (version)
753756
total_mailinglist_count = EmailData.objects.filter(version=version).aggregate(
@@ -850,6 +853,7 @@ def get_stats(self):
850853
"version_commit_count": version_commit_count,
851854
"top_contributors_release_overall": top_contributors,
852855
"library_data": library_data,
856+
"new_libraries": new_libraries,
853857
"batched_library_data": batched_library_data,
854858
"top_libraries_for_version": top_libraries_for_version,
855859
"library_count": library_count,

templates/admin/release_report_detail.html

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@
2020
list-style: circle;
2121
margin-left: 2rem;
2222
}
23-
.sponsor-message a, #library_index li a, ul.slack-channels li div a {
23+
.sponsor-message a,
24+
#library_index li a,
25+
ul.slack-channels li div a,
26+
.new-libraries a {
2427
color: rgb(2, 132, 199);
2528
}
2629

27-
.sponsor-message a:hover, #library_index li a:hover {
30+
.sponsor-message a:hover,
31+
#library_index li a:hover,
32+
ul.slack-channels li div a:hover,
33+
.new-libraries a:hover {
2834
color: rgb(255, 159, 0);
2935
}
3036
.committee_members img {
@@ -388,6 +394,46 @@ <h2 class="mx-auto">Library Index</h2>
388394
</ul>
389395
</div>
390396
</div>
397+
{% if new_libraries %}
398+
<div class="pdf-page flex items-center justify-items-center {{ bg_color }}" style="background-image: url('{% static 'img/release_report/bg3.png' %}');">
399+
<div class="flex flex-col h-full mx-auto w-full">
400+
<h2 class="mx-auto">New Libraries</h2>
401+
{% for library in new_libraries %}
402+
<div class="flex flex-row gap-x-4 mb-4 gap-y-2 new-libraries">
403+
{% if library.graphic %}
404+
<div class="max-w-[16rem]">
405+
<img src="{{ library.graphic.url }}" alt="" />
406+
</div>
407+
{% endif %}
408+
<div class="flex flex-col gap-y-2">
409+
<div class="font-semibold text-lg">
410+
{{ library.name }}
411+
</div>
412+
<div class="text-sm">
413+
{{ library.description }}
414+
</div>
415+
<div class="text-sm">
416+
<a href="{{ library.github_url }}">{{ library.github_url }}</a>
417+
</div>
418+
<div class="text-sm font-semibold">Contributors:</div>
419+
<div class="flex flex-row flex-wrap gap-x-4 gap-y-2">
420+
{% for author in library.authors.all %}
421+
<div class="flex flex-row gap-y-2 w-30 items-center">
422+
{% avatar user=author %}
423+
<div class="w-full flex flex-col pl-2">
424+
<div class="text-[0.8rem] font-semibold overflow-ellipsis overflow-hidden whitespace-nowrap w-full">
425+
{{ author.display_name }}
426+
</div>
427+
</div>
428+
</div>
429+
{% endfor %}
430+
</div>
431+
</div>
432+
</div>
433+
{% endfor %}
434+
</div>
435+
</div>
436+
{% endif %}
391437
{% with "img/release_report/bg1.png,img/release_report/bg4-rev.png,img/release_report/bg3-rev.png,img/release_report/bg1-rev.png,img/release_report/bg2.png,img/release_report/bg6-rev.png,img/release_report/bg3.png,img/release_report/bg4.png,img/release_report/bg5.png,img/release_report/bg6.png,img/release_report/bg2-rev.png" as bg_list_str %}
392438
{% with bg_list=bg_list_str|split:"," %}
393439
{% for batch in batched_library_data %}

0 commit comments

Comments
 (0)