fix(kanban): scale card and column font sizes with resize state #64
No reviewers
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!64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_kanban_font_scale_with_size"
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
Kanban card text, 3-dot menu glyph, column titles, and the +Add card button now scale proportionally with
cardHeight/colWidth. Previously they were hardcoded (11, 14, 12, 11), so on a resized kanban the text looked tiny relative to the cells.Related Issue
Closes #51
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.jsclampFont(v, min, max)helper that rounds and clamps a derived font size.renderColumn: derivestitleFs = clampFont(colW * 0.04 + 4, 10, 18)andaddFs = clampFont(colW * 0.035 + 4, 9, 16), applied tocolTitleand the +Add card button.renderCard: derivestextFs = clampFont(cardH * 0.25, 9, 20)andmenuFs = clampFont(cardH * 0.32, 10, 24), applied tocardTextandmenuBtn. Vertical placement uses acardH <= 48 ? legacy : centeredbranch so cards at the default height keep exact pixel parity (textY=8,menuY=15) while larger cards center their glyphs.Default parity
All formulas produce the previous hardcoded values at default
colWidth=200/cardHeight=44(12, 11, 11, 14), so existing kanbans render identically on first load. A continuous centering formula would shift every existing card's text by ~8 px, which is deliberately avoided.Out of scope
Test Results
cargo check --workspace: passcargo test --workspace --lib: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passManual QA against a running UI required to confirm visual scaling across resize, default parity on load, and readability at the 22-min cardHeight floor.