Wall metadata panel ignores imperial unit setting
Problem
When the viewer unit is switched to imperial, wall drawing labels render in feet/inches, but the selected wall metadata panel still displays editable dimensions in meters.
In imperial mode, the toolbar is set to ft, but the selected wall metadata panel still displays metric values.
Expected
Wall metadata dimensions should follow the active viewer unit. In imperial mode, editable numeric controls should display feet while still persisting scene values internally in meters.
Scope
- Wall metadata panel length, height, thickness, and curve controls
- Shared linear measurement formatting/conversion helpers so wall labels and related measurement labels do not duplicate imperial formatting logic
Verification
This is covered by draft PR #321.
Hey @MateoSaettone, this bug has already been reported in #308, and a fix for the same has been implemented by draft PR #310
Thanks for flagging that, @PRAVEEN7230! I took a close look at both PRs.
The short answer is: #321 and #310 overlap on the core symptom but tackle it differently — and they're not duplicates.
What #322 / #321 is about The wall metadata panel (the editable controls — Length, Height, Thickness, Curve) was always showing and accepting meters even when imperial mode was active. #321 fixes this by:
- Adding a shared
measurements.tshelper module withmetersToLinearUnit,linearUnitToMeters,formatLinearMeasurement, etc. - Refactoring the wall panel (and fence, site-edge, item-placement, and floorplan labels) to explicitly convert stored meter values into feet for display and back to meters on commit
What #310 does differently
#310 takes a different approach: it hooks into SliderControl directly, treating unit="m" as a signal to auto-convert to imperial. While the intent is good, that approach has some issues when applied to the 100+ unit="m" sliders across the codebase — including controls with negative ranges (wall curve offset, dormers) where the conversion breaks.
#310 also adds a genuinely useful new feature: keyboard dimension input during wall drafting (type 10' → press Enter → wall snaps to that length). That feature is valuable, but it's independent of the panel-display bug and deserves its own focused PR.
Why #321 is the right path for this specific bug
- Clean explicit conversion at the panel level (no shared-component side effects)
- Shared
measurements.tsmodule properly tested with 7 passing unit tests - Fixes wall panel, fence labels, site-edge labels, item placement, and floorplan labels in one PR
I'll leave a detailed review on #321 shortly. PRAVEEN — see the comment on #310 about extracting the keyboard-input feature into a follow-up if you're interested!
Thanks both for the activity here. Quick clarification:
@PRAVEEN7230 — you're right that #308 reported a related bug, and your draft PR #310 addresses some of the same ground. However, #310 is not merged, so the fix hasn't shipped yet. #321 is a separate, complementary fix that covers the same panel-side imperial display issue with a broader approach.
After reviewing both PRs: #321 introduces shared helpers (measurements.ts) reused across wall, fence, site edge, floorplan, and item placement — a cleaner path forward than patching each component individually. We're going to go with #321 for the panel fixes.
#310 does contain one piece #321 doesn't: keyboard dimension input during wall drafting (type a value and press Enter while drawing). That's a useful feature and we want to keep it — just in a separate, focused PR.
Nothing has shipped to npm yet that includes either fix — current latest is v0.8.0. The fix will go out in the next npm release after #321 lands.