Skip to content

fix: respect imperial units in wall panel#321

Open
MateoSaettone wants to merge 1 commit into
pascalorg:mainfrom
MateoSaettone:fix/wall-panel-imperial-units
Open

fix: respect imperial units in wall panel#321
MateoSaettone wants to merge 1 commit into
pascalorg:mainfrom
MateoSaettone:fix/wall-panel-imperial-units

Conversation

@MateoSaettone
Copy link
Copy Markdown

@MateoSaettone MateoSaettone commented May 20, 2026

Summary

  • add shared linear measurement helpers for meter/imperial formatting and conversion
  • reuse the shared formatter across wall, fence, site edge, item placement, and floorplan measurement labels
  • refactor the existing imperial-aware MetricControl to use the shared conversion helpers instead of its own feet multiplier
  • display/edit wall metadata dimensions in ft when the viewer unit is imperial while keeping scene values in meters
FixedImage

After the fix, imperial mode keeps the selected wall metadata panel in ft while scene values continue to persist internally in meters.

Closes #322

Test Plan

  • bun test packages/editor/src/lib/measurements.test.ts
  • bunx biome check packages/editor/src/lib/measurements.ts packages/editor/src/lib/measurements.test.ts packages/editor/src/index.tsx packages/editor/src/components/editor/wall-measurement-label.tsx packages/editor/src/components/editor/site-edge-labels.tsx packages/editor/src/components/editor/floorplan-panel.tsx packages/editor/src/components/tools/item/use-placement-coordinator.tsx packages/editor/src/components/ui/controls/metric-control.tsx packages/nodes/src/wall/tool.tsx packages/nodes/src/wall/panel.tsx packages/nodes/src/fence/tool.tsx
  • bun run --cwd packages/editor check-types
  • bun run check-types

Notes

  • Editable numeric controls continue to use decimal feet (for example, 10.50 ft); passive measurement labels continue to use feet/inches (for example, 10'6").
  • bun run --cwd packages/nodes build currently fails on an unrelated existing type error in packages/nodes/src/site/renderer.tsx.

@MateoSaettone MateoSaettone force-pushed the fix/wall-panel-imperial-units branch 2 times, most recently from 7d8ed1f to dd6c026 Compare May 20, 2026 20:59
@MateoSaettone MateoSaettone force-pushed the fix/wall-panel-imperial-units branch from dd6c026 to 1627d5e Compare May 20, 2026 21:07
@MateoSaettone MateoSaettone marked this pull request as ready for review May 20, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wall metadata panel ignores imperial unit setting

1 participant