Skip to content

Add PDF export, file-size display, trapezium shape and multiple rendering/selection fixes - #16

Open
Dcode9 wants to merge 1 commit into
mainfrom
codex/fix-syntax-error-and-add-rhombus-gf05td
Open

Add PDF export, file-size display, trapezium shape and multiple rendering/selection fixes#16
Dcode9 wants to merge 1 commit into
mainfrom
codex/fix-syntax-error-and-add-rhombus-gf05td

Conversation

@Dcode9

@Dcode9 Dcode9 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Surface board file sizes and provide a quick PDF export from the boards UI.
  • Add a missing quadrilateral option (trapezium) and ensure shape tools, eraser and bounds calculations handle it.
  • Improve rendering robustness, performance and touch/pen interactions (high‑DPI, zoom, scheduling, stroke bounds).
  • Fix selection UX (copy/paste, auto-select shapes after drawing) and several edge-case bugs in drawing and toolbar layout.

Description

  • UI/CSS: added .board-card-meta and .board-file-size styling and adjusted toolbar/tool-config layout to better handle pinned configs and responsive widths.
  • File size & export: implemented formatBoardFileSize, estimateBoardFileSize, getBoardDrawingData and exportBoardToPdf, added an "Export PDF" button to board cards, and display file size for each board and preview update.
  • Shapes & eraser: added trapezium option to the shapes popover and implemented trapezium support across getQuadrilateralPoints, drawing, bounds, and eraser hit-testing.
  • Rendering & performance: added requestRender scheduling and renderFrame tracking, introduced stroke bounds caching (strokeBoundsCache and getStrokeBounds/getStrokeLocalBounds), limited preview strokes via a maxStrokes param to drawDrawingToCanvas, and switched to exponential zoom factors for wheel/touch for smoother zooming.
  • Drawing & tools: improved pen variable width with a new makeStrokePoint velocity-based width smoothing, enabled variableWidth for pen strokes, increased zoom clamp safety, fixed DPR/scaling issues, and removed fragile touch-hold eraser gesture in favor of explicit eraser handling.
  • Selection & clipboard: added selection helper functions (getSelectionIndices, copySelectedStrokes, pasteSelectedStrokes), wired keyboard shortcuts for Ctrl+C/Ctrl+V, made shapes auto-select after finishing, and refined resize/rotate handle calculations.

Testing

  • Ran the project's automated test suite with npm test, which completed successfully.
  • Ran linter checks with npm run lint, which passed without errors.
  • Performed automated build (npm run build) as a smoke check, which succeeded.

Codex Task

@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
whiteboard Ready Ready Preview, Comment Jun 7, 2026 1:50pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant