Skip to content

Commit

Permalink
fix(web): Provide visual response to old reviews
Browse files Browse the repository at this point in the history
Previously radicle-explorer kept old reviews the exact same style as new
ones (greyed out text like). This change sets the new review color to be
the same as users are normally while greying out old ones.

To provide further clarity we've added a tooltip for explaining that a
review is old. We've also added a strikethrough to accepting reviews
when a new revision is published as they are presumed to be stale. We
don't want to cross out rejecting reviews as we think these should be
considered unless the reviewer has explicitly re-reviewed.
  • Loading branch information
TheCodedProf authored and Minion3665 committed Oct 5, 2024
1 parent 5657a6f commit fc09f2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions public/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ p {
.txt-missing {
color: var(--color-foreground-dim);
}
.txt-strike {
text-decoration: line-through;
}
.txt-emoji {
height: 1em;
width: 1em;
Expand Down
9 changes: 7 additions & 2 deletions src/views/repos/Cob/Reviews.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
font-size: var(--font-size-small);
}
.review {
color: var(--color-fill-gray);
display: inline-flex;
align-items: center;
gap: 0.5rem;
Expand Down Expand Up @@ -59,7 +58,13 @@
<div class="header">Reviews</div>
<div class="body">
{#each Object.values(reviews) as { latest, review }}
<div class="review" class:txt-missing={!latest}>
<div
class="review"
class:txt-missing={!latest}
class:txt-strike={!latest && review.verdict !== "reject"}
title={!latest
? `This review was on a previous revision. Please ask ${review.author.alias} to re-review`
: ""}>
<span
class:review-accept={review.verdict === "accept"}
class:review-reject={review.verdict === "reject"}>
Expand Down

0 comments on commit fc09f2c

Please sign in to comment.