Skip to content

Commit

Permalink
create a reviews page
Browse files Browse the repository at this point in the history
feel free to move around/rename
  • Loading branch information
SallyMcGrath committed Dec 6, 2024
1 parent 697a88f commit 9def2ea
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
14 changes: 14 additions & 0 deletions org-cyf-itp/assets/custom-theme/04-components/pr-overview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.c-pr-overview {
display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(var(--theme-spacing--container-min), 1fr)
);
gap: var(--theme-spacing--2);
margin-bottom: var(--theme-spacing--4);

&__card {
box-shadow: var(--theme-box-shadow--slim);
padding: var(--theme-spacing--1);
}
}
7 changes: 7 additions & 0 deletions org-cyf-itp/content/reviews/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title="ITP PRs needing review"
layout="needs-review"
description="Modules in red have lots of PRs, or old PRs needing review."
weight=2
emoji="🧑🏾‍🤝‍🧑🏾"
+++
61 changes: 61 additions & 0 deletions org-cyf-itp/layouts/_default/needs-review.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{ define "main" }}
{{ partial "page-header.html" . }}
{{ with .Content }}
<section class="l-page__main c-copy">
{{ . }}
</section>
{{ end }}
<div id="overview" class="c-pr-overview"></div>

<h3 class="e-heading__4">For PRs:</h3>
<dl class="e-dl">
<dt class="e-dt">🔴</dt>
<dd class="e-dd">Waiting for review >4 weeks</dd>
<dt class="e-dt">🟠</dt>
<dd class="e-dd">Waiting for review >1 week</dd>
<dt class="e-dt">🟢</dt>
<dd class="e-dd">From this week</dd>
</dl>

<div id="pr-list">Loading...</div>

<template class="overview-card">
<section class="c-pr-overview__card overview-card">
<h3 class="c-pr-overview__module e-heading__5 module"></h3>
<div class="c-pr-overview__summary summary-heading">
<p class="c-pr-overview__description e-heading__6 ">
PRs needing review from:
</p>
<dl class="c-pr-overview__age age-container">
<dt class="c-pr-overview__bucket age-bucket this-week">This week</dt>
<dd class="c-pr-overview__count count"></dd>
<dt class="c-pr-overview__bucket age-bucket this-month">
2-4 weeks ago
</dt>
<dd class="c-pr-overview__count count"></dd>
<dt class="c-pr-overview__count age-bucket old">4+ weeks ago</dt>
<dd class="c-pr-overview__count count"></dd>
</dl>
<div class="c-pr-overview__values summary-values"></div>
</div>
</section>
</template>

<template class="pr-list">
<h2 class="e-heading__3 module"></h2>
<ul class="e-list pr-list"></ul>
</template>

<template class="pr-in-list">
<li>
<span class="c-emoji emoji"></span> <a class="pr-link"></a> (<a
class="e-link user-link"></a>
- #<span class="pr-number"></span>)
</li>
</template>

{{ $common := resources.Get "custom-scripts/reviews/common.mjs" | resources.Minify }}
{{ $reviews := resources.Get "custom-scripts/reviews/index.mjs" | resources.Minify }}
{{ $js := slice $common $reviews | resources.Concat "js/reviews-bundle.js" | resources.Minify }}
<script type="module" src="{{ $js.RelPermalink }}"></script>
{{ end }}

0 comments on commit 9def2ea

Please sign in to comment.