- commit
- 9ccc782
- parent
- a444d69
- author
- Eric Bower
- date
- 2025-12-28 23:09:24 -0500 EST
style: timeline event display
2 files changed,
+81,
-10
+65,
-4
1@@ -116,16 +116,77 @@ details {
2 margin-bottom: -1px;
3 }
4
5-.pr-tab:hover {
6- background-color: var(--grey-light);
7-}
8-
9 .pr-tab-active {
10 border-color: var(--grey-light);
11 border-bottom: 1px solid var(--bg-color);
12 background-color: var(--bg-color);
13 }
14
15+.timeline {
16+ border-left: 2px solid var(--grey-light);
17+ padding-left: var(--line-height);
18+ margin-left: 0.5rem;
19+ gap: var(--line-height);
20+ margin-bottom: calc(var(--line-height) * 3);
21+}
22+
23+.timeline-item {
24+ position: relative;
25+}
26+
27+.timeline-item::before {
28+ content: "";
29+ position: absolute;
30+ left: calc(-1 * var(--line-height) - 0.25rem - 1px);
31+ top: 0.5rem;
32+ width: 0.5rem;
33+ height: 0.5rem;
34+ background-color: var(--grey-light);
35+ border-radius: 50%;
36+}
37+
38+.timeline-status-accepted::before {
39+ background-color: var(--success);
40+}
41+
42+.timeline-status-closed::before {
43+ background-color: var(--admin);
44+}
45+
46+.timeline-status-reviewed::before {
47+ background-color: var(--review);
48+}
49+
50+.timeline-status-open::before {
51+ background-color: var(--link-color);
52+}
53+
54+.status-change-comment {
55+ background-color: var(--blockquote-bg);
56+ padding: var(--grid-height);
57+ margin-top: var(--grid-height);
58+}
59+
60+.pill-status-accepted {
61+ border: 1px solid var(--success);
62+ color: var(--success);
63+}
64+
65+.pill-status-closed {
66+ border: 1px solid var(--admin);
67+ color: var(--admin);
68+}
69+
70+.pill-status-reviewed {
71+ border: 1px solid var(--review);
72+ color: var(--review);
73+}
74+
75+.pill-status-open {
76+ border: 1px solid var(--link-color);
77+ color: var(--link-color);
78+}
79+
80 @media only screen and (max-width: 40em) {
81 .collapse {
82 flex-direction: column;
+16,
-6
1@@ -19,9 +19,9 @@
2 {{template "pr-tabs" .}}
3
4 {{if eq .Tab "timeline"}}
5- <div class="group text-sm timeline">
6+ <div class="group timeline">
7 {{range .Logs}}
8- <div class="timeline-item">
9+ <div class="timeline-item{{if eq .Event "pr_status_changed"}} timeline-status-{{.Data.Status}}{{end}}">
10 {{if .RangeDiff}}
11 <details class="mb">
12 <summary class="text-sm">Range Diff ↕ <code><a href="/rd/{{.Patchset.ID}}">rd-{{.Patchset.ID}}</a></code></summary>
13@@ -37,6 +37,18 @@
14 </details>
15 {{end}}
16
17+ {{if eq .Event "pr_status_changed"}}
18+ <div>
19+ {{template "user-pill" .UserData}}
20+ <span class="font-bold">changed status to
21+ <code class="pill-status-{{.Data.Status}}">{{.Data.Status}}</code>
22+ </span>
23+ <span>on <date>{{.Date}}</date></span>
24+ </div>
25+ {{if .Data.Comment}}
26+ <div class="status-change-comment">{{.Data.Comment}}</div>
27+ {{end}}
28+ {{else}}
29 <div>
30 {{template "user-pill" .UserData}}
31 <span class="font-bold">
32@@ -50,17 +62,15 @@
33 reviewed pr with <a href="/ps/{{.Patchset.ID}}"><code class="pill-review">{{.FormattedPatchsetID}}</code></a>
34 {{else if eq .Event "pr_patchset_replaced"}}
35 replaced <code>{{.FormattedPatchsetID}}</code>
36- {{else if eq .Event "pr_status_changed"}}
37- changed status
38 {{else if eq .Event "pr_name_changed"}}
39- changed pr name
40+ changed pr name to <code>{{.Data.Name}}</code>
41 {{else}}
42 {{.Event}}
43 {{end}}
44 </span>
45 <span>on <date>{{.Date}}</date></span>
46- {{if .Data.String}}<code>{{.Data}}</code>{{end}}
47 </div>
48+ {{end}}
49 </div>
50 {{end}}
51 </div>