fix(comments): eraser, properties pane, un-resolve, right-click, persistence #42
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!42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_comment_batch_fixes"
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
Batch of six comment-related UX fixes addressing issues #36-#41.
Related Issues
Changes
Server
crates/hero_whiteboard_server/src/migrations/005_comment_transform.sql(new) — addsrotation REAL NOT NULL DEFAULT 0andscale REAL NOT NULL DEFAULT 1columns tocomments.src/db/models.rs— extendCommentwithrotationandscale.src/db/queries.rs—create_comment,list_comments,update_commentread/write both columns;resolve_commentrenamed toset_comment_resolved(conn, id, resolved, now).src/handlers/comment.rs—createaccepts optionalrotation/scale;updateaccepts both (scale clamped to [0.2, 5.0]);resolveacceptsresolved: bool(defaults to true — backwards compatible).openrpc.json—comment.create,comment.update,comment.resolvedocumented with the new fields;Commentschema gainsrotation+scale.Client
static/web/js/whiteboard/comments.jsaddCommentMarkerappliescomment.rotationandcomment.scaleon load.e.evt.button !== 0— right-click falls through.setResolved(id, bool)helper powersresolveCommentand newunresolveComment; popover renders Unresolve whencomment.resolved.onTransformEnd(group)bakes uniform scale, clamps to [0.2, 5], persists{x, y, rotation, scale}, broadcasts via websocket.handleSyncMessageapplies incoming rotation/scale and handlescomment.unresolved.unresolveComment,onTransformEnd,getComments.static/web/js/whiteboard/tools.jstransformendroutes comment markers toWhiteboardComments.onTransformEnd.eraseAtPositionwalks.comment-markerand deletes matches throughWhiteboardComments.deleteComment.static/web/js/whiteboard/properties.jsshow()detectsnode.hasName('comment-marker')and renders a dedicated Comment pane (Position, Status, Text preview, Resolve/Unresolve + Delete).Test Results
cargo check --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passNo Rust unit tests exist for this code path; behavior needs manual verification in the browser.
Manual verification