Kanban: column color indicator is not vertically aligned with the title text #53
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Problem
The small colored bar beside each kanban column title sits slightly off-center relative to the title text — visually noticeable especially with bold titles.
Evidence
renderColumn():y: cy + 6, height: 14-> visual centercy + 13.y: cy + 6, fontSize: 12, fontStyle: 'bold'-> Konva draws text from top with internal line-height padding, so the visible text center sits abovecy + 13.Fix
colTitle.height()/colTitle.getClientRect()and set the indicator rect'sytotitleCenterY - indicatorHeight / 2.y: cy + 9, height: 10to visually match fontSize 12 bold ascent — simpler but less robust to future font changes.Implementation Spec for Issue #53
Objective
Center the column color indicator bar vertically against the column title text so they appear aligned.
Requirements
Files to Modify
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.js— inrenderColumn, compute the indicator'syfrom the rendered title's client rect so the rectangle's vertical center matches the visible text center.Implementation Plan
Step 1: Center indicator against title client rect
Files:
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.jsSubtasks:
renderColumn, construct thecolTitleKonva.Text before the color-indicator Rect (swap current order).colTitleto the group, read its bounding box:var titleBox = colTitle.getClientRect({ relativeTo: group });.indicatorYwhen creating the color-indicator Rect.xplacement (indicator atcx + 8, title atcx + 18).Dependencies: none
Acceptance Criteria
x),+ Column,+ Add card, or card rendering.Notes
getClientRect({ relativeTo: group })returns coordinates in the group's local frame, which matches the rest ofrenderColumn's coordinates.Test Results
cargo check --workspace: PASScargo clippy --workspace -- -D warnings: PASSJavaScript-only change.
Pull request opened: #61
This PR implements the changes discussed in this issue.