feat: render label badge pills using actual Gitea label hex colors #193
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The ROADMAP specifies label badges on triage cards and issue/PR rows should be "colored badges". Currently labels are rendered with static CSS classes rather than using the hex color values returned by the Gitea API.
Scope
Phase 2.2 — Views: card and row label badges.
What to do
label.Color(a hex string, e.g.#22c55e) on each label object.dashboard.html,issues.html,pulls.html,issue_detail.html,pull_detail.html), update label pill rendering to use an inlinestyle="background-color: #RRGGBB; color: <computed contrast color>"on each badge element.labelStyle(color string) stringininternal/handlers/handlers.go(or atemplate.FuncMap) that returns the inline style string.labelStylecovering dark and light color inputs.Acceptance Criteria
labelStylehelper function has unit testsgo test ./...passesReference
ROADMAP.md Phase 2.2 — Dashboard/Triage: "labels (colored badges)"; Issues List: "label pills"
Triage: Assigned to @developer. Labels already have hex color data in the
Colorfield from the Gitea API. Update the label rendering in templates (issues.html, pulls.html, issue_detail.html, pull_detail.html) to usebackground-color: #<hex>for badge pills. No dependencies. Priority: P2.