fabrica

hanna/fabrica

style(web): shorten close/reopen buttons; trim labels list top padding

906fb7b · hanna committed on 2026-07-25

Close/Reopen buttons drop the noun ("Close" instead of "Close pull request").
Zero the first label row's top padding so the list doesn't double up on the
card padding.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
3 files changed · +12 −9UnifiedSplit
assets/base.css +3 −0
@@ -371,6 +371,9 @@ body.drawer-open .drawer-backdrop {
371371 .label-list .entry-row {
372372 padding: 0.85rem 0;
373373 }
374+.label-list .entry-row:first-child {
375+ padding-top: 0;
376+}
374377 .label-list .entry-row-body {
375378 display: flex;
376379 flex-direction: row;
crates/web/src/issues.rs +6 −6
@@ -268,7 +268,7 @@ pub(crate) async fn view(
268268 }
269269 @if issue.locked() { (locked_note(can_write)) }
270270 @if can_write || (is_author && !issue.locked()) {
271- (comment_box(&issue, &csrf, kind, can_write))
271+ (comment_box(&issue, &csrf, can_write))
272272 }
273273 }
274274 aside class="issue-side" {
@@ -366,10 +366,10 @@ pub(crate) fn state_badge(st: IssueState, is_pull: bool) -> Markup {
366366 }
367367
368368 /// The close/reopen button (posts to the state endpoint).
369-pub(crate) fn state_button(issue: &Issue, csrf: &str, kind: Kind) -> Markup {
369+pub(crate) fn state_button(issue: &Issue, csrf: &str) -> Markup {
370370 let (target, label) = match issue.state {
371- IssueState::Open => ("closed", format!("Close {}", kind.noun)),
372- IssueState::Closed => ("open", format!("Reopen {}", kind.noun)),
371+ IssueState::Open => ("closed", "Close"),
372+ IssueState::Closed => ("open", "Reopen"),
373373 };
374374 html! {
375375 form method="post" action=(format!("/issue/{}/state", issue.id)) class="inline-form" {
@@ -392,7 +392,7 @@ pub(crate) fn locked_note(can_write: bool) -> Markup {
392392
393393 /// The comment box: a textarea plus the state/lock/comment actions. The Comment
394394 /// button references the form via `form=` so no forms are nested.
395-pub(crate) fn comment_box(issue: &Issue, csrf: &str, kind: Kind, can_write: bool) -> Markup {
395+pub(crate) fn comment_box(issue: &Issue, csrf: &str, can_write: bool) -> Markup {
396396 let comment_form = format!("comment-{}", issue.id);
397397 html! {
398398 div class="card comment-form" {
@@ -401,7 +401,7 @@ pub(crate) fn comment_box(issue: &Issue, csrf: &str, kind: Kind, can_write: bool
401401 textarea name="body" rows="4" placeholder="Leave a comment (markdown)" required {}
402402 }
403403 div class="comment-actions" {
404- (state_button(issue, csrf, kind))
404+ (state_button(issue, csrf))
405405 @if can_write { (lock_button(issue, csrf)) }
406406 button class="btn btn-primary inline-btn" type="submit" form=(comment_form) { "Comment" }
407407 }
crates/web/src/pulls.rs +3 −3
@@ -25,8 +25,8 @@ use crate::AppState;
2525 use crate::diff;
2626 use crate::error::{AppError, AppResult};
2727 use crate::issues::{
28- Kind, access_for, assignee_form, comment_box, comment_card, deps_section, edit_issue_form,
29- issue_url, label_form, locked_note, repo_of_issue, respond_redirect, state_badge, username,
28+ access_for, assignee_form, comment_box, comment_card, deps_section, edit_issue_form, issue_url,
29+ label_form, locked_note, repo_of_issue, respond_redirect, state_badge, username,
3030 };
3131 use crate::layout::page;
3232 use crate::pages::build_chrome;
@@ -167,7 +167,7 @@ pub(crate) async fn view(
167167 (merge_panel(&issue, &pr, mergeable, blocked, &csrf))
168168 @if issue.locked() { (locked_note(can_write)) }
169169 @if can_write || (is_author && !issue.locked()) {
170- (comment_box(&issue, &csrf, Kind::pulls(), can_write))
170+ (comment_box(&issue, &csrf, can_write))
171171 }
172172 }
173173 aside class="issue-side" {