Skip to content

Commit

Permalink
feat: Render all negative PRs in grey, not red
Browse files Browse the repository at this point in the history
Before this commit:
- green: 0 or more points
- red: -1 or less points, not buried
- grey: buried

After:
- green: 0 or more points
- grey: -1 or less points

There was a bit too many colors with green, red, grey (and yellow for
bury-action, light-grey background, dark-grey font). Now we're in
harmony.

There's no real difference in actions to take on a negative PR, vs one
that's buried - the buried ones are always in the bottom, since we sort
by points, so they will be out of the way.
  • Loading branch information
chelmertz committed Sep 27, 2024
1 parent af94312 commit 266ea49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Binary file modified darkmode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 3 additions & 9 deletions internal/server/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
--fg: #312f2f;
--muted: #ccc;
--positive: #27b427;
--negative: #b42727;
--buried: #333;
--negative: #333;
--action: #f8da22;
--link: #aa0606;
}
Expand Down Expand Up @@ -127,10 +126,6 @@
&.points-positive {
background: var(--positive);
}

&.buried {
background: var(--buried);
}
}

.motivation {
Expand Down Expand Up @@ -164,8 +159,7 @@
--fg: #e1e1e1;
--muted: #555;
--positive: #27b427;
--negative: #b42727;
--buried: #818080;
--negative: #818080;
--action: #f8da22;
--link: #f8da22;
}
Expand Down Expand Up @@ -194,7 +188,7 @@
{{range $index, $pr := .Prs}}
{{with $points := index $.PointsPerPrUrl $pr.Url}}
<article class="pr {{$pr.ReviewStatus}}" role="gridcell" aria-selected="false">
<header class="rounded {{if $pr.Buried}}buried{{end}} points-{{if gt $points.Total -1}}positive{{else}}negative{{end}}">
<header class="rounded points-{{if gt $points.Total -1}}positive{{else}}negative{{end}}">
<h3><a class="pr-title" href="{{$pr.Url}}" target="_blank">{{if eq $.CurrentUser $pr.Author}}👤 {{end}}{{if $pr.Buried}}🪦 {{end}}{{$pr.Title}}</a></h3>
<span class="boring">@{{$pr.Author}}</span>
</header>
Expand Down

0 comments on commit 266ea49

Please sign in to comment.